Layout Control System (LCS)
|
Singleton class monitoring the current state of controllers. More...
#include <ControllerManager.h>
Public Slots | |
unsigned long | getSerialNumber (int controllerID) |
Returns the serial number for the given controllerID. | |
Signals | |
void | controllerAdded (long serialNumber) |
Emitted when a SYS_CONTROLLER_ONLINE UDP message is received. | |
void | controllerRemoved (long serialNumber) |
Currently, this signal is not emitted as there is no way (currently) for the detection of a controller going offline. | |
void | controllerStatusChanged (long serialNumber, ControllerStatusEnum newStatus, const QString &version) |
Emitted when a SYS_CONTROLLER_ONLINE and SYS_RESTARTING UDP messages are received. | |
Public Member Functions | |
~ControllerManager (void) | |
Deststructor. | |
long | getConnectionSerialNumber (int index) const |
Returns the controller's serial number at the given index. | |
void | getConnectedInfo (long serialNumber, QString &version, ControllerStatusEnum &status) |
int | getConnectionCount (void) const |
Returns the count of connected controllers. | |
Static Public Member Functions | |
static ControllerManager * | instance (void) |
Returns/creates the singleton instance. | |
Protected Slots | |
void | newUDPMessage (const UDPMessage &message) |
UDP Message handler. | |
Singleton class monitoring the current state of controllers.
ControllerManager This class monitors UDP messages collecting information about the current state of LCS controllers. When a controller's online status changes, a controllerStatusChanged signal is emitted. On a SYS_CONTROLLER_ONLINE message, the controllerAdded signal is emitted.
void ControllerManager::getConnectedInfo | ( | long | serialNumber, |
QString & | version, | ||
ControllerStatusEnum & | status | ||
) |
Fills version and status with the current information for a controller.
serialNumber | long Serial number of the controller to lookup. |