Pylon::WaitObjectEx#
#include <pylon/WaitObject.h>
Inherits from Pylon::WaitObject
Public Functions#
| Name | |
|---|---|
| WaitObjectEx | Create(bool initiallySignalled =false) Creates an event object (manual reset event) |
| void | Sleep(unsigned long ms) Suspend calling thread for specified time. |
| WaitObjectEx() Constructs an "empty" wait object, i.e., the wait object is not attached to a platform dependent wait object (IsValid() == false) | |
| virtual | ~WaitObjectEx() Destroys the waitobject. |
| void | Signal() Set the object to signaled state. |
| void | Reset() Reset the object to unsignaled state. |
| WaitObjectEx(WaitObject_t h, bool duplicate =true) Constructor using an existing windows handle (duplicate=false -> take ownership like std:auto_ptr) | |
| bool | IsValid() const Checks if the wait object is valid. |
| bool | Wait(unsigned int timeout) const Wait for the object to be signaled. |
| EWaitExResult | WaitEx(unsigned int timeout, bool bAlertable) const Wait for the object to be signaled (interruptible) |
| operator WaitObject_t() const conversion operator |
Protected Functions#
| Name | |
|---|---|
| WaitObject_t | Duplicate(WaitObject_t h) const |
Protected Attributes#
| Name | |
|---|---|
| WaitObject_t | m_Native |
Additional inherited members#
Public Functions inherited from Pylon::WaitObject
| Name | |
|---|---|
| WaitObject() Constructs an "empty" wait object, i.e., the wait object is not attached to a platform dependent wait object (IsValid() == false) | |
| virtual | ~WaitObject() Destructor. |
| WaitObject(const WaitObject & ) Copy constructor (duplicates the wrapped handle/file descriptor) | |
| WaitObject & | operator=(const WaitObject & ) Assignment operator (duplicates the wrapped handle/file descriptor) |
| WaitObject(WaitObject_t h, bool duplicate =true) Constructor taking existing handle (duplicate=false -> take ownership like std:auto_ptr) |
Public Functions Documentation#
Create#
static WaitObjectEx Create(
bool initiallySignalled =false
)
Creates an event object (manual reset event)
Sleep#
static void Sleep(
unsigned long ms
)
Suspend calling thread for specified time.
Parameters:
- ms wait time in ms
WaitObjectEx#
WaitObjectEx()
Constructs an "empty" wait object, i.e., the wait object is not attached to a platform dependent wait object (IsValid() == false)
Use the static WaitObjectEx::Create() method to create instances of the WaitObjectEx class instead.
~WaitObjectEx#
inline virtual ~WaitObjectEx()
Destroys the waitobject.
Signal#
void Signal()
Set the object to signaled state.
Reset#
void Reset()
Reset the object to unsignaled state.
WaitObjectEx#
explicit WaitObjectEx(
WaitObject_t h,
bool duplicate =true
)
Constructor using an existing windows handle (duplicate=false -> take ownership like std:auto_ptr)
IsValid#
bool IsValid() const
Checks if the wait object is valid.
Return: true if the object contains a valid handle/file descriptor
Don't call the Wait methods() for an invalid wait object. Wait objects returned by the pylon libraries are valid.
Wait#
bool Wait(
unsigned int timeout
) const
Wait for the object to be signaled.
Parameters:
- timeout timeout in ms
Return: false when the timeout has been expired, true when the waiting was successful before the timeout has been expired.
WaitEx#
EWaitExResult WaitEx(
unsigned int timeout,
bool bAlertable
) const
Wait for the object to be signaled (interruptible)
Parameters:
- timeout timeout in ms
- bAlertable When the bAlertable parameter is set to true, the function waits until either the timeout elapses, the object enters the signaled state, or the wait operation has been interrupted. For Windows, the wait operation is interrupted by queued APCs or I/O completion routines. For Linux, the wait operation can be interrupted by signals.
Return: The returned Pylon::EWaitExResult value indicates the result of the wait operation.
operator WaitObject_t#
operator WaitObject_t() const
conversion operator
Return: the native Win32 handle wrapped by the WaitObject. (Not supported by pylon4Linux)
Protected Functions Documentation#
Duplicate#
WaitObject_t Duplicate(
WaitObject_t h
) const
Protected Attributes Documentation#
m_Native#
WaitObject_t m_Native;
Updated on 5 July 2022 at 15:30:00