#include <Dispatcher.h>
Collaboration diagram for Dispatcher:

Public Member Functions | |
| Dispatcher () | |
| ~Dispatcher () | |
| bool | proccessMessageFromMC (shared_ptr< vector< shared_ptr< string > > > msg) | 
| bool | dispatchMessage () | 
| bool | setSpdInSim (int id, double speed, double ts, double te) | 
| bool | order (int Ris, int Rid, double ts, double tf) | 
| bool | communicationMode (int cMode, string filename) | 
| bool | communicationMode (int cMode, string thisName, string thatName) | 
| bool | setTimeFlow (double flowFactor) | 
| double | getTime () | 
| double | getTimeFlow () | 
Private Member Functions | |
| bool | drvparse (shared_ptr< vector< shared_ptr< string > > >) | 
| bool | loadparse (shared_ptr< vector< shared_ptr< string > > >) | 
| bool | unloadparse (shared_ptr< vector< shared_ptr< string > > >) | 
| bool | setspdparse (shared_ptr< vector< shared_ptr< string > > >) | 
| bool | locationparse (shared_ptr< vector< shared_ptr< string > > >) | 
| bool | trnewparse (shared_ptr< vector< shared_ptr< string > > >) | 
| bool | trdelparse (shared_ptr< vector< shared_ptr< string > > >) | 
| bool | newcargparse (shared_ptr< vector< shared_ptr< string > > >) | 
| bool | rmcargparse (shared_ptr< vector< shared_ptr< string > > >) | 
| bool | arcparse (shared_ptr< vector< shared_ptr< string > > >) | 
Private Attributes | |
| StateControl * | world | 
| MessageController * | mc | 
| shared_ptr< queue< shared_ptr< vector< shared_ptr< string > > > > >  | parseQ | 
| pthread_mutex_t * | mutex_ptr | 
| pthread_cond_t * | cond_ptr | 
Parses messages coming from MesssageController and calls the relevant functions in StateControl. Also constructs messages for transmision back to Traplas.
Definition at line 42 of file Dispatcher.h.
      
  | 
  
| 
 
 Definition at line 49 of file Dispatcher.cpp.  | 
  
      
  | 
  
| 
 
 Definition at line 60 of file Dispatcher.cpp.  | 
  
      
  | 
  
| 
 
 Definition at line 456 of file Dispatcher.cpp. References StateControl::arc(), and world. Referenced by dispatchMessage(). Here is the call graph for this function: ![]()  | 
  
      
  | 
  ||||||||||||||||
| 
 Sets the communication mode for this visualisation run. 
 
 
 Definition at line 202 of file Dispatcher.cpp. References MessageController::communicationMode(), and mc. Here is the call graph for this function: ![]()  | 
  
      
  | 
  ||||||||||||
| 
 Sets the communication mode for this visualisation run. 
 
 
 Definition at line 197 of file Dispatcher.cpp. References MessageController::communicationMode(), and mc. Referenced by parse(). Here is the call graph for this function: ![]()  | 
  
      
  | 
  
| 
 Parse any messages present in the queue. 
 
 Definition at line 79 of file Dispatcher.cpp. References arcparse(), cond_ptr, drvparse(), loadparse(), locationparse(), mutex_ptr, newcargparse(), parseQ, rmcargparse(), setspdparse(), trdelparse(), trnewparse(), and unloadparse(). Referenced by go(). Here is the call graph for this function: ![]()  | 
  
      
  | 
  
| 
 
 Definition at line 221 of file Dispatcher.cpp. References StateControl::drv(), and world. Referenced by dispatchMessage(). Here is the call graph for this function: ![]()  | 
  
      
  | 
  
| 
 
 
 Definition at line 215 of file Dispatcher.cpp. References MessageController::getVisualisationTime(), and mc. Referenced by StateControl::getTime(). Here is the call graph for this function: ![]()  | 
  
      
  | 
  
| 
 
 
 Definition at line 211 of file Dispatcher.cpp. References MessageController::getTimeFlow(), and mc. Referenced by StateControl::adjustTimeFlow(), StateControl::drv(), StateControl::getTimeFlow(), AnimationPathTimedCallback::operator()(), and StateControl::pause(). Here is the call graph for this function: ![]()  | 
  
      
  | 
  
