Platform independent class for thread creation.
More...
#include <uathread.h>
Inherited by IOManagerUaNodePrivate, SamplingEngine [private]
, UaClientSdk::UaSessionPrivate, UaJobThread, UaServer, and UaSubscriptionManager.
|
| UaThread () |
| Constructs a thread management object without starting the thread.
|
|
virtual | ~UaThread () |
| Destroys the thread management object.
|
|
virtual void | start () |
| Starts the thread managed by this object. More...
|
|
OpcUa_Boolean | wait (OpcUa_UInt32 time=OpcUa_UInt32_Max) |
| Waits for the termination of the thread. More...
|
|
OpcUa_Boolean | running () const |
| Returns the running state of the thread. More...
|
|
OpcUa_Boolean | finished () const |
| Returns the running state of the thread. More...
|
|
|
static OpcUa_UInt32 | currentThread () |
| Get thread ID of current thread. More...
|
|
static void | sleep (OpcUa_UInt32 secs) |
| Sleep for n seconds. More...
|
|
static void | msleep (OpcUa_UInt32 msecs) |
| Sleep for n milliseconds. More...
|
|
static void | usleep (OpcUa_UInt32 usecs) |
| Sleep for n microseconds. More...
|
|
Platform independent class 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.
OpcUa_UInt32 UaThread::currentThread |
( |
| ) |
|
|
static |
Get thread ID of current thread.
- Returns
- the thread ID of current thread.
OpcUa_Boolean UaThread::finished |
( |
| ) |
const |
Returns the running state of the thread.
- Returns
- true if finished false if not.
void UaThread::msleep |
( |
OpcUa_UInt32 |
msecs | ) |
|
|
static |
Sleep for n milliseconds.
- Parameters
-
msecs | the milliseconds to sleep |
OpcUa_Boolean UaThread::running |
( |
| ) |
const |
Returns the running state of the thread.
- Returns
- true if running false if not.
void UaThread::sleep |
( |
OpcUa_UInt32 |
secs | ) |
|
|
static |
Sleep for n seconds.
- Parameters
-
secs | the seconds to sleep. |
Starts the thread managed by this object.
void UaThread::usleep |
( |
OpcUa_UInt32 |
usecs | ) |
|
|
static |
Sleep for n microseconds.
- Parameters
-
usecs | the microseconds to sleep |
OpcUa_Boolean UaThread::wait |
( |
OpcUa_UInt32 |
time = OpcUa_UInt32_Max | ) |
|
Waits for the termination of the thread.
- Parameters
-
time | the time when to shut down. |
- Returns
- true if the thread is still running false if the thread is not longer running.
The documentation for this class was generated from the following files:
- D:/work/uasdkcpp/src/uabase/uabasecpp/uathread.h
- D:/work/uasdkcpp/src/uabase/uabasecpp/uathread.cpp