Layout Control System (LCS)
Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Slots | List of all members
ControllerManager Class Reference

Singleton class monitoring the current state of controllers. More...

#include <ControllerManager.h>

Inheritance diagram for ControllerManager:

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 ControllerManagerinstance (void)
 Returns/creates the singleton instance.
 

Protected Slots

void newUDPMessage (const UDPMessage &message)
 UDP Message handler.
 

Detailed Description

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.

Member Function Documentation

◆ getConnectedInfo()

void ControllerManager::getConnectedInfo ( long  serialNumber,
QString &  version,
ControllerStatusEnum status 
)

Fills version and status with the current information for a controller.

Parameters
serialNumberlong Serial number of the controller to lookup.

The documentation for this class was generated from the following files: