libsstvenc
Asynchronous Analogue SSTV encoder
Loading...
Searching...
No Matches
Pulse Shaper States
Collaboration diagram for Pulse Shaper States:

Macros

#define SSTVENC_PS_PHASE_INIT   (0)
 
#define SSTVENC_PS_PHASE_RISE   (1)
 
#define SSTVENC_PS_PHASE_HOLD   (2)
 
#define SSTVENC_PS_PHASE_FALL   (3)
 
#define SSTVENC_PS_PHASE_DONE   (4)
 

Detailed Description

Macro Definition Documentation

◆ SSTVENC_PS_PHASE_DONE

#define SSTVENC_PS_PHASE_DONE   (4)

Pulse finished. The state machine will reset sstvenc_pulseshape::sample_idx to zero on entering this state and will increment it each sample whilst keeping sstvenc_pulseshape::output at zero.

Definition at line 75 of file pulseshape.h.

Referenced by sstvenc_cw_handle_state_mark(), sstvenc_modulator_fill_buffer(), sstvenc_ps_advance(), sstvenc_ps_compute(), sstvenc_psosc_fill_buffer(), and sstvenc_sequencer_compute().

◆ SSTVENC_PS_PHASE_FALL

#define SSTVENC_PS_PHASE_FALL   (3)

Falling slope. The amplitude is being wound down to zero.

The counter sstvenc_pulseshape::sample_idx is used to track the fall. When it reaches or exceeds sstvenc_pulseshape::fall_sz, the state machine resets the counter and advances to SSTVENC_PS_PHASE_DONE.

Definition at line 67 of file pulseshape.h.

Referenced by sstvenc_cw_handle_state_mark(), sstvenc_modulator_compute(), sstvenc_modulator_next_hold_sample(), and sstvenc_ps_compute().

◆ SSTVENC_PS_PHASE_HOLD

#define SSTVENC_PS_PHASE_HOLD   (2)

Hold state. We maintain the pulse amplitude at its maximum for the duration of the pulse.

The counter sstvenc_pulseshape::sample_idx is used to track the time period spent at maximum amplitude. If sstvenc_pulseshape::hold_sz is finite, the counter is reset and the state machine advanced to SSTVENC_PS_PHASE_FALL once it reaches or exceeds sstvenc_pulseshape::hold_sz.

Otherwise, it will stay in this state indefinitely, code must call sstvenc_ps_advance manually to exit the hold state.

Definition at line 58 of file pulseshape.h.

Referenced by sstvenc_cw_handle_state_mark(), sstvenc_modulator_compute(), and sstvenc_ps_compute().

◆ SSTVENC_PS_PHASE_INIT

#define SSTVENC_PS_PHASE_INIT   (0)

Initial state. No samples have been emitted yet. sstvenc_ps_compute immediately moves the state machine to SSTVENC_PS_PHASE_RISE and handles the machine accordingly.

Definition at line 35 of file pulseshape.h.

Referenced by sstvenc_cw_handle_state_mark(), sstvenc_modulator_compute(), sstvenc_ps_compute(), and sstvenc_ps_reset_samples().

◆ SSTVENC_PS_PHASE_RISE

#define SSTVENC_PS_PHASE_RISE   (1)

Rising slope. The amplitude is being ramped up to maximum.

The counter sstvenc_pulseshape::sample_idx is used to track the rise. When it reaches or exceeds sstvenc_pulseshape::rise_sz, the state machine resets the counter and advances to SSTVENC_PS_PHASE_HOLD.

Definition at line 44 of file pulseshape.h.

Referenced by sstvenc_cw_handle_state_mark(), sstvenc_modulator_compute(), and sstvenc_ps_compute().