QcControlActiveCommand Struct
A control request that completes on a later tick. More...
| Header: | #include <clientcore/control/QcControlActiveCommand.h> |
Public Variables
| int | remainingTicks |
| QJsonObject | request |
| std::function<QJsonObject ()> | result |
| std::function<bool ()> | step |
Static Public Members
| int | timeoutPolls(int ticks) |
Detailed Description
Member Function Documentation
[static constexpr] int QcControlActiveCommand::timeoutPolls(int ticks)
Returns the poll intervals a command of ticks ticks gets: tick-based commands fail when the session stops ticking (e.g. while loading) for much longer than asked.
Member Variable Documentation
int QcControlActiveCommand::remainingTicks
Poll intervals left before the command fails with a timeout.
QJsonObject QcControlActiveCommand::request
The request the command answers.
std::function<QJsonObject ()> QcControlActiveCommand::result
Response of a completed command; the player status when unset. The initializer lets commands leave it out without -Wmissing-field-initializers.
std::function<bool ()> QcControlActiveCommand::step
Called every tick; returns true when the command is complete.