#ifndef cp_inc_cp_h #define cp_inc_cp_h /* Cesar project {{{ * * Copyright (C) 2008 Spidcom * * <<>> * * }}} */ /** * \file cp/inc/cp_private.h * \brief Control plane context. * \ingroup cp * */ #include "lib/rnd.h" #include "mac/common/config.h" #include "interface/interface.h" #include "cl/cl.h" #include "hal/phy/phy.h" #include "hal/timer/timer.h" /* Public interfaces. */ #include "cp/sta/mgr/sta_mgr.h" #include "cp/sta/core/core.h" #include "cp/sta/action/action.h" #include "cp/cco/action/cco_action.h" #include "cp/cco/region/region.h" #include "cp/cco/bw/bw.h" #include "cp/beacon/beacon.h" #include "cp/conn/conn_mgr.h" #include "cp/cl_interf/cl_interf.h" #include "cp/fsm/forward.h" #include "cp/fsm/fsm.h" #include "cp/msg/msg.h" #include "cp/secu/secu.h" #include "ce/rx/forward.h" #include "bsu/beacon/beacon.h" #include "bsu/aclf/aclf.h" #include "bufmgr/bufmgr.h" /* Private interfaces. */ #include "cp/inc/trace.h" #include "cp/sta/mgr/inc/sta_mgr.h" #include "cp/sta/core/inc/core.h" #include "cp/sta/action/inc/context.h" #include "cp/cco/action/inc/cco_action.h" #include "cp/cco/region/inc/context.h" #include "cp/cco/bw/inc/context.h" #include "cp/beacon/inc/beacon.h" #include "cp/cl_interf/inc/context.h" #include "cp/msg/inc/context.h" #include "cp/fsm/inc/context.h" #include "ce/tx/inc/tx.h" enum cp_handover_reason_t { CP_HANDOVER_REASON_CCO_SELECTION, CP_HANDOVER_REASON_CCO_LEAVING, CP_HANDOVER_REASON_USER_APPOINT, CP_HANDOVER_REASON_NB, }; enum cp_handover_soft_hard_t { CP_HANDOVER_SOFT_HARD_SOFT, CP_HANDOVER_SOFT_HARD_HARD, CP_HANDOVER_NB, }; struct cp_handover_t { /** Handover timeout. */ cp_sta_core_timed_event_def_t handover_timeout; /** handover reason. */ enum cp_handover_reason_t reason; /** Handover soft hard */ enum cp_handover_soft_hard_t soft_hard; }; struct cp_t { #if CONFIG_TRACE /** Trace context. */ trace_buffer_t trace; /** Verbose trace context. */ trace_buffer_t trace_verbose; #endif /* CONFIG_TRACE */ /** FSM context. */ cp_fsm_t fsm; /** station core context. */ cp_sta_core_t sta_core; /** station manager context. */ cp_sta_mgr_t sta_mgr; /** CCo Action. */ cp_cco_action_t cco_action; /** Sta action. */ cp_sta_action_t sta_action; /** Beacon module. */ cp_beacon_t beacon; /** Region manager context. */ cp_cco_region_t region; /** Bandwidth Manager context. */ cp_cco_bw_t bw; /** Connection manager context. */ cp_conn_mgr_t conn_mgr; /** Cl Interface context. */ cp_cl_interf_t cl_interf; /** MSG context. */ cp_msg_t msg; /** The mac config context. */ mac_config_t *mac_config; /** The interface context. */ interface_t *interface; /** Convergence layer context. */ cl_t *cl; /** Phy context. */ phy_t *phy; /** Hal timer context. */ hal_timer_t *hal_timer; /** Mac Store. */ mac_store_t *mac_store; /** Channel access context. */ ca_t *ca; /** PBProc. */ pbproc_t *pbproc; /** SAR layer. */ sar_t *sar; /** Random generator. */ lib_rnd_t rnd; /** Handover context. */ struct cp_handover_t handover; /** Context of the CE in TX. */ ce_tx_t ce_tx; /** Context of the CE in RX. */ ce_rx_t *ce_rx; /** Context of the bsu. */ bsu_t *bsu; /** Context of the aclf. */ bsu_aclf_t *bsu_aclf; /** Context of the buffer manager. */ bufmgr_t *bufmgr; }; #endif /* cp_inc_cp_h */