omegalib  13.1
omega::MissionControlServer Class Reference

#include <MissionControl.h>

Public Member Functions

 MissionControlServer ()
 
virtual void initialize ()
 
virtual void dispose ()
 
virtual TcpConnectioncreateConnection (const ConnectionInfo &ci)
 Called when a new client connected. More...
 
void closeConnection (MissionControlConnection *conn)
 
MissionControlConnectionfindConnection (const String &name)
 
void handleMessage (const char *header, void *data, size_t size, MissionControlConnection *sender=NULL)
 
void setMessageHandler (IMissionControlMessageHandler *msgHandler)
 
void setListener (IMissionControlListener *l)
 
IMissionControlListenergetListener ()
 
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 ()
 
TcpConnectiongetConnection (int id)
 
- Public Member Functions inherited from omicron::Service
 Service ()
 
int getServiceId ()
 
virtual ~Service ()
 
ServiceManagergetManager ()
 
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 ()
 
EventwriteHead ()
 
EventreadHead ()
 
EventreadTail ()
 
EventgetEvent (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
 
+ Inheritance diagram for omega::MissionControlServer:

Constructor & Destructor Documentation

omega::MissionControlServer::MissionControlServer ( )
inline

Member Function Documentation

virtual void omega::MissionControlServer::addLine ( const String line)
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 TcpConnection* omega::MissionControlServer::createConnection ( const ConnectionInfo ci)
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 void omega::MissionControlServer::dispose ( )
virtual

Reimplemented from omicron::Service.

MissionControlConnection* omega::MissionControlServer::findConnection ( const String name)
IMissionControlListener* omega::MissionControlServer::getListener ( )
inline
void omega::MissionControlServer::handleMessage ( const char *  header,
void *  data,
size_t  size,
MissionControlConnection sender = NULL 
)
virtual void omega::MissionControlServer::initialize ( )
virtual

Reimplemented from omicron::TcpServer.

void omega::MissionControlServer::sendEventTo ( const Event evt,
MissionControlConnection target 
)

Send an event to the specified client.

void omega::MissionControlServer::setListener ( IMissionControlListener l)
inline
void omega::MissionControlServer::setMessageHandler ( IMissionControlMessageHandler msgHandler)
inline

Member Data Documentation

const int omega::MissionControlServer::DefaultPort = 22500
static

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