Ardour  9.0-pre0-582-g084a23a80d
ARDOUR::TransportFSM Struct Reference

#include <transport_fsm.h>

Classes

struct  Event
 

Public Types

enum  EventType {
  ButlerDone , ButlerRequired , DeclickDone , StartTransport ,
  StopTransport , Locate , LocateDone , SetSpeed
}
 
enum  MotionState {
  Stopped , Rolling , DeclickToStop , DeclickToLocate ,
  WaitingForLocate
}
 
enum  ButlerState { NotWaitingForButler , WaitingForButler }
 
enum  DirectionState { Forwards , Backwards , Reversing }
 

Public Member Functions

 TransportFSM (TransportAPI &tapi)
 
void hard_stop ()
 
void start ()
 
void stop ()
 
std::string current_state () const
 
double transport_speed () const
 
double default_speed () const
 
void set_default_speed (double spd) const
 
bool locating () const
 
bool rolling () const
 
bool stopped () const
 
bool stopping () const
 
bool waiting_for_butler () const
 
bool declick_in_progress () const
 
bool declicking_for_locate () const
 
bool forwards () const
 
bool backwards () const
 
bool reversing () const
 
bool will_roll_forwards () const
 
void enqueue (Event *ev)
 

Private Types

typedef boost::intrusive::list< EventEventList
 

Private Member Functions

void init ()
 
void schedule_butler_for_transport_work () const
 
void start_playback ()
 
void stop_playback (Event const &)
 
void start_locate_after_declick ()
 
void locate_for_loop (Event const &)
 
void roll_after_locate () const
 
void start_locate_while_stopped (Event const &) const
 
void interrupt_locate (Event const &) const
 
void start_declick_for_locate (Event const &)
 
bool set_speed (Event const &)
 
bool should_roll_after_locate () const
 
bool should_not_roll_after_locate () const
 
void transition (MotionState)
 
void transition (ButlerState)
 
void transition (DirectionState)
 
void process_events ()
 
bool process_event (Event &, bool was_deferred, bool &deferred)
 
void defer (Event &ev)
 
void bad_transition (Event const &)
 
void set_roll_after (bool) const
 
bool compute_should_roll (LocateTransportDisposition) const
 
int compute_transport_speed () const
 
bool maybe_reset_speed ()
 

Private Attributes

MotionState _motion_state
 
ButlerState _butler_state
 
DirectionState _direction_state
 
double _transport_speed
 
Event _last_locate
 
TransportAPIapi
 
EventList queued_events
 
EventList deferred_events
 
int processing
 
std::optional< bool > current_roll_after_locate_status
 
double most_recently_requested_speed
 
double _default_speed
 
int _reverse_after_declick
 

Detailed Description

Definition at line 25 of file transport_fsm.h.

Member Typedef Documentation

◆ EventList

typedef boost::intrusive::list<Event> ARDOUR::TransportFSM::EventList
private

Definition at line 208 of file transport_fsm.h.

Member Enumeration Documentation

◆ ButlerState

Enumerator
NotWaitingForButler 
WaitingForButler 

Definition at line 137 of file transport_fsm.h.

◆ DirectionState

Enumerator
Forwards 
Backwards 
Reversing 

Definition at line 142 of file transport_fsm.h.

◆ EventType

Enumerator
ButlerDone 
ButlerRequired 
DeclickDone 
StartTransport 
StopTransport 
Locate 
LocateDone 
SetSpeed 

Definition at line 35 of file transport_fsm.h.

◆ MotionState

Enumerator
Stopped 
Rolling 
DeclickToStop 
DeclickToLocate 
WaitingForLocate 

Definition at line 129 of file transport_fsm.h.

Constructor & Destructor Documentation

◆ TransportFSM()

ARDOUR::TransportFSM::TransportFSM ( TransportAPI tapi)

Member Function Documentation

◆ backwards()

bool ARDOUR::TransportFSM::backwards ( ) const
inline

Definition at line 190 of file transport_fsm.h.

◆ bad_transition()

void ARDOUR::TransportFSM::bad_transition ( Event const &  )
private

◆ compute_should_roll()

bool ARDOUR::TransportFSM::compute_should_roll ( LocateTransportDisposition  ) const
private

◆ compute_transport_speed()

int ARDOUR::TransportFSM::compute_transport_speed ( ) const
private

◆ current_state()

std::string ARDOUR::TransportFSM::current_state ( ) const

◆ declick_in_progress()

bool ARDOUR::TransportFSM::declick_in_progress ( ) const
inline

Definition at line 187 of file transport_fsm.h.

◆ declicking_for_locate()

bool ARDOUR::TransportFSM::declicking_for_locate ( ) const
inline

Definition at line 188 of file transport_fsm.h.

◆ default_speed()

double ARDOUR::TransportFSM::default_speed ( ) const
inline

Definition at line 152 of file transport_fsm.h.

◆ defer()

void ARDOUR::TransportFSM::defer ( Event ev)
private

◆ enqueue()

void ARDOUR::TransportFSM::enqueue ( Event ev)

◆ forwards()

bool ARDOUR::TransportFSM::forwards ( ) const
inline

Definition at line 189 of file transport_fsm.h.

◆ hard_stop()

void ARDOUR::TransportFSM::hard_stop ( )

◆ init()

void ARDOUR::TransportFSM::init ( )
private

◆ interrupt_locate()

void ARDOUR::TransportFSM::interrupt_locate ( Event const &  ) const
private

◆ locate_for_loop()

