ChirpSim
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros
Public Slots | Public Member Functions | Private Slots | Private Attributes | List of all members
ControllerServer Class Reference

The ControllerServer class listens to a UDP socket for messages, then forwards them to the correct controller. More...

#include <controllerserver.h>

Inheritance diagram for ControllerServer:
Inheritance graph

Public Slots

void start ()
 starts the server and makes it listen to the specified port. More...
 

Public Member Functions

 ControllerServer (QObject *parent=0, quint16 port=37875)
 
 ~ControllerServer ()
 

Private Slots

void incomingConnection ()
 incomingConnection is called when a new message is ready to be handled. More...
 

Private Attributes

QUdpSocket * _server
 
quint16 _port
 

Detailed Description

The ControllerServer class listens to a UDP socket for messages, then forwards them to the correct controller.

Constructor & Destructor Documentation

ControllerServer::ControllerServer ( QObject *  parent = 0,
quint16  port = 37875 
)
explicit

References _port, and _server.

ControllerServer::~ControllerServer ( )

Member Function Documentation

void ControllerServer::incomingConnection ( )
privateslot

incomingConnection is called when a new message is ready to be handled.

References _server, Robot::controller(), RobotRepository::getRobotFromId(), Controller::handleMessage(), and RobotRepository::instance().

Referenced by start().

Here is the call graph for this function:

Here is the caller graph for this function:

void ControllerServer::start ( )
slot

starts the server and makes it listen to the specified port.

References _port, _server, and incomingConnection().

Here is the call graph for this function:

Member Data Documentation

quint16 ControllerServer::_port
private

Referenced by ControllerServer(), and start().

QUdpSocket* ControllerServer::_server
private

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