Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

sim Class Reference

#include <sim.h>

List of all members.


Detailed Description

Definition at line 15 of file sim.h.


Public Types

typedef MessageQueue< 50 > EventQueue_t
typedef MessageQueue< 50 > MotionCommandQueue_t
typedef MessageQueue< 50 > SoundPlayQueue_t
typedef MessageQueue< 1 > CameraQueue_t
typedef MessageQueue< 1 > SensorQueue_t
typedef MessageQueue< 1 > TimerWakeup_t
typedef MessageQueue< 1 > MotionWakeup_t
typedef MessageQueue
< ProcessID::NumProcesses+1 > 
StatusRequest_t
typedef MessageQueue< 1 > MotionOutput_t

Public Member Functions

 sim ()
bool processCommandLine (int argc, const char *argv[])
bool run ()
 ~sim ()

Static Public Attributes

static SimConfig config
static IPCEventTranslatoretrans
static std::vector< std::string > cmdlineArgs

Static Protected Member Functions

static unsigned int measure_usleep_cost ()
static void wait_runlevel (SharedGlobals::runlevel_t level)
template<class T>
static void manage_process ()
template<class T>
static bool fork_process ()
static ProcessID::ProcessID_t getProcessID ()
 ProcessID hook to use the thread group as the process ID.
static void setProcessID (ProcessID::ProcessID_t id)
 ProcessID hook to set the thread group as the process ID.
static unsigned int sim_get_time ()
static float sim_getTimeScale ()
static void handle_signal (int sig)
static void handle_exit ()

Protected Attributes

SharedObject< SemaphoreManagermutexSemMgr
SharedObject< SharedGlobalsglob
SharedObject< ipc_setup_tsubj

Static Protected Attributes

static std::vector< Thread * > primaries
static ConfigErrorCheck cfgCheck
static bool original = true
static const char *const usage
static pid_t child = static_cast<pid_t>(-1)

Friends

int main (int argc, const char *argv[])

Classes

class  ConfigErrorCheck
 provides warning regarding configuration settings More...
class  PrimaryThread
 a wrapper for one of the 'major' processes, which would otherwise be forked as its own process if SimConfig::multiprocess was true More...

Member Typedef Documentation

Definition at line 23 of file sim.h.

Definition at line 24 of file sim.h.

Definition at line 25 of file sim.h.

Definition at line 26 of file sim.h.

Definition at line 27 of file sim.h.

Definition at line 28 of file sim.h.

Definition at line 29 of file sim.h.

Definition at line 30 of file sim.h.

Definition at line 31 of file sim.h.


Constructor & Destructor Documentation

sim (  ) 

Definition at line 103 of file sim.cc.

~sim (  ) 

Definition at line 313 of file sim.cc.


Member Function Documentation

bool processCommandLine ( int  argc,
const char *  argv[] 
)

Definition at line 181 of file sim.cc.

Referenced by main().

bool run (  ) 

Definition at line 260 of file sim.cc.

Referenced by main().

unsigned int measure_usleep_cost (  )  [static, protected]

Definition at line 533 of file sim.cc.

Referenced by sim().

void wait_runlevel ( SharedGlobals::runlevel_t  level  )  [static, protected]

Definition at line 342 of file sim.cc.

Referenced by manage_process().

void manage_process (  )  [inline, static, protected]

Definition at line 362 of file sim.cc.

bool fork_process (  )  [inline, static, protected]

Definition at line 388 of file sim.cc.

ProcessID::ProcessID_t getProcessID (  )  [static, protected]

ProcessID hook to use the thread group as the process ID.

Definition at line 413 of file sim.cc.

Referenced by run().

void setProcessID ( ProcessID::ProcessID_t  id  )  [static, protected]

ProcessID hook to set the thread group as the process ID.

Definition at line 419 of file sim.cc.

Referenced by run().

static unsigned int sim_get_time (  )  [inline, static, protected]

Definition at line 67 of file sim.h.

Referenced by sim().

static float sim_getTimeScale (  )  [inline, static, protected]

Definition at line 68 of file sim.h.

Referenced by sim().

void handle_signal ( int  sig  )  [static, protected]

Definition at line 425 of file sim.cc.

Referenced by sim().

void handle_exit (  )  [static, protected]

Definition at line 490 of file sim.cc.

Referenced by sim().


Friends And Related Function Documentation

int main ( int  argc,
const char *  argv[] 
) [friend]

Definition at line 66 of file sim.cc.


Member Data Documentation

Definition at line 34 of file sim.h.

vector< string > cmdlineArgs [static]

Definition at line 35 of file sim.h.

Referenced by processCommandLine(), and Simulator::Simulator().

vector< Thread * > primaries [static, protected]

Definition at line 53 of file sim.h.

Referenced by fork_process(), and run().

sim::ConfigErrorCheck cfgCheck [static, protected]

Definition at line 65 of file sim.h.

Referenced by run().

Definition at line 73 of file sim.h.

Referenced by sim().

Definition at line 74 of file sim.h.

Definition at line 75 of file sim.h.

bool original = true [static, protected]

Definition at line 76 of file sim.h.

Referenced by fork_process(), handle_exit(), and ~sim().

const char *const usage [static, protected]

Initial value:

"[-h|--help] [-c|--config config-file] [cmd1 cmd2 ...]\n"
"Commands passed as arguments are commonly of the form var=val, but can\n"
"also be any valid simulator command, such as 'freeze'.  If you wish to\n"
"pass a multi-word command, encase the command in quotes."

Definition at line 77 of file sim.h.

Referenced by processCommandLine().

pid_t child = static_cast<pid_t>(-1) [static, protected]

Definition at line 78 of file sim.h.

Referenced by fork_process(), and ~sim().


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

Tekkotsu Hardware Abstraction Layer 4.0
Generated Thu Nov 22 01:01:23 2007 by Doxygen 1.5.4