![]() |
User Manual, Developers Guide and API Documentation |
![]() |
#include <simulator/Application.hpp>


Public Member Functions | |
| Application () | |
| Default Constructor. | |
| virtual | ~Application () |
| Default Destructor. | |
Protected Member Functions | |
| virtual void | doInit () |
| Configure stuff that belongs to WNS. | |
| virtual void | doReadCommandLine (int argc, char *argv[]) |
| Reads the command line parameters. | |
| virtual void | doRun () |
| Run the simulation. | |
| virtual void | doShutdown () |
| Shutdown everything. | |
| virtual int | doStatus () const |
| Return status code. | |
| pyconfig::View | getWNSView () const |
| Returns the view to root configuration. | |
| void | loadModules () |
| Retrieve an instance of Module from each library. | |
| void | stopProbes () |
| Stop Probes. | |
| void | writeFingerprint () |
| Write a fingerprint file to the output directory. | |
Static Protected Member Functions | |
| static void | disableX87ExtendedFloatingPointPrecision () |
| Disable usage of 80 bit extensions in x87. | |
| static std::string | getPathToPyConfig () |
| Returns the path to pyconfig. | |
| static void | unexpectedHandler () |
| Handle unexpected exceptions. | |
Protected Attributes | |
| bool | absolutePath_ |
| boost::program_options::variables_map | arguments_ |
| bool | attachDebugger_ |
| Are we expected to launch a debugger on segfault? | |
| bool | compilerTestingOutput_ |
| Is the output in testing mode compatible to that of a compiler? | |
| std::string | configFile_ |
| Name of the configuration file. | |
| pyconfig::Parser | configuration_ |
| Configuration as parsed from configFile_. | |
| wns::probe::bus::ContextCollectorPtr | cpuCyclesProbe_ |
| Probe CPU cycles spent in main event loop. | |
| std::string | debuggerName_ |
| In case we should launch a debugger, this is the name of it. | |
| std::auto_ptr < wns::events::scheduler::Monitor > | eventSchedulerMonitor_ |
| A monitor for the event scheduler. | |
| bool | extendedPrecision_ |
| If true use 80 bit extensions of x87 (false by default). | |
| bool | interactiveConfig_ |
| Interactive config. | |
| bool | lazyBinding_ |
| bool | listLoadedModules_ |
| If true, a list of loaded modules will be shown (set by "-m"). | |
| std::list< wns::module::Base * > | loadedModules_ |
| List with all loaded modules. | |
| wns::logger::Logger | logger_ |
| The logger of the Application. | |
| std::list< pyconfig::View > | moduleViews_ |
| List with the configuration of all modules. | |
| boost::program_options::options_description | options_ |
| Defines the valid options for the command line. | |
| std::auto_ptr < wns::probe::bus::ProbeBusRegistry > | probeBusRegistry |
| Anchor for all probe busses. | |
| ProbeWriter | probeWriter |
| std::string | programName_ |
| Our own name (as from argv[0]). | |
| PyConfigPatchContainer | pyConfigPatches_ |
| Holds all PyConfig patches. | |
| std::auto_ptr < wns::simulator::ISimulationModel > | simulationModel_ |
| Keeps the SimulationModel which is constructed by a StaticFactory. | |
| int | status_ |
| The status code of openWNS. | |
| StatusReport | statusReport |
| bool | testing_ |
| Is wns in testing mode? | |
| TestNameContainer | testNames_ |
| If special tests have been defined they are stored here. | |
| bool | verbose_ |
| Be chatty. | |
Private Types | |
| typedef std::vector< std::string > | PyConfigPatchContainer |
| typedef std::vector< std::string > | TestNameContainer |
Definition at line 81 of file Application.hpp.
typedef std::vector<std::string> wns::simulator::Application::PyConfigPatchContainer [private] |
Definition at line 86 of file Application.hpp.
typedef std::vector<std::string> wns::simulator::Application::TestNameContainer [private] |
Definition at line 85 of file Application.hpp.
| Application::Application | ( | ) |
Definition at line 89 of file Application.cpp.
| Application::~Application | ( | ) | [virtual] |
Definition at line 172 of file Application.cpp.
| void Application::disableX87ExtendedFloatingPointPrecision | ( | ) | [static, protected] |
From: http://www.network-theory.co.uk/docs/gccintro/gccintro_70.html
The IEEE-754 standard defines the bit-level behavior of floating-point arithmetic operations on all modern processors. This allows numerical programs to be ported between different platforms with identical results, in principle. In practice, there are often minor variations caused by differences in the order of operations (depending on the compiler and optimization level) but these are generally not significant.
However, more noticeable discrepancies can be seen when porting numerical programs between x86 systems and other platforms, because the the x87 floating point unit (FPU) on x86 processors computes results using extended precision internally (the values being converted to double precision only when they are stored to memory). In contrast, processors such as SPARC, PA-RISC, Alpha, MIPS and POWER/PowerPC work with native double-precision values throughout. The differences between these implementations lead to changes in rounding and underflow/overflow behavior, because intermediate values have a greater relative precision and exponent range when computed in extended precision. In particular, comparisons involving extended precision values may fail where the equivalent double precision values would compare equal.
To avoid these incompatibilities, the x87 FPU also offers a hardware double-precision rounding mode. In this mode the results of each extended-precision floating-point operation are rounded to double precision in the floating-point registers by the FPU. It is important to note that the rounding only affects the precision, not the exponent range, so the result is a hybrid double-precision format with an extended range of exponents.
On BSD systems such as FreeBSD, NetBSD and OpenBSD, the hardware double-precision rounding mode is the default, giving the greatest compatibility with native double precision platforms. On x86 GNU/Linux systems the default mode is extended precision (with the aim of providing increased accuracy). To enable the double-precision rounding mode it is necessary to override the default setting on per-process basis using the FLDCW "floating-point load control-word" machine instruction, which will be performed by this method.
Definition at line 643 of file Application.cpp.
| void Application::doInit | ( | ) | [protected, virtual] |
| void Application::doReadCommandLine | ( | int | argc, | |
| char * | argv[] | |||
| ) | [protected, virtual] |
| void Application::doRun | ( | ) | [protected, virtual] |
| void Application::doShutdown | ( | ) | [protected, virtual] |
| int Application::doStatus | ( | ) | const [protected, virtual] |
| std::string Application::getPathToPyConfig | ( | ) | [static, protected] |
Definition at line 591 of file Application.cpp.
| wns::pyconfig::View Application::getWNSView | ( | ) | const [protected] |
Definition at line 623 of file Application.cpp.
| void Application::loadModules | ( | ) | [protected] |
Definition at line 651 of file Application.cpp.
| void Application::stopProbes | ( | ) | [protected] |
Definition at line 756 of file Application.cpp.
| void Application::unexpectedHandler | ( | ) | [static, protected] |
Definition at line 635 of file Application.cpp.
| void Application::writeFingerprint | ( | ) | [protected] |
Definition at line 777 of file Application.cpp.
bool wns::simulator::Application::absolutePath_ [protected] |
Definition at line 331 of file Application.hpp.
boost::program_options::variables_map wns::simulator::Application::arguments_ [protected] |
brief Holds the command line parameters
Definition at line 270 of file Application.hpp.
bool wns::simulator::Application::attachDebugger_ [protected] |
Definition at line 285 of file Application.hpp.
Definition at line 250 of file Application.hpp.
std::string wns::simulator::Application::configFile_ [protected] |
Definition at line 230 of file Application.hpp.
Definition at line 235 of file Application.hpp.
Definition at line 345 of file Application.hpp.
std::string wns::simulator::Application::debuggerName_ [protected] |
Definition at line 280 of file Application.hpp.
std::auto_ptr<wns::events::scheduler::Monitor> wns::simulator::Application::eventSchedulerMonitor_ [protected] |
Definition at line 302 of file Application.hpp.
bool wns::simulator::Application::extendedPrecision_ [protected] |
Definition at line 307 of file Application.hpp.
bool wns::simulator::Application::interactiveConfig_ [protected] |
Definition at line 290 of file Application.hpp.
bool wns::simulator::Application::lazyBinding_ [protected] |
Definition at line 329 of file Application.hpp.
bool wns::simulator::Application::listLoadedModules_ [protected] |
Definition at line 322 of file Application.hpp.
std::list<wns::module::Base*> wns::simulator::Application::loadedModules_ [protected] |
Definition at line 327 of file Application.hpp.
Definition at line 297 of file Application.hpp.
std::list<pyconfig::View> wns::simulator::Application::moduleViews_ [protected] |
Definition at line 317 of file Application.hpp.
boost::program_options::options_description wns::simulator::Application::options_ [protected] |
Definition at line 265 of file Application.hpp.
std::auto_ptr<wns::probe::bus::ProbeBusRegistry> wns::simulator::Application::probeBusRegistry [protected] |
Definition at line 336 of file Application.hpp.
ProbeWriter wns::simulator::Application::probeWriter [protected] |
Definition at line 340 of file Application.hpp.
std::string wns::simulator::Application::programName_ [protected] |
Definition at line 275 of file Application.hpp.
Definition at line 260 of file Application.hpp.
std::auto_ptr<wns::simulator::ISimulationModel> wns::simulator::Application::simulationModel_ [protected] |
Definition at line 312 of file Application.hpp.
int wns::simulator::Application::status_ [protected] |
Definition at line 338 of file Application.hpp.
bool wns::simulator::Application::testing_ [protected] |
Definition at line 245 of file Application.hpp.
Definition at line 255 of file Application.hpp.
bool wns::simulator::Application::verbose_ [protected] |
Definition at line 240 of file Application.hpp.
1.5.5