cmlabs::Messenger Class Reference

#include <Messenger.h>

Inheritance diagram for cmlabs::Messenger:

Inheritance graph
[legend]
Collaboration diagram for cmlabs::Messenger:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Messenger (const JString &name, MessageSender *sender, const JString &wakeupMessageType, const JString &phaseChangeType)
 ~Messenger ()
Objectclone () const
JString getName ()
int getTriggerCount ()
JString getTriggerAlias ()
bool shouldContinueRunning ()
Collection getDestinations ()
bool isWakeupMessage (Message *msg)
bool log (int level, char *format,...)
bool setStatus (const JString &name, const JString &value)
JString getStatus (const JString &name)
bool processFirstMessage ()
MessagewaitForNewMessage (int timeout)
int getInputMessageCount ()
int getOutputMessageCount ()
MessagegetWakeupMessage ()
MessagegetTriggerMessage ()
int getRetrievedMessageCount ()
ObjectCollectiongetAllRetrievedMessages ()
MessagegetRetrievedMessage (int pos)
PhaseSpecgetPhaseSpec ()
ObjectCollectionretrieveMessages (const JString &retrieveFrom, const JString &retrieveSpecXML)
ObjectCollectionretrieveMessages (const JString &retrieveFrom, RetrieveSpec *retrieveSpec)
ObjectCollectionretrieveMessages (const JString &retrieveFrom, const ObjectCollection &retrieveSpecs)
bool addOutputMessage (Message *msg)
bool addOutputMessage (Message *msg, JString destination)
bool sendOutputMessages ()
bool postMessageToAllDestinations (Message *msg)
bool postOutputMessage (Message *msg)
bool sendPhaseChange (const JString &dest="")
JString getConfigXML (const JString &entry="")
JString getCurrentContextName ()
JString getCurrentPhaseName ()
JTime getCurrentContextStart ()
JTime getContextStart (const JString &context)
JTime getCurrentPhaseStart ()
ObjectDictionarygetParameterSpecs (JString module)
ParametergetParameterSpec (JString module, JString parameter)
JString getParameterString (JString module, JString parameter)
int getParameterInteger (JString module, JString parameter)
double getParameterDouble (JString module, JString parameter)
JString getParameter (JString module, JString parameter)
bool setParameterString (JString module, JString parameter, JString value)
bool setParameterInteger (JString module, JString parameter, int value)
bool setParameterDouble (JString module, JString parameter, double value)
bool setParameter (JString module, JString parameter, JString value)
bool increaseParameter (JString module, JString parameter, int steps)
bool decreaseParameter (JString module, JString parameter, int steps)
bool resetParameter (JString module, JString parameter)
bool addParameterItem (JString module, JString parameter, JString value)
bool removeParameterItem (JString module, JString parameter, JString value)
bool addParameterItem (JString param, JString value)
bool removeParameterItem (JString param, JString value)
Collection getParameterItems (JString param)
InfoItemqueryCatalog (const JString &catalog, Message *query)
MediaConnectionconnectToMediaServer (JString mediaName)
bool reconnectToMediaServer (JString mediaName, MediaConnection *mediacon)
JString getServerID ()
JString getServerName ()
Collection getParameterNames ()
ParametergetParameter (const JString &name)
Collection getStreamNames ()
MediaConnectiongetStreamConnection (const JString &name)
bool addParameter (JString paramname, JString xml)
bool hasParameter (JString name)
JString getParameterString (JString param)
int getParameterInteger (JString param)
double getParameterDouble (JString param)
bool setParameterString (JString param, JString value)
bool setParameterInteger (JString param, int value)
bool setParameterDouble (JString param, double value)
bool ping (JString module)
TCPLocation resolve (const JString &name, bool forceCNSLookup=false)
bool addInputMessage (Message *msg)
bool addParameter (const JString &name, Parameter *parameter)
bool addStream (const JString &name, MediaConnection *media)
bool clearStreams ()
bool terminate ()
bool setSignalHandler (bool(*handler)(const JString &module, const JString &signal, const JString &content))
bool handleSignal (const JString &module, const JString &signal, const JString &content)
bool processPhaseSpec (PhaseSpec *newSpec, JTime t)

Public Attributes

bool(* signalHandler )(const JString &module, const JString &signal, const JString &content)
ObjectTablerecentMessages
PerfStatperfStat
int verbose
double priority

Private Member Functions

MessagegetNextMessage (long ms)
bool checkNewPhaseSpec (PhaseSpec *newSpec, JTime msgtime)
bool clearOldMessagesFromQueue (JTime stamp)

Private Attributes

