#include <PsnProcess.h>
Inheritance diagram for PsnProcess:


Public Methods | |
| PsnProcess (const string &np, const string &mac) | |
| Constructor. | |
| virtual | ~PsnProcess () |
| Destructor. | |
| virtual void | unpack (PsIncomingSynchronisationMessage &) |
| unpack from a message | |
| virtual void | pack (PsOutgoingSynchronisationMessage &) const |
| pack in a message | |
| const PsName & | getProcessName () const |
| name of the process | |
| const PsName & | getHostMachineName () const |
| name of the machine associated to this process | |
| const PsFrequency & | getFrequency () const |
| Frequency of the controller of the process. | |
| const PsFrequency & | getMaxFrequencyOfHostedObjects () const |
| maximum frequency of the hosted simulated objects | |
| PsnSvmLink * | getSvmLink () const |
| link to the global controller | |
| const PsDate & | getDateOfLastMessage () const |
| Date of the last received message from that process. | |
| const PsDate & | getPeriod () const |
| get the period (in seconds) of the process | |
| void | setDateOfLastMessage (const PsDate &d) |
| change the date of last message received for this process in this adress space | |
| void | setFrequency (const PsFrequency &val) |
| change the frequency of this process | |
| void | setMaxHostedFrequency (const PsInt &val) |
| maximum des fréquence des référentiels hébergés | |
| void | setSvmLink (PsnSvmLink *val) |
| change the link to the global controller | |
Protected Attributes | |
| PsDate | _dateOfLastMessage |
| date of last reception of a message from this process | |
| PsDate | _period |
| time interval between two supposed receptions from this process. | |
| PsName | _processName |
| name of the process | |
| PsName | _machineName |
| machine hosting the process | |
| PsFrequency | _processFrequency |
| frequency of the process | |
| PsFrequency | _maxHostedFrequency |
| highest frequency of the process | |
| PsnSvmLink * | _svmLink |
| pointer to the link to the global controller | |
Definition at line 32 of file PsnProcess.h.
|
||||||||||||
|
Constructor.
Definition at line 23 of file PsnProcess.cxx. References PsController::lcm().
00024 : PsPackable(), 00025 _processName(np), 00026 _dateOfLastMessage ( PsController::initialSimulationDate ), //why not ? 00027 _machineName(mac), 00028 _maxHostedFrequency (0), //gives a stable point in calculating max 00029 _processFrequency (1) //give a stable point when calculing least common multiplier 00030 { 00031 assert ( PsController::lcm ( 13 , 1 ) == 13 ) ; //make sure lcm implementation has 1 as stable point. 00032 } |
|
|
Destructor.
Definition at line 36 of file PsnProcess.cxx.
00036 {
00037
00038 }
|
|
|
Date of the last received message from that process.
Definition at line 130 of file PsnProcess.cxx. References _dateOfLastMessage, and PsDate.
00131 {
00132 return _dateOfLastMessage ;
00133 }
|
|
|
Frequency of the controller of the process.
Definition at line 80 of file PsnProcess.cxx. References _processFrequency, and PsFrequency.
00081 {
00082 return _processFrequency ;
00083 }
|
|
|
name of the machine associated to this process
Definition at line 72 of file PsnProcess.cxx. References _machineName.
00073 {
00074 return _machineName ;
00075 }
|
|
|
maximum frequency of the hosted simulated objects
Definition at line 87 of file PsnProcess.cxx. References _maxHostedFrequency, and PsFrequency.
00088 {
00089 return _maxHostedFrequency ;
00090 }
|
|
|
get the period (in seconds) of the process
Definition at line 136 of file PsnProcess.cxx. References _period, and PsDate.
00137 {
00138 return _period ;
00139 }
|
|
|
name of the process
Definition at line 65 of file PsnProcess.cxx. References _processName. Referenced by PsnSvm::synchroniseReceiveAndProcessMessages().
00066 {
00067 return _processName ;
00068 }
|
|
|
link to the global controller
Definition at line 94 of file PsnProcess.cxx. References _svmLink. Referenced by PsnSvm::connectToDistributedSimulation(), PsnSvm::createDistributedSimulation(), PsnSvm::getLinkToProcessNamed(), and PsnSvm::synchroniseReceiveAndProcessMessages().
00095 {
00096 return _svmLink ;
00097 }
|
|
|
pack in a message
Implements PsPackable. Definition at line 42 of file PsnProcess.cxx. References _processName, _svmLink, PsPackable::pack(), and PsName::pack().
00043 {
00044 _processName.pack(out) ;
00045 _svmLink->pack(out) ;
00046 }
|
|
|
change the date of last message received for this process in this adress space
Definition at line 123 of file PsnProcess.cxx. References _dateOfLastMessage, and PsDate. Referenced by PsnSvm::synchroniseReceiveAndProcessMessages(), and PsnSvm::waitForAnswerToBlockingRequest().
00124 {
00125 _dateOfLastMessage = d ;
00126 }
|
|
|
change the frequency of this process
Definition at line 101 of file PsnProcess.cxx. References _period, _processFrequency, and PsFrequency.
00102 {
00103 _processFrequency = val ;
00104 _period = PsNumericTypeT<double>(1.0) / val ;
00105 }
|
|
|
maximum des fréquence des référentiels hébergés
|
|
|
change the link to the global controller
Definition at line 116 of file PsnProcess.cxx. References _svmLink. Referenced by PsnSvm::connectToDistributedSimulation(), and PsnSvm::createDistributedSimulation().
00117 {
00118 _svmLink = val ;
00119 }
|
|
|
unpack from a message
Implements PsPackable. Definition at line 50 of file PsnProcess.cxx. References _processName, and _svmLink.
00051 {
00052 #ifdef _DEBUGPVMMESS
00053 cerr<<"PsnProcess::extract "<<endl;
00054 #endif
00055 in >> _processName >> *_svmLink ;
00056
00057 #ifdef _DEBUGPVMMESS
00058 cerr<<"process named "<<_processName<<endl;
00059 #endif
00060 }
|
|
|
date of last reception of a message from this process
Definition at line 84 of file PsnProcess.h. Referenced by getDateOfLastMessage(), and setDateOfLastMessage(). |
|
|
machine hosting the process
Definition at line 96 of file PsnProcess.h. Referenced by getHostMachineName(). |
|
|
highest frequency of the process
Definition at line 102 of file PsnProcess.h. Referenced by getMaxFrequencyOfHostedObjects(). |
|
|
time interval between two supposed receptions from this process. should be equal to 1/frequency Definition at line 90 of file PsnProcess.h. Referenced by getPeriod(), and setFrequency(). |
|
|
frequency of the process
Definition at line 99 of file PsnProcess.h. Referenced by getFrequency(), and setFrequency(). |
|
|
name of the process
Definition at line 93 of file PsnProcess.h. Referenced by getProcessName(), pack(), and unpack(). |
|
|
pointer to the link to the global controller
Definition at line 105 of file PsnProcess.h. Referenced by getSvmLink(), pack(), setSvmLink(), and unpack(). |
| Documentation generated on Mon Nov 25 15:26:20 2002 |
Generated with doxygen 1.2.12 by Dimitri van Heesch , 1997-2001 |