Platfrom independent classs for thread creation. A UaThreads represents a separate thread of control within the program; it shares data with all the other threads within the process but executes independently in the way that a separate program does on a multitasking operating system. Instead of starting in main(), UaThreads begin executing in run(). It is not possible to create plane copies of this Class.
More...
#include <uathread.h>
List of all members.
|
Public Member Functions |
| UaThread () |
virtual | ~UaThread () |
virtual void | start () |
OpcUa_Boolean | wait (OpcUa_UInt32 time=OpcUa_UInt32_Max) |
OpcUa_Boolean | running () const |
OpcUa_Boolean | finished () const |
Static Public Member Functions |
static OpcUa_UInt32 | currentThread () |
static void | sleep (OpcUa_UInt32 secs) |
static void | msleep (OpcUa_UInt32 msecs) |
static void | usleep (OpcUa_UInt32 usecs) |
Detailed Description
Platfrom independent classs for thread creation. A UaThreads represents a separate thread of control within the program; it shares data with all the other threads within the process but executes independently in the way that a separate program does on a multitasking operating system. Instead of starting in main(), UaThreads begin executing in run(). It is not possible to create plane copies of this Class.
Constructor & Destructor Documentation
UaThread::~UaThread |
( |
|
) |
[virtual] |
Member Function Documentation
void UaThread::start |
( |
|
) |
[virtual] |
OpcUa_Boolean UaThread::wait |
( |
OpcUa_UInt32 |
time = OpcUa_UInt32_Max |
) |
|
Waits for shutdown-ready event, signaled by ThreadMain.
- Parameters:
-
| time | the time when to shut down. |
- Returns:
- true if shutdown event false if there is no event.
OpcUa_Boolean UaThread::running |
( |
|
) |
const |
Returns the running state of the thread
- Returns:
- true if running false if not.
OpcUa_Boolean UaThread::finished |
( |
|
) |
const |
Returns the running state of the thread
- Returns:
- true if finished false if not.
OpcUa_UInt32 UaThread::currentThread |
( |
|
) |
[static] |
Get thread ID of current thread
- Returns:
- the thread ID of current thread.
void UaThread::sleep |
( |
OpcUa_UInt32 |
secs |
) |
[static] |
Sleep for n seconds
- Parameters:
-
| secs | the seconds to sleep. |
void UaThread::msleep |
( |
OpcUa_UInt32 |
msecs |
) |
[static] |
Sleep for n milli seconds
- Parameters:
-
| msecs | the milliseconds to sleep |
void UaThread::usleep |
( |
OpcUa_UInt32 |
usecs |
) |
[static] |
Sleep for n micro seconds
- Parameters:
-
| usecs | the microseconds to sleep |
The documentation for this class was generated from the following files:
- src/uabase/uabasecpp/uathread.h
- src/uabase/uabasecpp/uathread.cpp