QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
InternalTransition Class Reference

#include <InternalTransition.h>

+ Inheritance diagram for InternalTransition:
+ Collaboration diagram for InternalTransition:

Public Types

using Action = std::function< void()>
 

Public Member Functions

template<typename Func >
 InternalTransition (const typename QtPrivate::FunctionPointer< Func >::Object *sender, Func signalFn, Action action=nullptr)
 
- Public Member Functions inherited from QGCSignalTransition
 QGCSignalTransition (QState *sourceState=nullptr)
 
 QGCSignalTransition (const QObject *sender, const char *signal, QState *sourceState=nullptr)
 
template<typename Func >
 QGCSignalTransition (const typename QtPrivate::FunctionPointer< Func >::Object *sender, Func signalFn, QState *sourceState=nullptr)
 
QGCStateMachinemachine () const
 Get the QGCStateMachine this transition belongs to.
 
Vehiclevehicle () const
 Get the Vehicle associated with the state machine.
 

Protected Member Functions

void onTransition (QEvent *event) override
 

Detailed Description

Transition that fires without exiting/re-entering the current state Useful for handling repeated signals (like heartbeats) without state churn. The action is executed but no state exit/entry occurs.

Definition at line 10 of file InternalTransition.h.

Member Typedef Documentation

◆ Action

using InternalTransition::Action = std::function<void()>

Definition at line 16 of file InternalTransition.h.

Constructor & Destructor Documentation

◆ InternalTransition()

template<typename Func >
InternalTransition::InternalTransition ( const typename QtPrivate::FunctionPointer< Func >::Object *  sender,
Func  signalFn,
Action  action = nullptr 
)
inline

Create an internal transition with an action

Parameters
senderThe object that emits the signal
signalThe signal to listen for
actionFunction to execute when transition fires (optional)

Definition at line 23 of file InternalTransition.h.

Member Function Documentation

◆ onTransition()

void InternalTransition::onTransition ( QEvent *  event)
overrideprotected

Definition at line 4 of file InternalTransition.cc.


The documentation for this class was generated from the following files: