Class nebula::drivers::FsmCutInFov
ClassList > nebula > drivers > FsmCutInFov
FSM for scan cutting when the cut angle is within the field of view (360° FoV or cut inside limited FoV). This is the simpler 4-state FSM. More...
#include <fsm_cut_in_fov.hpp>
Public Types
| Type | Name |
|---|---|
| typedef scan_cutter::AllSame< T > | AllSame |
| typedef scan_cutter::ChannelBufferState | ChannelBufferState |
| typedef scan_cutter::Different | Different |
| enum uint8_t | State |
| typedef scan_cutter::TransitionActions | TransitionActions |
| typedef scan_cutter::buffer_index_t | buffer_index_t |
Public Static Functions
| Type | Name |
|---|---|
| State | determine_state (const ChannelBufferState & buffer_state, buffer_index_t current_buffer) Determine the FSM state from the buffer state and current active buffer. |
| TransitionActions | get_transition_actions (State state_before, State state_after) Compute the transition actions based on state change. |
| TransitionActions | step (const ChannelBufferState & buffer_state_before, const ChannelBufferState & buffer_state_after, buffer_index_t current_buffer) Step the FSM and return the actions to perform. |
Detailed Description
States: * F0: All channels in buffer 0 (Filled 0) * C0_1: Channels split, transitioning from buffer 0 to buffer 1 (Crossing 0->1) * F1: All channels in buffer 1 (Filled 1) * C1_0: Channels split, transitioning from buffer 1 to buffer 0 (Crossing 1->0)
Transition table (From columns, To rows):
| To \ From | F0 | C0_1 | F1 | C1_0 |
|---|---|---|---|---|
| F0 | - | T0, E1 | E1 | |
| C0_1 | T1 | - | ⛔ | |
| F1 | T1, E0 | E0 | - | |
| C1_0 | ⛔ | T0 | - |
Public Types Documentation
typedef AllSame
using nebula::drivers::FsmCutInFov::AllSame = scan_cutter::AllSame<T>;
typedef ChannelBufferState
using nebula::drivers::FsmCutInFov::ChannelBufferState = scan_cutter::ChannelBufferState;
typedef Different
using nebula::drivers::FsmCutInFov::Different = scan_cutter::Different;
enum State
enum nebula::drivers::FsmCutInFov::State {
F0,
C0_1,
F1,
C1_0
};
typedef TransitionActions
using nebula::drivers::FsmCutInFov::TransitionActions = scan_cutter::TransitionActions;
typedef buffer_index_t
using nebula::drivers::FsmCutInFov::buffer_index_t = scan_cutter::buffer_index_t;
Public Static Functions Documentation
function determine_state
Determine the FSM state from the buffer state and current active buffer.
static inline State nebula::drivers::FsmCutInFov::determine_state (
const ChannelBufferState & buffer_state,
buffer_index_t current_buffer
)
Parameters:
buffer_stateThe current buffer state (AllSame or Different).current_bufferThe current active buffer index.
Returns:
The FSM state.
function get_transition_actions
Compute the transition actions based on state change.
static inline TransitionActions nebula::drivers::FsmCutInFov::get_transition_actions (
State state_before,
State state_after
)
Parameters:
state_beforeThe FSM state before the update.state_afterThe FSM state after the update.
Returns:
The transition actions to perform.
function step
Step the FSM and return the actions to perform.
static inline TransitionActions nebula::drivers::FsmCutInFov::step (
const ChannelBufferState & buffer_state_before,
const ChannelBufferState & buffer_state_after,
buffer_index_t current_buffer
)
Parameters:
buffer_state_beforeBuffer state before the azimuth update.buffer_state_afterBuffer state after the azimuth update.current_bufferThe current active buffer index.
Returns:
The transition actions to perform.
The documentation for this class was generated from the following file src/nebula_core/nebula_core_decoders/include/nebula_core_decoders/scan_cutter/fsm_cut_in_fov.hpp