MessageSendermessageSender
JString name
JString wakeupMessageType
JString phaseChangeType
ObjectCollection outputMessages
ObjectDictionary parameters
ObjectDictionary streams
MessagecurrentMessage
PhaseSpeccurrentPhaseSpec
int totalTriggerCount
bool isStillRunning
bool shouldContinue
JTime startCrankTime
JTime startProcessTime
JThread aThread
JMutex mutex
JMutex phaseMutex
SortedObjectCollection inQueue
JMutex inQueueMutex
JSemaphore inQueueSemaphore


Detailed Description

Definition at line 34 of file Messenger.h.


Constructor & Destructor Documentation

cmlabs::Messenger::Messenger ( const JString name,
MessageSender sender,
const JString wakeupMessageType,
const JString phaseChangeType 
)

Definition at line 25 of file Messenger.cpp.

cmlabs::Messenger::~Messenger (  ) 

Definition at line 47 of file Messenger.cpp.


Member Function Documentation

Object* cmlabs::Messenger::clone (  )  const [virtual]

Implements cmlabs::Object.

Definition at line 38 of file Messenger.h.

JString cmlabs::Messenger::getName (  ) 

Definition at line 60 of file Messenger.cpp.

int cmlabs::Messenger::getTriggerCount (  ) 

Definition at line 113 of file Messenger.cpp.

JString cmlabs::Messenger::getTriggerAlias (  ) 

Definition at line 65 of file Messenger.cpp.

bool cmlabs::Messenger::shouldContinueRunning (  ) 

Definition at line 117 of file Messenger.cpp.

Collection cmlabs::Messenger::getDestinations (  ) 

Definition at line 76 of file Messenger.cpp.

bool cmlabs::Messenger::isWakeupMessage ( Message msg  ) 

Definition at line 99 of file Messenger.cpp.

bool cmlabs::Messenger::log ( int  level,
char *  format,
  ... 
)

Definition at line 307 of file Messenger.cpp.

bool cmlabs::Messenger::setStatus ( const JString name,
const JString value 
)

Definition at line 330 of file Messenger.cpp.

JString cmlabs::Messenger::getStatus ( const JString name  ) 

Definition at line 334 of file Messenger.cpp.

bool cmlabs::Messenger::processFirstMessage (  ) 

Definition at line 126 of file Messenger.cpp.

Message * cmlabs::Messenger::waitForNewMessage ( int  timeout  ) 

Definition at line 152 of file Messenger.cpp.

int cmlabs::Messenger::getInputMessageCount (  ) 

Definition at line 105 of file Messenger.cpp.

int cmlabs::Messenger::getOutputMessageCount (  ) 

Definition at line 109 of file Messenger.cpp.

Message * cmlabs::Messenger::getWakeupMessage (  ) 

Definition at line 338 of file Messenger.cpp.

Message * cmlabs::Messenger::getTriggerMessage (  ) 

Definition at line 347 of file Messenger.cpp.

int cmlabs::Messenger::getRetrievedMessageCount (  ) 

Definition at line 367 of file Messenger.cpp.

ObjectCollection * cmlabs::Messenger::getAllRetrievedMessages (  ) 

Definition at line 375 of file Messenger.cpp.

Message * cmlabs::Messenger::getRetrievedMessage ( int  pos  ) 

Definition at line 391 of file Messenger.cpp.

PhaseSpec * cmlabs::Messenger::getPhaseSpec (  ) 

Definition at line 400 of file Messenger.cpp.

ObjectCollection * cmlabs::Messenger::retrieveMessages ( const JString retrieveFrom,
const JString retrieveSpecXML 
)

Definition at line 419 of file Messenger.cpp.

ObjectCollection * cmlabs::Messenger::retrieveMessages ( const JString retrieveFrom,
RetrieveSpec retrieveSpec 
)

Definition at line 444 of file Messenger.cpp.

ObjectCollection * cmlabs::Messenger::retrieveMessages ( const JString retrieveFrom,
const ObjectCollection retrieveSpecs 
)

Definition at line 464 of file Messenger.cpp.

bool cmlabs::Messenger::addOutputMessage ( Message msg  ) 

Definition at line 506 of file Messenger.cpp.

bool cmlabs::Messenger::addOutputMessage ( Message msg,
JString  destination 
)

Definition at line 510 of file Messenger.cpp.

bool cmlabs::Messenger::sendOutputMessages (  ) 

Definition at line 537 of file Messenger.cpp.

bool cmlabs::Messenger::postMessageToAllDestinations ( Message msg  ) 

Definition at line 1014 of file Messenger.cpp.