| 
 
 Definition at line 251 of file Dispatcher.cpp. References StateControl::load(), and world. Referenced by dispatchMessage(). Here is the call graph for this function: ![]()  | 
  
      
  | 
  
| 
 
 Definition at line 329 of file Dispatcher.cpp. References StateControl::location(), and world. Referenced by dispatchMessage(). Here is the call graph for this function: ![]()  | 
  
      
  | 
  
| 
 
 Definition at line 413 of file Dispatcher.cpp. References StateControl::newcarg(), and world. Referenced by dispatchMessage(). Here is the call graph for this function: ![]()  | 
  
      
  | 
  ||||||||||||||||||||
| 
 Construct a message specifying a new order. 
 
 
 Definition at line 160 of file Dispatcher.cpp. References mc, and MessageController::sendMessageToComm(). Here is the call graph for this function: ![]()  | 
  
      
  | 
  
| 
 Puts a message in the queue to be parsed by the thread that runs in StateControl. 
 
 
 Definition at line 67 of file Dispatcher.cpp. References cond_ptr, mutex_ptr, and parseQ. Referenced by msgcontrollerThread().  | 
  
      
  | 
  
| 
 
 Definition at line 436 of file Dispatcher.cpp. References StateControl::rmcarg(), and world. Referenced by dispatchMessage(). Here is the call graph for this function: ![]()  | 
  
      
  | 
  ||||||||||||||||||||
| 
 Construct a message specifying a change in speed for the specified resource. 
 
 
 Definition at line 123 of file Dispatcher.cpp. References mc, and MessageController::sendMessageToComm(). Here is the call graph for this function: ![]()  | 
  
      
  | 
  
| 
 
 Definition at line 307 of file Dispatcher.cpp. References StateControl::setspdinviz(), and world. Referenced by dispatchMessage(). Here is the call graph for this function: ![]()  | 
  
      
  | 
  
| 
 Sets the speed at which time is progressing in the visualisation. This is obtained through the MessageController. 
 
 
 Definition at line 207 of file Dispatcher.cpp. References mc, and MessageController::setTimeFlow(). Referenced by StateControl::adjustTimeFlow(), and StateControl::pause(). Here is the call graph for this function: ![]()  | 
  
      
  | 
  
| 
 
 Definition at line 393 of file Dispatcher.cpp. References StateControl::trdel(), and world. Referenced by dispatchMessage(). Here is the call graph for this function: ![]()  | 
  
      
  | 
  
| 
 
 Definition at line 368 of file Dispatcher.cpp. References StateControl::trnew(), and world. Referenced by dispatchMessage(). Here is the call graph for this function: ![]()  | 
  
      
  | 
  
| 
 
 Definition at line 279 of file Dispatcher.cpp. References StateControl::unload(), and world. Referenced by dispatchMessage(). Here is the call graph for this function: ![]()  | 
  
      
  | 
  
| 
 
 Definition at line 119 of file Dispatcher.h. Referenced by Dispatcher(), dispatchMessage(), and proccessMessageFromMC().  | 
  
      
  | 
  
| 
 
 Definition at line 115 of file Dispatcher.h. Referenced by communicationMode(), Dispatcher(), getTime(), getTimeFlow(), order(), setSpdInSim(), setTimeFlow(), and ~Dispatcher().  | 
  
      
  | 
  
| 
 
 Definition at line 118 of file Dispatcher.h. Referenced by Dispatcher(), dispatchMessage(), and proccessMessageFromMC().  | 
  
      
  | 
  
| 
 
 Definition at line 117 of file Dispatcher.h. Referenced by Dispatcher(), dispatchMessage(), and proccessMessageFromMC().  | 
  
      
  | 
  
| 
 
 Definition at line 114 of file Dispatcher.h. Referenced by arcparse(), Dispatcher(), drvparse(), loadparse(), locationparse(), newcargparse(), rmcargparse(), setspdparse(), trdelparse(), trnewparse(), unloadparse(), and ~Dispatcher().  | 
  
 1.4.4