|
trikRuntime
|
Class that enables connection with a client running on computer (TRIKStudio or remote control). More...
#include <trikCommunicator.h>


Signals | |
| void | stopCommandReceived () |
| Emitted when stop command received from a computer. More... | |
Signals inherited from trikNetwork::TrikServer | |
| void | connected () |
| Emitted when we get the first connection established. More... | |
| void | disconnected () |
| Emitted when the last connection closes. More... | |
Public Member Functions | |
| TrikCommunicator (trikControl::BrickInterface &brick, trikNetwork::MailboxInterface *mailbox) | |
| Constructor that creates its own instance of a script runner. More... | |
| TrikCommunicator (trikScriptRunner::TrikScriptRunner &runner, const QString &configVersion) | |
| Constructor that accepts external script runner and issues commands to it. More... | |
| ~TrikCommunicator () override | |
Public Member Functions inherited from trikNetwork::TrikServer | |
| TrikServer (const std::function< Connection *()> &connectionFactory) | |
| Constructor. More... | |
| ~TrikServer () override | |
| int | activeConnections () const |
| Returns number of connections currently opened. More... | |
| Q_INVOKABLE void | startServer (quint16 port) |
| Starts listening given port on all network interfaces. More... | |
Additional Inherited Members | |
Public Slots inherited from trikNetwork::TrikServer | |
| void | sendMessage (const QString &message) |
| Broadcasts message across all opened connections. More... | |
Protected Member Functions inherited from trikNetwork::TrikServer | |
| void | incomingConnection (qintptr socketDescriptor) override |
| void | startConnection (Connection *connectionWorker) |
| Launches given connection in a separate thread. Takes ownership over connectionWorker object. More... | |
| Connection * | connection (const QHostAddress &ip, int port) const |
| Searches connection to given IP and port in a list of all open connections. More... | |
| Connection * | connection (const QHostAddress &ip) const |
| Searches connection to given IP and any port in a list of all open connections. More... | |
Class that enables connection with a client running on computer (TRIKStudio or remote control).
Communication subsystem consists of TrikCommunicator object which runs in main thread and listens for incoming connections, Connection objects — one for every connected client, they run in separate threads each, and ScriptRunnerWrapper object in main thread which processes signals from Connections.
| TrikCommunicator::TrikCommunicator | ( | trikControl::BrickInterface & | brick, |
| trikNetwork::MailboxInterface * | mailbox | ||
| ) |
Constructor that creates its own instance of a script runner.
| brick | - reference to robot brick. |
| mailbox | - mailbox object used to communicate with other robots. |
|
explicit |
Constructor that accepts external script runner and issues commands to it.
| runner | - script runner that shall be used to execute commands. |
| configVersion | - version of system config file that can be used to check that client and runtime configs match. |
|
override |
|
signal |
Emitted when stop command received from a computer.