omegalib
13.1
|
#include <MissionControl.h>
Public Member Functions | |
MissionControlServer () | |
virtual void | initialize () |
virtual void | dispose () |
virtual TcpConnection * | createConnection (const ConnectionInfo &ci) |
Called when a new client connected. More... | |
void | closeConnection (MissionControlConnection *conn) |
MissionControlConnection * | findConnection (const String &name) |
void | handleMessage (const char *header, void *data, size_t size, MissionControlConnection *sender=NULL) |
void | setMessageHandler (IMissionControlMessageHandler *msgHandler) |
void | setListener (IMissionControlListener *l) |
IMissionControlListener * | getListener () |
virtual void | addLine (const String &line) |
void | broadcastEvent (const Event &evt, MissionControlConnection *sender=NULL) |
Broadcasts an event. More... | |
void | sendEventTo (const Event &evt, MissionControlConnection *target) |
Send an event to the specified client. More... | |
Public Member Functions inherited from omicron::TcpServer | |
TcpServer () | |
~TcpServer () | |
void | setPort (int value) |
int | getPort () |
virtual void | start () |
virtual void | stop () |
virtual void | poll () |
TcpConnection * | getConnection (int id) |
Public Member Functions inherited from omicron::Service | |
Service () | |
int | getServiceId () |
virtual | ~Service () |
ServiceManager * | getManager () |
String | getName () |
bool | isInitialized () |
bool | isDebugEnabled () |
Returns true if debug mode is enabled for this service. More... | |
ServicePollPriority | getPollPriority () |
void | setPollPriority (ServicePollPriority value) |
virtual void | setup (Setting &settings) |
void | lockEvents () |
void | unlockEvents () |
Event * | writeHead () |
Event * | readHead () |
Event * | readTail () |
Event * | getEvent (int index) |
void | doSetup (ServiceManager *mng, Setting &settings) |
void | doInitialize (ServiceManager *sm, int serviceId) |
Public Member Functions inherited from omicron::ReferenceType | |
ReferenceType () | |
virtual | ~ReferenceType () |
void | ref () |
void | unref () |
long | refCount () |
Static Public Attributes | |
static const int | DefaultPort = 22500 |
Additional Inherited Members | |
Public Types inherited from omicron::Service | |
enum | ServiceType { Pointer = EventBase::ServiceTypePointer, Mocap = EventBase::ServiceTypeMocap, Keyboard = EventBase::ServiceTypeKeyboard, Controller = EventBase::ServiceTypeController, Ui = EventBase::ServiceTypeUi, Generic = EventBase::ServiceTypeGeneric, Brain = EventBase::ServiceTypeBrain, Wand = EventBase::ServiceTypeWand, Speech = EventBase::ServiceTypeSpeech } |
This enumeration is kept for compatibility reason and may be removed in the future. More... | |
enum | ServicePollPriority { PollFirst, PollNormal, PollLast } |
Static Public Member Functions inherited from omicron::ReferenceType | |
static void | printObjCounts () |
Protected Member Functions inherited from omicron::TcpServer | |
virtual void | accept () |
virtual void | handleAccept (TcpConnection *newConnection, const asio::error_code &error) |
Static Protected Attributes inherited from omicron::ReferenceType | |
static List< ReferenceType * > | mysObjList |
|
inline |
|
virtual |
Implements omicron::ILogListener.
void omega::MissionControlServer::broadcastEvent | ( | const Event & | evt, |
MissionControlConnection * | sender = NULL |
||
) |
Broadcasts an event.
If sender is not null, the event not be sent to the specified client.
void omega::MissionControlServer::closeConnection | ( | MissionControlConnection * | conn | ) |
|
virtual |
Called when a new client connected.
Creates a TcpConnection instance to handle communication User code should reimplement this method.
Reimplemented from omicron::TcpServer.
|
virtual |
Reimplemented from omicron::Service.
MissionControlConnection* omega::MissionControlServer::findConnection | ( | const String & | name | ) |
|
inline |
void omega::MissionControlServer::handleMessage | ( | const char * | header, |
void * | data, | ||
size_t | size, | ||
MissionControlConnection * | sender = NULL |
||
) |
|
virtual |
Reimplemented from omicron::TcpServer.
void omega::MissionControlServer::sendEventTo | ( | const Event & | evt, |
MissionControlConnection * | target | ||
) |
Send an event to the specified client.
|
inline |
|
inline |
|
static |