Sends the specified MAVLink message to the vehicle. More...
#include <SendMavlinkMessageState.h>
Public Types | |
| using | MessageEncoder = std::function<void(quint32 systemId, uint8_t channel, mavlink_message_t* message)> |
| Public Types inherited from QGCAbstractState | |
| using | EntryCallback = std::function<void()> |
| using | ExitCallback = std::function<void()> |
| using | EventHandler = std::function<bool(QEvent*)> |
Public Member Functions | |
| SendMavlinkMessageState (QState *parent, MessageEncoder encoder, int retryCount) | |
| Public Member Functions inherited from QGCState | |
| QGCState (const QString &stateName, QState *parentState) | |
| template<typename PointerToMemberFunction> | |
| QSignalTransition * | addThisTransition (PointerToMemberFunction signal, QAbstractState *target) |
| Simpler version of QState::addTransition which assumes the sender is this. | |
| void | setLocalErrorState (QAbstractState *errorState) |
| QAbstractState * | localErrorState () const |
| Get the per-state error state (nullptr if using global). | |
| void | setProperty (QObject *object, const char *name, const QVariant &value) |
| void | setEnabled (QObject *object, bool enabled) |
| Convenience overload for setting enabled state on widgets/controls. | |
| void | setVisible (QObject *object, bool visible) |
| Convenience overload for setting visible state on widgets/controls. | |
| Public Member Functions inherited from QGCAbstractState | |
| QGCAbstractState (const QString &stateName, QState *parent) | |
| QGCStateMachine * | machine () const |
| Vehicle * | vehicle () const |
| QString | stateName () const |
| class StateContext * | context () const |
| void | setOnEntry (EntryCallback callback) |
| Set a callback to be invoked when the state is entered. | |
| void | setOnExit (ExitCallback callback) |
| Set a callback to be invoked when the state is exited. | |
| void | setCallbacks (EntryCallback onEntry, ExitCallback onExit=nullptr) |
| Set both entry and exit callbacks. | |
| void | setEventHandler (EventHandlerEventHandler handler) |
| Set a custom event handler for this state. | |
Additional Inherited Members | |
| Signals inherited from QGCAbstractState | |
| void | advance () |
| void | error () |
| Protected Member Functions inherited from QGCAbstractState | |
| virtual void | onEnter () |
| Override to perform actions on state entry. | |
| virtual void | onLeave () |
| Override to perform actions on state exit. | |
| void | onEntry (QEvent *event) override |
| void | onExit (QEvent *event) override |
| bool | event (QEvent *event) override |
Sends the specified MAVLink message to the vehicle.
Definition at line 13 of file SendMavlinkMessageState.h.
| using SendMavlinkMessageState::MessageEncoder = std::function<void(quint32 systemId, uint8_t channel, mavlink_message_t* message)> |
Definition at line 19 of file SendMavlinkMessageState.h.
| SendMavlinkMessageState::SendMavlinkMessageState | ( | QState * | parent, |
| MessageEncoder | encoder, | ||
| int | retryCount ) |
| encoder | Function which encodes the MAVLink message to send |
| retryCount | Number of times to retry sending the message on failure |
Definition at line 8 of file SendMavlinkMessageState.cc.
References QGCState::QGCState().