#include <LOW_platformMisc.h>
Inheritance diagram for LOW_platformMisc:
Public Types | |
typedef LOW_platformMisc::timestamp_t | timestamp_t |
Data structure for timestamps. | |
Public Member Functions | |
class_DERIVE_FROM_EXCEPTION (platformMisc_error, LOW_exception) | |
Exception base class for all exceptions thrown by LOW_platformMisc. | |
Static Public Member Functions | |
const void | secSleep (const unsigned int inSeconds) |
Sleep for a specified number of seconds. | |
const void | milliSleep (const unsigned long inMilliSeconds) |
Sleep for a specified number of milli seconds. | |
const void | microSleep (const unsigned long inMicroSeconds) |
Sleep for a specified number of micro seconds. | |
const void | nanoSleep (const unsigned long inNanoSeconds) |
Sleep for a specified number of nano seconds. | |
const void | nanoSleep (const unsigned int inSeconds, const unsigned long inNanoSeconds) |
Sleep for a specified number of nano seconds. | |
const void | getTimestamp (timestamp_t &outTimestamp) |
Get a timestamp. | |
const void | diffTimestamp (const timestamp_t &inT1, const timestamp_t &inT2, timestamp_t &outResult) |
Calculate difference of two timestamps. | |
const LOW_platformMiscFactory::threadIdent_t | getThreadID () |
Get identifier for current thread. | |
const std::string | getHostname () |
Get the host's name. | |
Protected Member Functions | |
virtual const void | p_secSleep (const unsigned int inSeconds) const=0 |
Sleep for a specified number of seconds. | |
virtual const void | p_milliSleep (const unsigned long inMilliSeconds) const=0 |
Sleep for a specified number of milli seconds. | |
virtual const void | p_microSleep (const unsigned long inMicroSeconds) const=0 |
Sleep for a specified number of micro seconds. | |
virtual const void | p_nanoSleep (const unsigned long inNanoSeconds) const=0 |
Sleep for a specified number of nano seconds. | |
virtual const void | p_nanoSleep (const unsigned int inSeconds, const unsigned long inNanoSeconds) const=0 |
Sleep for a specified number of nano seconds. | |
virtual const void | p_getTimestamp (timestamp_t &outTimestamp) const=0 |
Get a timestamp. | |
virtual const LOW_platformMiscFactory::threadIdent_t | p_getThreadID () const=0 |
Get identifier for current thread. | |
virtual const std::string | p_getHostname () const=0 |
Get the host's name. | |
Static Private Attributes | |
const LOW_platformMisc * | runtimeInstance = LOW_platformMiscFactory::new_platformMisc() |
Runtime instance of platform specific implementation of this class. |
The methods are accessed via the public and static access functions. This class itself takes care of creating an appropiate instance.
Specific platforms dereive their implementation classes from this class.
The instances are created by LOW_platformMiscFactory, following the factory design pattern.
Note: There is no prescribed constructor. A class deriving from this one should only provide the default constructor.
This class is thread-safe.
Definition at line 45 of file LOW_platformMisc.h.
|
Data structure for timestamps.
|
|
Exception base class for all exceptions thrown by LOW_platformMisc.
|
|
Calculate difference of two timestamps.
Definition at line 61 of file LOW_platformMisc.cpp. References LOW_platformMisc::timestamp_t::milSec, and LOW_platformMisc::timestamp_t::sec. Referenced by LOW_compJalousieController::measureTransitionDelays(). |
|
Get the host's name.
Definition at line 83 of file LOW_platformMisc.cpp. References p_getHostname(), and runtimeInstance. |
|
Get identifier for current thread.
Definition at line 77 of file LOW_platformMisc.cpp. References p_getThreadID(), and runtimeInstance. Referenced by LOW_objectSynchronizer::__synchronizeMethodReadWeak::__synchronizeMethodReadWeak(), LOW_objectSynchronizer::__synchronizeMethodWrite::__synchronizeMethodWrite(), LOW_objectSynchronizer::__synchronizeMethodWriteWeak::__synchronizeMethodWriteWeak(), LOW_objectSynchronizer::__synchronizeStaticReadWeak::__synchronizeStaticReadWeak(), LOW_objectSynchronizer::__synchronizeStaticWrite::__synchronizeStaticWrite(), LOW_objectSynchronizer::__synchronizeStaticWriteWeak::__synchronizeStaticWriteWeak(), and LOW_helper_msglog::fprintLogHeader(). |
|
Get a timestamp.
Definition at line 55 of file LOW_platformMisc.cpp. References p_getTimestamp(), and runtimeInstance. Referenced by LOW_compJalousieController::measureTransitionDelays(). |
|
Sleep for a specified number of micro seconds.
Definition at line 37 of file LOW_platformMisc.cpp. References p_microSleep(), and runtimeInstance. Referenced by LOW_linkDS2490::programPulse(), and LOW_linkDS2480B::pulse_cmd_manual(). |
|
Sleep for a specified number of milli seconds.
Definition at line 31 of file LOW_platformMisc.cpp. References p_milliSleep(), and runtimeInstance. Referenced by LOW_compJalousieController::moveDownStop(), LOW_compJalousieController::moveUpStop(), LOW_linkDS2480B::pulse_cmd_manual(), LOW_linkDS2480B::resetLinkAdapter(), LOW_linkDS2490::strongPullup(), and LOW_linkDS2490::waitUntilIdle(). |
|
Sleep for a specified number of nano seconds.
Definition at line 49 of file LOW_platformMisc.cpp. References p_nanoSleep(), and runtimeInstance. |
|
Sleep for a specified number of nano seconds.
Definition at line 43 of file LOW_platformMisc.cpp. References p_nanoSleep(), and runtimeInstance. |
|
Get the host's name. Virtual method to be implemented by OS specific subclasses.
Implemented in LOW_platformMisc_Linux. Referenced by getHostname(). |
|
Get identifier for current thread. Virtual method to be implemented by OS specific subclasses.
Implemented in LOW_platformMisc_Linux. Referenced by getThreadID(). |
|
Get a timestamp. Virtual method to be implemented by OS specific subclasses.
Referenced by getTimestamp(). |
|
Sleep for a specified number of micro seconds. Virtual method to be implemented by OS specific subclasses.
Implemented in LOW_platformMisc_Linux. Referenced by microSleep(). |
|
Sleep for a specified number of milli seconds. Virtual method to be implemented by OS specific subclasses.
Implemented in LOW_platformMisc_Linux. Referenced by milliSleep(). |
|
Sleep for a specified number of nano seconds. Virtual method to be implemented by OS specific subclasses.
Implemented in LOW_platformMisc_Linux. |
|
Sleep for a specified number of nano seconds. Virtual method to be implemented by OS specific subclasses.
Implemented in LOW_platformMisc_Linux. Referenced by nanoSleep(). |
|
Sleep for a specified number of seconds. Virtual method to be implemented by OS specific subclasses.
Implemented in LOW_platformMisc_Linux. Referenced by secSleep(). |
|
Sleep for a specified number of seconds.
Definition at line 25 of file LOW_platformMisc.cpp. References p_secSleep(), and runtimeInstance. Referenced by LOW_linkPassiveSerial::strongPullup(). |
|
Runtime instance of platform specific implementation of this class. Having created this instance relieves the burden of explicitely creating/accessing an instance by users of methods in this class. Definition at line 22 of file LOW_platformMisc.cpp. Referenced by getHostname(), getThreadID(), getTimestamp(), microSleep(), milliSleep(), nanoSleep(), and secSleep(). |