text: /* 
   * 
   * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file.
   * 
   * Copyright 2007-2020 Broadcom Inc. All rights reserved.
   * 
   * DO NOT EDIT THIS FILE!
   * This file is auto-generated.
   * Edits to this file will be lost when it is regenerated.
   */
  
  #include <sal/core/libc.h>
  #include <shared/swstate/sw_state.h>
  #include <shared/error.h>
  #include <shared/swstate/sw_state_defs.h>
  #include <shared/bsl.h>
  #include <shared/swstate/access/sw_state_access.h>
  #include <shared/swstate/access/sw_state_dpp_soc_arad_pp_oam_my_mac_lsb_access.h>
  
  #ifdef _ERR_MSG_MODULE_NAME
      #error "_ERR_MSG_MODULE_NAME redefined"
  #endif
  
  #define _ERR_MSG_MODULE_NAME BSL_LS_SHARED_SWSTATE
  
  extern shr_sw_state_t *sw_state[BCM_MAX_NUM_UNITS];
  
  #ifdef BCM_PETRA_SUPPORT
  #if defined(BCM_PETRA_SUPPORT)
  /* AUTO-GENERATED - DO NOT MODIFY */
  int sw_state_dpp_soc_arad_pp_oam_my_mac_lsb_alloc(int unit){
      SW_STATE_INIT_FUNC_DEFS;
      SHR_SW_STATE_ALLOC(
          unit,
          sw_state[unit]->dpp.soc.arad.pp->oam_my_mac_lsb,
          sizeof(ARAD_PP_OAM_MY_MAC_LSB),
          SW_STATE_IS_WB_CHECK | SW_STATE_ALLOW_AUTOSYNC,
          "sw_state_dpp_soc_arad_pp_oam_my_mac_lsb_alloc");
      SW_STATE_FUNC_RETURN;
  }
  
  #endif /* defined(BCM_PETRA_SUPPORT)*/ 
  #endif /* BCM_PETRA_SUPPORT*/ 
  
  #ifdef BCM_PETRA_SUPPORT
  #if defined(BCM_PETRA_SUPPORT)
  /* AUTO-GENERATED - DO NOT MODIFY */
  int sw_state_dpp_soc_arad_pp_oam_my_mac_lsb_is_allocated(int unit, uint8 *is_allocated){
      SW_STATE_INIT_FUNC_DEFS;
      SHR_SW_STATE_IS_ALLOC(
          unit,
          sw_state[unit]->dpp.soc.arad.pp->oam_my_mac_lsb,
          is_allocated,
          SW_STATE_NONE,
          "sw_state_dpp_soc_arad_pp_oam_my_mac_lsb_alloc");
      SW_STATE_FUNC_RETURN;
  }
  
  #endif /* defined(BCM_PETRA_SUPPORT)*/ 
  #endif /* BCM_PETRA_SUPPORT*/ 
  
  #ifdef BCM_PETRA_SUPPORT
  #if defined(BCM_PETRA_SUPPORT)
  /* AUTO-GENERATED - DO NOT MODIFY */
  int sw_state_dpp_soc_arad_pp_oam_my_mac_lsb_free(int unit){
      SW_STATE_INIT_FUNC_DEFS;
      SHR_SW_STATE_FREE(
          unit,
          sw_state[unit]->dpp.soc.arad.pp->oam_my_mac_lsb,
          SW_STATE_NONE,
          "sw_state_dpp_soc_arad_pp_oam_my_mac_lsb_alloc");
      SW_STATE_FUNC_RETURN;
  }
  
  #endif /* defined(BCM_PETRA_SUPPORT)*/ 
  #endif /* BCM_PETRA_SUPPORT*/ 
  
  #ifdef BCM_PETRA_SUPPORT
  #if defined(BCM_PETRA_SUPPORT)
  /* AUTO-GENERATED - DO NOT MODIFY */
  int sw_state_dpp_soc_arad_pp_oam_my_mac_lsb_verify(int unit){
      SW_STATE_INIT_FUNC_DEFS;
      _rv = sw_state_access[unit].dpp.soc.arad.pp.verify( unit);
      _SOC_IF_ERR_EXIT(_rv);
      SW_STATE_NULL_ACCESS_CHECK(sw_state[unit]->dpp.soc.arad.pp->oam_my_mac_lsb);
      SW_STATE_FUNC_RETURN;
  }
  
  #endif /* defined(BCM_PETRA_SUPPORT)*/ 
  #endif /* BCM_PETRA_SUPPORT*/ 
  
  #ifdef BCM_PETRA_SUPPORT
  #if defined(BCM_PETRA_SUPPORT)
  /* AUTO-GENERATED - DO NOT MODIFY */
  int sw_state_dpp_soc_arad_pp_oam_my_mac_lsb_ref_count_set(int unit, int ref_count_idx_0, int ref_count_idx_1, uint16 ref_count){
      SW_STATE_INIT_FUNC_DEFS;
      SHR_SW_STATE_VERIFY( sw_state_access[unit].dpp.soc.arad.pp.oam_my_mac_lsb.ref_count.verify( unit, ref_count_idx_0, ref_count_idx_1));
      SHR_SW_STATE_SET(
          unit,
          sw_state[unit]->dpp.soc.arad.pp->oam_my_mac_lsb->ref_count[ref_count_idx_0][ref_count_idx_1],
          ref_count,
          uint16,
          SW_STATE_IS_WB_CHECK | SW_STATE_ALLOW_AUTOSYNC,
          "sw_state_dpp_soc_arad_pp_oam_my_mac_lsb_ref_count_set");
      SW_STATE_FUNC_RETURN;
  }
  
  #endif /* defined(BCM_PETRA_SUPPORT)*/ 
  #endif /* BCM_PETRA_SUPPORT*/ 
  
  #ifdef BCM_PETRA_SUPPORT
  #if defined(BCM_PETRA_SUPPORT)
  /* AUTO-GENERATED - DO NOT MODIFY */
  int sw_state_dpp_soc_arad_pp_oam_my_mac_lsb_ref_count_get(int unit, int ref_count_idx_0, int ref_count_idx_1, uint16 *ref_count){
      SW_STATE_INIT_FUNC_DEFS;
      SHR_SW_STATE_VERIFY( sw_state_access[unit].dpp.soc.arad.pp.oam_my_mac_lsb.ref_count.verify( unit, ref_count_idx_0, ref_count_idx_1));
      *ref_count = sw_state[unit]->dpp.soc.arad.pp->oam_my_mac_lsb->ref_count[ref_count_idx_0][ref_count_idx_1];
      SW_STATE_FUNC_RETURN;
  }
  
  #endif /* defined(BCM_PETRA_SUPPORT)*/ 
  #endif /* BCM_PETRA_SUPPORT*/ 
  
  #ifdef BCM_PETRA_SUPPORT
  #if defined(BCM_PETRA_SUPPORT)
  /* AUTO-GENERATED - DO NOT MODIFY */
  int sw_state_dpp_soc_arad_pp_oam_my_mac_lsb_ref_count_alloc(int unit, int ref_count_idx_0, int nof_instances_to_alloc){
      SW_STATE_INIT_FUNC_DEFS;
      SHR_SW_STATE_ALLOC(
          unit,
          sw_state[unit]->dpp.soc.arad.pp->oam_my_mac_lsb->ref_count[ref_count_idx_0],
          nof_instances_to_alloc * sizeof(uint16),
          SW_STATE_IS_WB_CHECK | SW_STATE_ALLOW_AUTOSYNC,
          "sw_state_dpp_soc_arad_pp_oam_my_mac_lsb_ref_count_alloc");
      SW_STATE_FUNC_RETURN;
  }
  
  #endif /* defined(BCM_PETRA_SUPPORT)*/ 
  #endif /* BCM_PETRA_SUPPORT*/ 
  
  #ifdef BCM_PETRA_SUPPORT
  #if defined(BCM_PETRA_SUPPORT)
  /* AUTO-GENERATED - DO NOT MODIFY */
  int sw_state_dpp_soc_arad_pp_oam_my_mac_lsb_ref_count_is_allocated(int unit, int ref_count_idx_0, uint8 *is_allocated){
      SW_STATE_INIT_FUNC_DEFS;
      SHR_SW_STATE_IS_ALLOC(
          unit,
          sw_state[unit]->dpp.soc.arad.pp->oam_my_mac_lsb->ref_count[ref_count_idx_0],
          is_allocated,
          SW_STATE_NONE,
          "sw_state_dpp_soc_arad_pp_oam_my_mac_lsb_ref_count_alloc");
      SW_STATE_FUNC_RETURN;
  }
  
  #endif /* defined(BCM_PETRA_SUPPORT)*/ 
  #endif /* BCM_PETRA_SUPPORT*/ 
  
  #ifdef BCM_PETRA_SUPPORT
  #if defined(BCM_PETRA_SUPPORT)
  /* AUTO-GENERATED - DO NOT MODIFY */
  int sw_state_dpp_soc_arad_pp_oam_my_mac_lsb_ref_count_free(int unit, int ref_count_idx_0){
      SW_STATE_INIT_FUNC_DEFS;
      SHR_SW_STATE_FREE(
          unit,
          sw_state[unit]->dpp.soc.arad.pp->oam_my_mac_lsb->ref_count[ref_count_idx_0],
          SW_STATE_NONE,
          "sw_state_dpp_soc_arad_pp_oam_my_mac_lsb_ref_count_alloc");
      SW_STATE_FUNC_RETURN;
  }
  
  #endif /* defined(BCM_PETRA_SUPPORT)*/ 
  #endif /* BCM_PETRA_SUPPORT*/ 
  
  #ifdef BCM_PETRA_SUPPORT
  #if defined(BCM_PETRA_SUPPORT)
  /* AUTO-GENERATED - DO NOT MODIFY */
  int sw_state_dpp_soc_arad_pp_oam_my_mac_lsb_ref_count_ptr_alloc(int unit, int nof_instances_to_alloc){
      SW_STATE_INIT_FUNC_DEFS;
      SHR_SW_STATE_ALLOC(
          unit,
          sw_state[unit]->dpp.soc.arad.pp->oam_my_mac_lsb->ref_count,
          nof_instances_to_alloc * sizeof(uint16*),
          SW_STATE_IS_WB_CHECK | SW_STATE_ALLOW_AUTOSYNC,
          "sw_state_dpp_soc_arad_pp_oam_my_mac_lsb_ref_count_alloc");
      SW_STATE_FUNC_RETURN;
  }
  
  #endif /* defined(BCM_PETRA_SUPPORT)*/ 
  #endif /* BCM_PETRA_SUPPORT*/ 
  
  #ifdef BCM_PETRA_SUPPORT
  #if defined(BCM_PETRA_SUPPORT)
  /* AUTO-GENERATED - DO NOT MODIFY */
  int sw_state_dpp_soc_arad_pp_oam_my_mac_lsb_ref_count_ptr_free(int unit){
      SW_STATE_INIT_FUNC_DEFS;
      SHR_SW_STATE_FREE(
          unit,
          sw_state[unit]->dpp.soc.arad.pp->oam_my_mac_lsb->ref_count,
          SW_STATE_IS_WB_CHECK | SW_STATE_ALLOW_AUTOSYNC,
          "sw_state_dpp_soc_arad_pp_oam_my_mac_lsb_ref_count_alloc");
      SW_STATE_FUNC_RETURN;
  }
  
  #endif /* defined(BCM_PETRA_SUPPORT)*/ 
  #endif /* BCM_PETRA_SUPPORT*/ 
  
  #ifdef BCM_PETRA_SUPPORT
  #if defined(BCM_PETRA_SUPPORT)
  /* AUTO-GENERATED - DO NOT MODIFY */
  int sw_state_dpp_soc_arad_pp_oam_my_mac_lsb_ref_count_verify(int unit, int ref_count_idx_0, int ref_count_idx_1){
      uint32 allocated_size = 0;
      SW_STATE_INIT_FUNC_DEFS;
      _rv = sw_state_access[unit].dpp.soc.arad.pp.oam_my_mac_lsb.verify( unit);
      _SOC_IF_ERR_EXIT(_rv);
      SW_STATE_NULL_ACCESS_CHECK(sw_state[unit]->dpp.soc.arad.pp->oam_my_mac_lsb->ref_count);
      _SOC_IF_ERR_EXIT(shr_sw_state_allocated_size_get (unit, (uint8*)sw_state[unit]->dpp.soc.arad.pp->oam_my_mac_lsb->ref_count, &allocated_size));
      SW_STATE_OUT_OF_BOUND_CHECK( ref_count_idx_0, allocated_size /
          sizeof(*(sw_state[unit]->dpp.soc.arad.pp->oam_my_mac_lsb->ref_count)) - 1, "ref_count");
  
      SW_STATE_NULL_ACCESS_CHECK(sw_state[unit]->dpp.soc.arad.pp->oam_my_mac_lsb->ref_count[ref_count_idx_0]);
      _SOC_IF_ERR_EXIT(shr_sw_state_allocated_size_get (unit, (uint8*)sw_state[unit]->dpp.soc.arad.pp->oam_my_mac_lsb->ref_count[ref_count_idx_0], &allocated_size));
      SW_STATE_OUT_OF_BOUND_CHECK( ref_count_idx_1, allocated_size /
          sizeof(*(sw_state[unit]->dpp.soc.arad.pp->oam_my_mac_lsb->ref_count[ref_count_idx_0])) - 1, "ref_count");
      SW_STATE_FUNC_RETURN;
  }
  
  #endif /* defined(BCM_PETRA_SUPPORT)*/ 
  #endif /* BCM_PETRA_SUPPORT*/ 
  
  
  int
  sw_state_dpp_soc_arad_pp_oam_my_mac_lsb_access_cb_init(int unit){
  #ifdef BCM_PETRA_SUPPORT
  #if defined(BCM_PETRA_SUPPORT)
      sw_state_access[unit].dpp.soc.arad.pp.oam_my_mac_lsb.alloc = sw_state_dpp_soc_arad_pp_oam_my_mac_lsb_alloc;
  #endif /* defined(BCM_PETRA_SUPPORT)*/ 
  #endif /* BCM_PETRA_SUPPORT*/ 
  #ifdef BCM_PETRA_SUPPORT
  #if defined(BCM_PETRA_SUPPORT)
      sw_state_access[unit].dpp.soc.arad.pp.oam_my_mac_lsb.is_allocated = sw_state_dpp_soc_arad_pp_oam_my_mac_lsb_is_allocated;
  #endif /* defined(BCM_PETRA_SUPPORT)*/ 
  #endif /* BCM_PETRA_SUPPORT*/ 
  #ifdef BCM_PETRA_SUPPORT
  #if defined(BCM_PETRA_SUPPORT)
      sw_state_access[unit].dpp.soc.arad.pp.oam_my_mac_lsb.free = sw_state_dpp_soc_arad_pp_oam_my_mac_lsb_free;
  #endif /* defined(BCM_PETRA_SUPPORT)*/ 
  #endif /* BCM_PETRA_SUPPORT*/ 
  #ifdef BCM_PETRA_SUPPORT
  #if defined(BCM_PETRA_SUPPORT)
      sw_state_access[unit].dpp.soc.arad.pp.oam_my_mac_lsb.verify = sw_state_dpp_soc_arad_pp_oam_my_mac_lsb_verify;
  #endif /* defined(BCM_PETRA_SUPPORT)*/ 
  #endif /* BCM_PETRA_SUPPORT*/ 
  #ifdef BCM_PETRA_SUPPORT
  #if defined(BCM_PETRA_SUPPORT)
      sw_state_access[unit].dpp.soc.arad.pp.oam_my_mac_lsb.ref_count.set = sw_state_dpp_soc_arad_pp_oam_my_mac_lsb_ref_count_set;
  #endif /* defined(BCM_PETRA_SUPPORT)*/ 
  #endif /* BCM_PETRA_SUPPORT*/ 
  #ifdef BCM_PETRA_SUPPORT
  #if defined(BCM_PETRA_SUPPORT)
      sw_state_access[unit].dpp.soc.arad.pp.oam_my_mac_lsb.ref_count.get = sw_state_dpp_soc_arad_pp_oam_my_mac_lsb_ref_count_get;
  #endif /* defined(BCM_PETRA_SUPPORT)*/ 
  #endif /* BCM_PETRA_SUPPORT*/ 
  #ifdef BCM_PETRA_SUPPORT
  #if defined(BCM_PETRA_SUPPORT)
      sw_state_access[unit].dpp.soc.arad.pp.oam_my_mac_lsb.ref_count.alloc = sw_state_dpp_soc_arad_pp_oam_my_mac_lsb_ref_count_alloc;
  #endif /* defined(BCM_PETRA_SUPPORT)*/ 
  #endif /* BCM_PETRA_SUPPORT*/ 
  #ifdef BCM_PETRA_SUPPORT
  #if defined(BCM_PETRA_SUPPORT)
      sw_state_access[unit].dpp.soc.arad.pp.oam_my_mac_lsb.ref_count.is_allocated = sw_state_dpp_soc_arad_pp_oam_my_mac_lsb_ref_count_is_allocated;
  #endif /* defined(BCM_PETRA_SUPPORT)*/ 
  #endif /* BCM_PETRA_SUPPORT*/ 
  #ifdef BCM_PETRA_SUPPORT
  #if defined(BCM_PETRA_SUPPORT)
      sw_state_access[unit].dpp.soc.arad.pp.oam_my_mac_lsb.ref_count.free = sw_state_dpp_soc_arad_pp_oam_my_mac_lsb_ref_count_free;
  #endif /* defined(BCM_PETRA_SUPPORT)*/ 
  #endif /* BCM_PETRA_SUPPORT*/ 
  #ifdef BCM_PETRA_SUPPORT
  #if defined(BCM_PETRA_SUPPORT)
      sw_state_access[unit].dpp.soc.arad.pp.oam_my_mac_lsb.ref_count.ptr_alloc = sw_state_dpp_soc_arad_pp_oam_my_mac_lsb_ref_count_ptr_alloc;
  #endif /* defined(BCM_PETRA_SUPPORT)*/ 
  #endif /* BCM_PETRA_SUPPORT*/ 
  #ifdef BCM_PETRA_SUPPORT
  #if defined(BCM_PETRA_SUPPORT)
      sw_state_access[unit].dpp.soc.arad.pp.oam_my_mac_lsb.ref_count.ptr_free = sw_state_dpp_soc_arad_pp_oam_my_mac_lsb_ref_count_ptr_free;
  #endif /* defined(BCM_PETRA_SUPPORT)*/ 
  #endif /* BCM_PETRA_SUPPORT*/ 
  #ifdef BCM_PETRA_SUPPORT
  #if defined(BCM_PETRA_SUPPORT)
      sw_state_access[unit].dpp.soc.arad.pp.oam_my_mac_lsb.ref_count.verify = sw_state_dpp_soc_arad_pp_oam_my_mac_lsb_ref_count_verify;
  #endif /* defined(BCM_PETRA_SUPPORT)*/ 
  #endif /* BCM_PETRA_SUPPORT*/ 
      return _SHR_E_NONE;
  }
  
  #undef _ERR_MSG_MODULE_NAME
  