trikRuntime
|
Provides backend features like Qt Script runner for frontend. More...
#include <controller.h>
Public Slots | |
void | abortExecution () |
Cancels execution of current program. More... | |
Signals | |
void | showRunningWidget (const QString &fileName, int scriptId) |
Emitted when a new script starts and therefore a running widget must be shown with the script's name. More... | |
void | hideRunningWidget (int scriptId) |
Emitted when running widget for a script with a given id must be closed. More... | |
void | showError (const QString &error, int scriptId) |
Emitted when a script stops due to an error. More... | |
void | hideGraphicsWidget () |
Emitted when a graphics widget must be closed. More... | |
void | hideScriptWidgets () |
Emitted when both graphics and running widget must be closed. More... | |
void | brickStopped () |
Emitted when brick has finished deferred deinitialization so we need to refresh display to clear possible clutter from videosensors. More... | |
void | gamepadDisconnected () |
Emitted when a robot is disconnected from a gamepad. More... | |
void | gamepadConnected () |
Emitted when a robot is connected to a gamepad. More... | |
void | wiFiConnected () |
Emitted when a robot is connected to a network. More... | |
void | wiFiDisconnected () |
Emitted when a robot is disconnected from a network. More... | |
void | communicatorStatusChanged (bool status) |
Emitted when Telemetry and Communicator servers' status changes. More... | |
void | mailboxStatusChanged (bool connected) |
Emitted when Mailbox server's status changes. More... | |
Public Member Functions | |
Controller (const QString &configPath) | |
Constructor. More... | |
~Controller () override | |
void | runFile (const QString &filePath) |
Executes specified file as Qt Script, if it has .qts extension, or as a program otherwise. More... | |
void | runScript (const QString &script) |
Executes given script. More... | |
trikControl::BrickInterface & | brick () |
Returns reference to Brick object, which provides access to robot hardware. More... | |
trikNetwork::MailboxInterface * | mailbox () |
Returns reference to Mailbox object, which provides access to robot-to-robot communications. More... | |
trikWiFi::TrikWiFi & | wiFi () |
Reference to WiFi manager. More... | |
void | doCloseRunningWidget (MainWidget &widget) |
Asks controller to correctly close given running widget. More... | |
bool | communicatorConnectionStatus () |
Returns communicator connection status (whether or not both Telemetry and Communicator servers are connected). More... | |
bool | gamepadConnectionStatus () const |
Returns gamepad connection status. More... | |
Provides backend features like Qt Script runner for frontend.
|
explicit |
Constructor.
configPath | - path to config file for trikControl, for example, /home/root/trik/. |
|
override |
|
slot |
Cancels execution of current program.
trikControl::BrickInterface & Controller::brick | ( | ) |
Returns reference to Brick object, which provides access to robot hardware.
|
signal |
Emitted when brick has finished deferred deinitialization so we need to refresh display to clear possible clutter from videosensors.
bool Controller::communicatorConnectionStatus | ( | ) |
Returns communicator connection status (whether or not both Telemetry and Communicator servers are connected).
|
signal |
Emitted when Telemetry and Communicator servers' status changes.
status | - true if both servers are connected. |
void trikGui::Controller::doCloseRunningWidget | ( | MainWidget & | widget | ) |
Asks controller to correctly close given running widget.
|
signal |
Emitted when a robot is connected to a gamepad.
bool Controller::gamepadConnectionStatus | ( | ) | const |
Returns gamepad connection status.
|
signal |
Emitted when a robot is disconnected from a gamepad.
|
signal |
Emitted when a graphics widget must be closed.
|
signal |
Emitted when running widget for a script with a given id must be closed.
|
signal |
Emitted when both graphics and running widget must be closed.
trikNetwork::MailboxInterface * Controller::mailbox | ( | ) |
Returns reference to Mailbox object, which provides access to robot-to-robot communications.
Does not pass ownership to the caller.
|
signal |
Emitted when Mailbox server's status changes.
void Controller::runFile | ( | const QString & | filePath | ) |
Executes specified file as Qt Script, if it has .qts extension, or as a program otherwise.
void Controller::runScript | ( | const QString & | script | ) |
Executes given script.
|
signal |
Emitted when a script stops due to an error.
|
signal |
Emitted when a new script starts and therefore a running widget must be shown with the script's name.
trikWiFi::TrikWiFi & Controller::wiFi | ( | ) |
Reference to WiFi manager.
|
signal |
Emitted when a robot is connected to a network.
|
signal |
Emitted when a robot is disconnected from a network.