void ARDOUR::TransportFSM::locate_for_loop ( Event const &  )
private

◆ locating()

bool ARDOUR::TransportFSM::locating ( ) const
inline

Definition at line 182 of file transport_fsm.h.

◆ maybe_reset_speed()

bool ARDOUR::TransportFSM::maybe_reset_speed ( )
private

◆ process_event()

bool ARDOUR::TransportFSM::process_event ( Event ,
bool  was_deferred,
bool &  deferred 
)
private

◆ process_events()

void ARDOUR::TransportFSM::process_events ( )
private

◆ reversing()

bool ARDOUR::TransportFSM::reversing ( ) const
inline

Definition at line 191 of file transport_fsm.h.

◆ roll_after_locate()

void ARDOUR::TransportFSM::roll_after_locate ( ) const
private

◆ rolling()

bool ARDOUR::TransportFSM::rolling ( ) const
inline

Definition at line 183 of file transport_fsm.h.

◆ schedule_butler_for_transport_work()

void ARDOUR::TransportFSM::schedule_butler_for_transport_work ( ) const
private

◆ set_default_speed()

void ARDOUR::TransportFSM::set_default_speed ( double  spd) const
inline

Definition at line 153 of file transport_fsm.h.

◆ set_roll_after()

void ARDOUR::TransportFSM::set_roll_after ( bool  ) const
private

◆ set_speed()

bool ARDOUR::TransportFSM::set_speed ( Event const &  )
private

◆ should_not_roll_after_locate()

bool ARDOUR::TransportFSM::should_not_roll_after_locate ( ) const
inlineprivate

Definition at line 179 of file transport_fsm.h.

◆ should_roll_after_locate()

bool ARDOUR::TransportFSM::should_roll_after_locate ( ) const
private

◆ start()

void ARDOUR::TransportFSM::start ( void  )
inline

Definition at line 118 of file transport_fsm.h.

◆ start_declick_for_locate()

void ARDOUR::TransportFSM::start_declick_for_locate ( Event const &  )
private

◆ start_locate_after_declick()

void ARDOUR::TransportFSM::start_locate_after_declick ( )
private

◆ start_locate_while_stopped()

void ARDOUR::TransportFSM::start_locate_while_stopped ( Event const &  ) const
private

◆ start_playback()

void ARDOUR::TransportFSM::start_playback ( )
private

◆ stop()

void ARDOUR::TransportFSM::stop ( void  )
inline

Definition at line 122 of file transport_fsm.h.

◆ stop_playback()

void ARDOUR::TransportFSM::stop_playback ( Event const &  )
private

◆ stopped()

bool ARDOUR::TransportFSM::stopped ( ) const
inline

Definition at line 184 of file transport_fsm.h.

◆ stopping()

bool ARDOUR::TransportFSM::stopping ( ) const
inline

Definition at line 185 of file transport_fsm.h.

◆ transition() [1/3]

void ARDOUR::TransportFSM::transition ( ButlerState  )
private

◆ transition() [2/3]

void ARDOUR::TransportFSM::transition ( DirectionState  )
private

◆ transition() [3/3]

void ARDOUR::TransportFSM::transition ( MotionState  )
private

◆ transport_speed()

double ARDOUR::TransportFSM::transport_speed ( ) const
inline

Definition at line 150 of file transport_fsm.h.

◆ waiting_for_butler()

bool ARDOUR::TransportFSM::waiting_for_butler ( ) const
inline

Definition at line 186 of file transport_fsm.h.

◆ will_roll_forwards()

bool ARDOUR::TransportFSM::will_roll_forwards ( ) const

Member Data Documentation

◆ _butler_state

ButlerState ARDOUR::TransportFSM::_butler_state
private

Definition at line 157 of file transport_fsm.h.

◆ _default_speed

double ARDOUR::TransportFSM::_default_speed
mutableprivate

Definition at line 214 of file transport_fsm.h.

◆ _direction_state

DirectionState ARDOUR::TransportFSM::_direction_state
private

Definition at line 158 of file transport_fsm.h.

◆ _last_locate

Event ARDOUR::TransportFSM::_last_locate
mutableprivate

Definition at line 205 of file transport_fsm.h.

◆ _motion_state

MotionState ARDOUR::TransportFSM::_motion_state
private

Definition at line 156 of file transport_fsm.h.

◆ _reverse_after_declick

int ARDOUR::TransportFSM::_reverse_after_declick
private

Definition at line 215 of file transport_fsm.h.

◆ _transport_speed

double ARDOUR::TransportFSM::_transport_speed
private

Definition at line 159 of file transport_fsm.h.

◆ api

TransportAPI* ARDOUR::TransportFSM::api
private

Definition at line 207 of file transport_fsm.h.

◆ current_roll_after_locate_status

std::optional<bool> ARDOUR::TransportFSM::current_roll_after_locate_status
mutableprivate

Definition at line 212 of file transport_fsm.h.

◆ deferred_events

EventList ARDOUR::TransportFSM::deferred_events
private

Definition at line 210 of file transport_fsm.h.

◆ most_recently_requested_speed

double ARDOUR::TransportFSM::most_recently_requested_speed
mutableprivate

Definition at line 213 of file transport_fsm.h.

◆ processing

int ARDOUR::TransportFSM::processing
private

Definition at line 211 of file transport_fsm.h.

◆ queued_events

EventList ARDOUR::TransportFSM::queued_events
private

Definition at line 209 of file transport_fsm.h.


The documentation for this struct was generated from the following file: