Go to the source code of this file.
|
| CsrWifiFsmContext * | CsrWifiFsmInit (void *applicationContext, void *externalContext, u16 maxProcesses, CsrLogTextTaskId loggingTaskId) |
| | Initialises a top level FSM context.
|
| |
| void | CsrWifiFsmReset (CsrWifiFsmContext *context) |
| | Resets the FSM's back to first conditions.
|
| |
| void | CsrWifiFsmShutdown (CsrWifiFsmContext *context) |
| | Frees resources allocated by CsrWifiFsmInit.
|
| |
| u32 | CsrWifiFsmExecute (CsrWifiFsmContext *context) |
| | Executes the fsm context.
|
| |
| void | CsrWifiFsmSendEventExternal (CsrWifiFsmContext *context, CsrWifiFsmEvent *event, u16 source, u16 destination, CsrPrim primtype, u16 id) |
| | Adds an event to the FSM context's external event queue for processing.
|
| |
| u32 | CsrWifiFsmGetTimeOfDayMs (CsrWifiFsmContext *context) |
| | Current time of day in ms.
|
| |
| u32 | CsrWifiFsmGetNextTimeout (CsrWifiFsmContext *context) |
| | Gets the time until the next FSM timer expiry.
|
| |
| void | CsrWifiFsmFastForward (CsrWifiFsmContext *context, u16 ms) |
| | Fast forwards the fsm timers by ms Milliseconds.
|
| |
| void | CsrWifiFsmTestAdvanceTime (CsrWifiFsmContext *context, u32 ms) |
| | shift the current time of day by ms amount
|
| |
| u8 | CsrWifiFsmHasEvents (CsrWifiFsmContext *context) |
| | Check if the fsm has events to process.
|
| |
| void | CsrWifiFsmInstallWakeupCallback (CsrWifiFsmContext *context, CsrWifiFsmExternalWakupCallbackPtr callback) |
| | function that installs the contexts wakeup function
|
| |
| #define CSR_WIFI_FSM_ENV (0xFFFF) |
| #define CsrWifiFsmSendAlienEventExternal |
( |
|
_context, |
|
|
|
_alienEvent, |
|
|
|
_source, |
|
|
|
_destination, |
|
|
|
_primtype, |
|
|
|
_id |
|
) |
| |
Value:
_evt->alienEvent = _alienEvent; \
CsrWifiFsmSendEventExternal(_context, (
CsrWifiFsmEvent *)_evt, _source, _destination, _primtype, _id); \
}
Adds an Alien event to the FSM context's external event queue for processing.
- Description
- Adds an event to the contexts external queue This is thread safe and adds an event to the fsm's external event queue.
- Parameters
-
| [in] | context | : FSM context |
| [in] | event | : event to add to the event queue |
| [in] | source | : source of the event (this can be a synergy task queue or an fsm instance id) |
| [in] | destination | : destination of the event (This can be a fsm instance id or CSR_WIFI_FSM_ENV) |
| [in] | id | : event id |
Definition at line 160 of file csr_wifi_fsm.h.
Toplevel FSM context data.
- Description
- Holds ALL FSM static and dynamic data for a FSM
Definition at line 34 of file csr_wifi_fsm.h.
FSM External Wakeup CallbackFunction Pointer.
- Description
- Defines the external wakeup function for the FSM to call when an external event is injected into the systen
- Parameters
-
| [in] | context | : External context |
- Returns
- void
Definition at line 49 of file csr_wifi_fsm.h.
Executes the fsm context.
- Description
- Executes the FSM context and runs until ALL events in the context are processed. When no more events are left to process then CsrWifiFsmExecute() returns to a time specifying when to next call the CsrWifiFsmExecute() Scheduling, threading, blocking and external event notification are outside the scope of the FSM and CsrWifiFsmExecute().
- Parameters
-
- Returns
- u32 Time in ms until next timeout or 0xFFFFFFFF for no timer set
Fast forwards the fsm timers by ms Milliseconds.
- Parameters
-
| [in] | context | : FSM context |
| [in] | ms | : Milliseconds to fast forward by |
- Returns
- void
Gets the time until the next FSM timer expiry.
- Description
- Returns the next timeout time or 0 if no timers are set.
- Parameters
-
- Returns
- u32 Time in ms until next timeout or 0xFFFFFFFF for no timer set
Current time of day in ms.
- Parameters
-
- Returns
- u32 32 bit ms tick
Check if the fsm has events to process.
- Parameters
-
- Returns
- u8 returns TRUE if there are events for the FSM to process
Initialises a top level FSM context.
- Description
- Initialises the FSM Context to an initial state and allocates space for "maxProcesses" number of instances
- Parameters
-
| [in] | osaContext | : OSA context |
| [in] | applicationContext | : Internal fsm application context |
| [in] | externalContext | : External context |
| [in] | maxProcesses | : Max processes to allocate room for |
- Returns
- CsrWifiFsmContext* fsm context
function that installs the contexts wakeup function
- Parameters
-
| [in] | context | : FSM context |
| [in] | callback | : Callback function pointer |
- Returns
- void
Adds an event to the FSM context's external event queue for processing.
- Description
- Adds an event to the contexts external queue This is thread safe and adds an event to the fsm's external event queue.
- Parameters
-
| [in] | context | : FSM context |
| [in] | event | : event to add to the event queue |
| [in] | source | : source of the event (this can be a synergy task queue or an fsm instance id) |
| [in] | destination | : destination of the event (This can be a fsm instance id or CSR_WIFI_FSM_ENV) |
| [in] | id | : event id |
- Returns
- void
shift the current time of day by ms amount
- Description
- usefull to speed up tests where time needs to pass
- Parameters
-
| [in] | context | : FSM context |
| [in] | ms | : ms to adjust time by |
- Returns
- void