bool cmlabs::Messenger::postOutputMessage ( Message msg  ) 

Definition at line 1009 of file Messenger.cpp.

bool cmlabs::Messenger::sendPhaseChange ( const JString dest = ""  ) 

Definition at line 707 of file Messenger.cpp.

JString cmlabs::Messenger::getConfigXML ( const JString entry = ""  ) 

Definition at line 1387 of file Messenger.cpp.

JString cmlabs::Messenger::getCurrentContextName (  ) 

Definition at line 820 of file Messenger.cpp.

JString cmlabs::Messenger::getCurrentPhaseName (  ) 

Definition at line 838 of file Messenger.cpp.

JTime cmlabs::Messenger::getCurrentContextStart (  ) 

Definition at line 791 of file Messenger.cpp.

JTime cmlabs::Messenger::getContextStart ( const JString context  ) 

Definition at line 795 of file Messenger.cpp.

JTime cmlabs::Messenger::getCurrentPhaseStart (  ) 

Definition at line 810 of file Messenger.cpp.

ObjectDictionary * cmlabs::Messenger::getParameterSpecs ( JString  module  ) 

Definition at line 1072 of file Messenger.cpp.

Parameter * cmlabs::Messenger::getParameterSpec ( JString  module,
JString  parameter 
)

Definition at line 1085 of file Messenger.cpp.

JString cmlabs::Messenger::getParameterString ( JString  module,
JString  parameter 
)

Definition at line 1035 of file Messenger.cpp.

int cmlabs::Messenger::getParameterInteger ( JString  module,
JString  parameter 
)

Definition at line 1043 of file Messenger.cpp.

double cmlabs::Messenger::getParameterDouble ( JString  module,
JString  parameter 
)

Definition at line 1051 of file Messenger.cpp.

JString cmlabs::Messenger::getParameter ( JString  module,
JString  parameter 
)

Definition at line 1098 of file Messenger.cpp.

bool cmlabs::Messenger::setParameterString ( JString  module,
JString  parameter,
JString  value 
)

Definition at line 1059 of file Messenger.cpp.

bool cmlabs::Messenger::setParameterInteger ( JString  module,
JString  parameter,
int  value 
)

Definition at line 1063 of file Messenger.cpp.

bool cmlabs::Messenger::setParameterDouble ( JString  module,
JString  parameter,
double  value 
)

Definition at line 1067 of file Messenger.cpp.

bool cmlabs::Messenger::setParameter ( JString  module,
JString  parameter,
JString  value 
)

Definition at line 1114 of file Messenger.cpp.

bool cmlabs::Messenger::increaseParameter ( JString  module,
JString  parameter,
int  steps 
)

Definition at line 1142 of file Messenger.cpp.

bool cmlabs::Messenger::decreaseParameter ( JString  module,
JString  parameter,
int  steps 
)

Definition at line 1169 of file Messenger.cpp.

bool cmlabs::Messenger::resetParameter ( JString  module,
JString  parameter 
)

Definition at line 1252 of file Messenger.cpp.

bool cmlabs::Messenger::addParameterItem ( JString  module,
JString  parameter,
JString  value 
)

Definition at line 1196 of file Messenger.cpp.

bool cmlabs::Messenger::removeParameterItem ( JString  module,
JString  parameter,
JString  value 
)

Definition at line 1224 of file Messenger.cpp.

bool cmlabs::Messenger::addParameterItem ( JString  param,
JString  value 
)

Definition at line 1349 of file Messenger.cpp.

bool cmlabs::Messenger::removeParameterItem ( JString  param,
JString  value 
)

Definition at line 1356 of file Messenger.cpp.

Collection cmlabs::Messenger::getParameterItems ( JString  param  ) 

Definition at line 1363 of file Messenger.cpp.

InfoItem * cmlabs::Messenger::queryCatalog ( const JString catalog,
Message query 
)

Definition at line 1370 of file Messenger.cpp.

MediaConnection * cmlabs::Messenger::connectToMediaServer ( JString  mediaName  ) 

Definition at line 950 of file Messenger.cpp.

bool cmlabs::Messenger::reconnectToMediaServer ( JString  mediaName,
MediaConnection mediacon 
)

Definition at line 968 of file Messenger.cpp.

JString cmlabs::Messenger::getServerID (  ) 

Definition at line 984 of file Messenger.cpp.

JString cmlabs::Messenger::getServerName (  ) 

Definition at line 995 of file Messenger.cpp.

Collection cmlabs::Messenger::getParameterNames (  ) 

Definition at line 485 of file Messenger.cpp.

Parameter * cmlabs::Messenger::getParameter ( const JString name  ) 

