sw_state_exm_access.h (3909B)
1 /* 2 * 3 * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file. 4 * 5 * Copyright 2007-2019 Broadcom Inc. All rights reserved. 6 * 7 * DO NOT EDIT THIS FILE! 8 * This file is auto-generated. 9 * Edits to this file will be lost when it is regenerated. 10 * search for 'sw_state_cbs_t' for the root of the struct 11 */ 12 13 #ifndef _SHR_SW_STATE_EXM_ACCESS_H_ 14 #define _SHR_SW_STATE_EXM_ACCESS_H_ 15 16 #include <shared/swstate/access/sw_state_exm_twoLevelsArr_access.h> 17 #include <shared/swstate/access/sw_state_exm_twoLevelsArrArr_access.h> 18 #include <shared/swstate/access/sw_state_exm_twoLevelsArrPtr_access.h> 19 #include <shared/swstate/access/sw_state_exm_twoLevelsPtr_access.h> 20 #include <shared/swstate/access/sw_state_exm_twoLevelsRegular_access.h> 21 #include <shared/swstate/access/sw_state_exm_twoLevelsRegularAllowWbAccess_access.h> 22 #include <shared/swstate/access/sw_state_exm_twoLevelsSinglePtr_access.h> 23 #include <shared/swstate/access/sw_state_exm_twoLevelsStaticArrArr_access.h> 24 #include <shared/swstate/access/sw_state_exm_twoLevelsStaticArrInt_access.h> 25 /********************************* access calbacks definitions *************************************/ 26 /* this set of callbacks, are the callbacks used in the access calbacks struct 'sw_state_cbs_t' to */ 27 /* access the data in 'sw_state_t'. */ 28 /* the calbacks are inserted into the access struct by 'sw_state_access_cb_init'. */ 29 /***************************************************************************************************/ 30 31 #ifdef _SHR_SW_STATE_EXM 32 /* implemented by: sw_state_exm_alloc */ 33 typedef int (*sw_state_exm_alloc_cb)( 34 int unit); 35 #endif /* _SHR_SW_STATE_EXM*/ 36 37 #ifdef _SHR_SW_STATE_EXM 38 /* implemented by: sw_state_exm_is_allocated */ 39 typedef int (*sw_state_exm_is_allocated_cb)( 40 int unit, uint8 *is_allocated); 41 #endif /* _SHR_SW_STATE_EXM*/ 42 43 #ifdef _SHR_SW_STATE_EXM 44 /* implemented by: sw_state_exm_free */ 45 typedef int (*sw_state_exm_free_cb)( 46 int unit); 47 #endif /* _SHR_SW_STATE_EXM*/ 48 49 #ifdef _SHR_SW_STATE_EXM 50 /* implemented by: sw_state_exm_verify */ 51 typedef int (*sw_state_exm_verify_cb)( 52 int unit); 53 #endif /* _SHR_SW_STATE_EXM*/ 54 55 /*********************************** access calbacks struct ****************************************/ 56 /* this set of structs, rooted at 'sw_state_cbs_t' define the access layer for the entire SW state.*/ 57 /* use this tree to alloc/free/set/get fields in the sw state rooted at 'sw_state_t'. */ 58 /* NOTE: 'sw_state_t' data should not be accessed directly. */ 59 /***************************************************************************************************/ 60 61 #ifdef _SHR_SW_STATE_EXM 62 typedef struct sw_state_exm_cbs_s { 63 #ifdef _SHR_SW_STATE_EXM 64 sw_state_exm_alloc_cb alloc; 65 #endif /* _SHR_SW_STATE_EXM*/ 66 #ifdef _SHR_SW_STATE_EXM 67 sw_state_exm_is_allocated_cb is_allocated; 68 #endif /* _SHR_SW_STATE_EXM*/ 69 #ifdef _SHR_SW_STATE_EXM 70 sw_state_exm_free_cb free; 71 #endif /* _SHR_SW_STATE_EXM*/ 72 #ifdef _SHR_SW_STATE_EXM 73 sw_state_exm_verify_cb verify; 74 #endif /* _SHR_SW_STATE_EXM*/ 75 sw_state_exm_twoLevelsRegular_cbs_t twoLevelsRegular; 76 sw_state_exm_twoLevelsSinglePtr_cbs_t twoLevelsSinglePtr; 77 sw_state_exm_twoLevelsStaticArrInt_cbs_t twoLevelsStaticArrInt; 78 sw_state_exm_twoLevelsStaticArrArr_cbs_t twoLevelsStaticArrArr; 79 sw_state_exm_twoLevelsPtr_cbs_t twoLevelsPtr; 80 sw_state_exm_twoLevelsArr_cbs_t twoLevelsArr; 81 sw_state_exm_twoLevelsArrArr_cbs_t twoLevelsArrArr; 82 sw_state_exm_twoLevelsArrPtr_cbs_t twoLevelsArrPtr; 83 sw_state_exm_twoLevelsRegularAllowWbAccess_cbs_t twoLevelsRegularAllowWbAccess; 84 } sw_state_exm_cbs_t; 85 86 #endif /* _SHR_SW_STATE_EXM*/ 87 88 int sw_state_exm_access_cb_init(int unit); 89 90 #endif /* _SHR_SW_STATE_EXM_ACCESS_H_ */