Tekkotsu Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
SharedGlobals Class ReferenceA class to hold various simulator parameters which need to be accessed from multiple processes. More...
Detailed DescriptionA class to hold various simulator parameters which need to be accessed from multiple processes. Definition at line 14 of file SharedGlobals.h.
Member Enumeration Documentation
defines the runlevels that each process passes through; runlevels should monotonically increase (can't go backwards)
Definition at line 133 of file SharedGlobals.h. Constructor & Destructor Documentation
constructor Definition at line 17 of file SharedGlobals.h.
destructor Definition at line 29 of file SharedGlobals.h. Member Function Documentation
access to semgr's SemaphoreManager::faultShutdown() -- call this *after* a fault has occured from the signal handler; doesn't signal the fault itself Definition at line 82 of file SharedGlobals.h. Referenced by sim::badExitCleanup().
this returns time since boot (bootTime), scaled by scale, relative to timeOffset Definition at line 244 of file SharedGlobals.h. Referenced by get_time().
returns the current simulator time, in milliseconds since startup the simulator should set project_get_time::get_time_callback to call this, so calls to get_time() will be forwarded here. That wall all processes will share the same time Definition at line 18 of file SharedGlobals.cc. Referenced by sim::sim_get_time().
returns autoPauseTime Definition at line 123 of file SharedGlobals.h. Referenced by Simulator::incrementTime().
gets nextMotion Definition at line 233 of file SharedGlobals.h. Referenced by Simulator::cmdStatus(), Simulator::getNextFrame(), Motion::gotWakeup(), MotionExecThread::interrupted(), and MotionExecThread::poll().
gets nextSensorUpdate Definition at line 236 of file SharedGlobals.h.
gets nextTimer Definition at line 230 of file SharedGlobals.h. Referenced by TimerExecThread::calcSleepTime(), Simulator::cmdStatus(), Simulator::getNextFrame(), TimerExecThread::poll(), and TimerExecThread::reset().
returns the current simulator timeScale (speed factor), as a ratio of real time (e.g. '2' means simulation is running two times wall clock) the simulator should set project_get_time::get_timeScale_callback to call this, so calls to getTimeScale() will be forwarded here. Definition at line 56 of file SharedGlobals.cc. Referenced by sim::sim_getTimeScale().
access to semgr, returns SemaphoreManager::hadFault() Definition at line 79 of file SharedGlobals.h. Referenced by sim::badExitCleanup().
test to see if the initial sensor event has been generated Definition at line 48 of file SharedGlobals.h. Referenced by Simulator::run(), Main::run(), and signalShutdown().
test to see if the shutdown flag has been set (non-blocking) Definition at line 70 of file SharedGlobals.h. Referenced by Simulator::processRunlevel(), Simulator::run(), Motion::run(), and Main::run().
Definition at line 238 of file SharedGlobals.h. Referenced by Simulator::Simulator().
sets autoPauseTime Definition at line 121 of file SharedGlobals.h. Referenced by Simulator::cmdRun(), Simulator::incrementTime(), and Simulator::resetSpeedMode().
sets nextMotion Definition at line 232 of file SharedGlobals.h. Referenced by MotionExecThread::launched(), MotionExecThread::poll(), and MotionExecThread::reset().
sets nextSensorUpdate Definition at line 235 of file SharedGlobals.h.
sets nextTimer, returns true if the new value differs from previous value Definition at line 229 of file SharedGlobals.h. Referenced by Main::gotCamera(), Main::gotEvent(), Main::gotSensors(), Main::gotThreadedEvent(), Main::gotTimer(), TimerExecThread::poll(), and Main::run().
Called by Main when the first sensorEGID event is generated. When the waitForSensors setting is enabled, the startupBehavior is not activated until this occurs Definition at line 44 of file SharedGlobals.h. Referenced by Simulator::plistValueChanged(), Main::processEvent(), Simulator::run(), and signalShutdown().
call this to cause "system shutdown" -- clean halt of the simulator (not actually the host system) Definition at line 64 of file SharedGlobals.h. Referenced by sim::badExitCleanup(), Simulator::cmdQuit(), Simulator::cmdRunlevel(), Simulator::run(), and Simulator::Simulator().
blocks until the initial sensor event has been generated Definition at line 52 of file SharedGlobals.h. Referenced by Simulator::run(), Motion::run(), and Main::run().
blocks until shutdown flag has been set Definition at line 74 of file SharedGlobals.h. Referenced by Process::run(). Member Data Documentation
if simulatorTime is about to move past this value, timeScale is set to 0 instead, and simulatorTime is set to this Definition at line 267 of file SharedGlobals.h. Referenced by get_time(), getAutoPauseTime(), and setAutoPauseTime().
real time since simulator startup (or, at least, since SharedGlobals was constructed... close enough) Definition at line 258 of file SharedGlobals.h. Referenced by get_real_time(), get_time(), and resetBootTime().
updated by each call to get_time(), if timeScale differs, allows timeOffset to be updated fluidly Definition at line 264 of file SharedGlobals.h. Referenced by get_time().
a count of the number of processes which have passed through each runlevel Definition at line 148 of file SharedGlobals.h. Referenced by sim::badExitCleanup(), sim::fork_process(), sim::manage_process(), sim::run(), SharedGlobals(), and sim::wait_runlevel(). allows mutually exclusive access to the fields of SharedObject Definition at line 218 of file SharedGlobals.h. Referenced by sim::badExitCleanup(), sim::manage_process(), Process::statusReport(), and sim::wait_runlevel().
maximum storage size of strings in processNames Definition at line 224 of file SharedGlobals.h. Referenced by Process::Process(). holds configuration parameters for the motion process Referenced by MotionExecThread::applyPostureFeedback(), Simulator::cmdStatus(), Motion::doStart(), Main::doStart(), FrameCounter::filterSendRequest(), Simulator::plistCollectionEntriesChanged(), Simulator::plistCollectionEntryAdded(), Simulator::plistValueChanged(), MotionExecThread::poll(), SharedGlobals(), sim::sim(), Simulator::Simulator(), and Simulator::~Simulator().
updated by Motion process after each motion update Definition at line 252 of file SharedGlobals.h. Referenced by getNextMotion(), and setNextMotion().
updated by Main process after each sensor update Definition at line 255 of file SharedGlobals.h. Referenced by getNextSensorUpdate(), and setNextSensorUpdate().
set by setNextTimer, called with the current value of EventRouter::getNextTimer() after each user code section, indicates time of next timer event Definition at line 249 of file SharedGlobals.h. Referenced by getNextTimer(), and setNextTimer().
symbolic access to the total number of runlevel stages Definition at line 142 of file SharedGlobals.h. Referenced by Simulator::cmdHelp(), Simulator::cmdRunlevel(), and SharedGlobals().
holds the host system's process ID for each simulator process Definition at line 221 of file SharedGlobals.h. Referenced by Process::Process(), and Simulator::run(). each process should set a string version of its name for user feedback Definition at line 227 of file SharedGlobals.h. Referenced by Process::Process(), and Simulator::run().
Initial value:
{ "CREATED", "CONSTRUCTING", "STARTING", "RUNNING", "STOPPING", "DESTRUCTING", "DESTRUCTED", NULL } string versions of runlevel_t for runtime user-feedback Definition at line 145 of file SharedGlobals.h. Referenced by Simulator::cmdHelp(), Simulator::cmdRunlevel(), and sim::wait_runlevel().
the semaphore within semgr to communicate shutdown status between processes -- when the semaphore is set to 0, shutdown is requested Definition at line 270 of file SharedGlobals.h. Referenced by isShutdown(), SharedGlobals(), signalShutdown(), waitShutdown(), and ~SharedGlobals().
a semaphore set, only used for running and sensorValid Definition at line 269 of file SharedGlobals.h. Referenced by faultShutdown(), hadFault(), haveSensors(), isShutdown(), SharedGlobals(), signalHaveSensors(), signalShutdown(), waitSensors(), waitShutdown(), and ~SharedGlobals(). holds configuration parameters for the motion process Definition at line 212 of file SharedGlobals.h. Referenced by SyncDataThread::cancelled(), Main::gotSensors(), SyncDataThread::interrupted(), SyncDataThread::launched(), Simulator::nextSensorTime(), Simulator::plistCollectionEntriesChanged(), Simulator::plistCollectionEntryAdded(), Simulator::plistCollectionEntryRemoved(), Simulator::plistValueChanged(), Simulator::run(), Simulator::sendSensor(), sim::sim(), Simulator::Simulator(), and Simulator::~Simulator(). Definition at line 240 of file SharedGlobals.h. Referenced by MotionExecThread::applyPostureFeedback(), Simulator::cmdStatus(), Motion::doStart(), Main::doStart(), Main::gotSensors(), MotionExecThread::poll(), Simulator::sendSensor(), Simulator::setMotionEnteringRealtime(), Simulator::setMotionLeavingRealtime(), SharedGlobals(), sim::sim(), Simulator::Simulator(), and Simulator::~Simulator().
the semaphore within semgr to notify processes when the first sensor frame is available Definition at line 271 of file SharedGlobals.h. Referenced by haveSensors(), SharedGlobals(), signalHaveSensors(), waitSensors(), and ~SharedGlobals().
the current time within the simulation, only applicable when timeScale is negative (non-realtime) Definition at line 103 of file SharedGlobals.h. Referenced by Simulator::cmdStatus(), get_time(), Simulator::incrementTime(), resetBootTime(), Simulator::resetSpeedMode(), and sim::sim().
the scaled value of bootTime at which isRealTime was last activated, allows you to start and stop realtime fluidly Definition at line 261 of file SharedGlobals.h. Referenced by get_real_time(), get_time(), and resetBootTime().
Controls the speed at which time from get_time() will move. You can use this to pretend your hardware is faster or slower than it actually is. For instance, a value of .5 means time will move at half speed (pretending your hardware is twice as fast) This can be useful for "slow motion" analysis, or you can speed up time to simulate a more processor-restrictive platform. Negative values indicate full-speed processing -- time will be incremented only as quickly as it can be without dropping any video or sensor frames. (may be faster or slower than realtime) in this case, simulatorTime is used by calls to get_time() A value of zero halts time. Definition at line 118 of file SharedGlobals.h. Referenced by TimerExecThread::calcSleepTime(), SyncDataThread::cancelled(), Simulator::cmdAdvance(), Simulator::cmdPause(), Simulator::cmdRun(), Simulator::cmdStatus(), Simulator::cmdStep(), Motion::doStart(), Motion::doStop(), get_time(), getTimeScale(), Main::gotTimer(), Motion::gotWakeup(), Simulator::incrementTime(), SyncDataThread::interrupted(), MotionExecThread::interrupted(), TimerExecThread::launched(), SyncDataThread::launched(), MotionExecThread::launched(), Simulator::messagesRead(), Simulator::plistCollectionEntriesChanged(), Simulator::plistCollectionEntryAdded(), Simulator::plistCollectionEntryRemoved(), Simulator::plistValueChanged(), TimerExecThread::reset(), MotionExecThread::reset(), resetBootTime(), Simulator::resetSpeedMode(), Simulator::run(), Simulator::setMotionEnteringRealtime(), sim::sim(), Simulator::Simulator(), and Simulator::updateDataSources(). holds configuration parameters for the motion process Definition at line 213 of file SharedGlobals.h. Referenced by Main::gotCamera(), Simulator::plistCollectionEntriesChanged(), Simulator::plistCollectionEntryAdded(), Simulator::plistCollectionEntryRemoved(), Simulator::plistValueChanged(), sim::sim(), Simulator::Simulator(), and Simulator::~Simulator(). Controls whether to wait for initial sensor readings before triggering the startup behavior or starting the motion polling thread. This can avoid jumping to the 0-point on simulator launch. Changes after initial launch are ignored. Definition at line 40 of file SharedGlobals.h. Referenced by Main::doStart(), Simulator::plistValueChanged(), Simulator::run(), Motion::run(), Main::run(), signalShutdown(), and sim::sim(). The documentation for this class was generated from the following files: |
Tekkotsu Hardware Abstraction Layer 5.1CVS |
Generated Mon May 9 05:01:41 2016 by Doxygen 1.6.3 |