Definition at line 497 of file Messenger.cpp.

Collection cmlabs::Messenger::getStreamNames (  ) 

Definition at line 489 of file Messenger.cpp.

MediaConnection * cmlabs::Messenger::getStreamConnection ( const JString name  ) 

Definition at line 493 of file Messenger.cpp.

bool cmlabs::Messenger::addParameter ( JString  paramname,
JString  xml 
)

Definition at line 1293 of file Messenger.cpp.

bool cmlabs::Messenger::hasParameter ( JString  name  ) 

Definition at line 1302 of file Messenger.cpp.

JString cmlabs::Messenger::getParameterString ( JString  param  ) 

Definition at line 1306 of file Messenger.cpp.

int cmlabs::Messenger::getParameterInteger ( JString  param  ) 

Definition at line 1313 of file Messenger.cpp.

double cmlabs::Messenger::getParameterDouble ( JString  param  ) 

Definition at line 1320 of file Messenger.cpp.

bool cmlabs::Messenger::setParameterString ( JString  param,
JString  value 
)

Definition at line 1327 of file Messenger.cpp.

bool cmlabs::Messenger::setParameterInteger ( JString  param,
int  value 
)

Definition at line 1334 of file Messenger.cpp.

bool cmlabs::Messenger::setParameterDouble ( JString  param,
double  value 
)

Definition at line 1341 of file Messenger.cpp.

bool cmlabs::Messenger::ping ( JString  module  ) 

Definition at line 1279 of file Messenger.cpp.

TCPLocation cmlabs::Messenger::resolve ( const JString name,
bool  forceCNSLookup = false 
)

Definition at line 1289 of file Messenger.cpp.

bool cmlabs::Messenger::addInputMessage ( Message msg  ) 

Definition at line 907 of file Messenger.cpp.

bool cmlabs::Messenger::addParameter ( const JString name,
Parameter parameter 
)

Definition at line 920 of file Messenger.cpp.

bool cmlabs::Messenger::addStream ( const JString name,
MediaConnection media 
)

Definition at line 924 of file Messenger.cpp.

bool cmlabs::Messenger::clearStreams (  ) 

Definition at line 928 of file Messenger.cpp.

bool cmlabs::Messenger::terminate (  ) 

Definition at line 938 of file Messenger.cpp.

bool cmlabs::Messenger::setSignalHandler ( bool(*)(const JString &module, const JString &signal, const JString &content)  handler  ) 

Definition at line 1405 of file Messenger.cpp.

bool cmlabs::Messenger::handleSignal ( const JString module,
const JString signal,
const JString content 
)

Definition at line 1410 of file Messenger.cpp.

bool cmlabs::Messenger::processPhaseSpec ( PhaseSpec newSpec,
JTime  t 
)

Definition at line 251 of file Messenger.cpp.

Message * cmlabs::Messenger::getNextMessage ( long  ms  )  [private]

Definition at line 874 of file Messenger.cpp.

bool cmlabs::Messenger::checkNewPhaseSpec ( PhaseSpec newSpec,
JTime  msgtime 
) [private]

Definition at line 256 of file Messenger.cpp.

bool cmlabs::Messenger::clearOldMessagesFromQueue ( JTime  stamp  )  [private]

Definition at line 845 of file Messenger.cpp.


Member Data Documentation

bool(* cmlabs::Messenger::signalHandler)(const JString &module, const JString &signal, const JString &content)

Definition at line 184 of file Messenger.h.

Definition at line 185 of file Messenger.h.

Definition at line 186 of file Messenger.h.

Definition at line 187 of file Messenger.h.

Definition at line 190 of file Messenger.h.

Definition at line 191 of file Messenger.h.

Definition at line 192 of file Messenger.h.

Definition at line 193 of file Messenger.h.

Definition at line 196 of file Messenger.h.

Definition at line 197 of file Messenger.h.

Definition at line 198 of file Messenger.h.

Definition at line 199 of file Messenger.h.

Definition at line 200 of file Messenger.h.

Definition at line 202 of file Messenger.h.

Definition at line 203 of file Messenger.h.

Definition at line 204 of file Messenger.h.

Definition at line 206 of file Messenger.h.

Definition at line 207 of file Messenger.h.

Definition at line 208 of file Messenger.h.

Definition at line 209 of file Messenger.h.

Definition at line 210 of file Messenger.h.

Definition at line 212 of file Messenger.h.

Definition at line 213 of file Messenger.h.

Definition at line 214 of file Messenger.h.


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

Generated on Tue Jul 7 16:23:26 2009 for CoreLibrary by  doxygen 1.5.6