All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | List of all members
Pylon::WaitObjectEx Class Reference

A wait object that the user may signal. More...

#include <pylon/WaitObject.h>

Inheritance diagram for Pylon::WaitObjectEx:
Inheritance graph
[legend]

Public Member Functions

 WaitObjectEx ()
 Constructs an "empty" wait object, i.e., the wait object is not attached to a platform dependent wait object (IsValid() == false) More...
 
void Signal ()
 Set the object to signaled state.
 
void Reset ()
 Reset the object to unsignaled state.
 
 WaitObjectEx (int fd)
 Constructor using an existing Linux file descriptor.
 
bool IsValid () const
 Checks if the wait object is valid. More...
 
bool Wait (unsigned int timeout) const
 Wait for the object to be signaled. More...
 
EWaitExResult WaitEx (unsigned int timeout, bool bAlertable) const
 Wait for the object to be signaled (interruptible) More...
 
void Destroy ()
 Invalidates the internal wait object.
 
int GetFd (void) const
 Getter for file descriptor. More...
 
ready_mask_t GetReadyMask () const
 Indicates to what kind of file descriptor set the wrapped file descriptor must be put for usage with the select() or poll() function.
 
 operator struct _WaitObjectPosix_t * () const
 conversion operator More...
 
WaitObject_t & GetWaitObject ()
 Accessor to internal wait object (not supported by pylon for Windows)
 

Static Public Member Functions

static WaitObjectEx Create (bool initiallySignalled=false)
 Creates an event object (manual reset event)
 
static void Sleep (unsigned long ms)
 Suspend calling thread for specified time. More...
 

Detailed Description

A wait object that the user may signal.

Constructor & Destructor Documentation

Pylon::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.

Member Function Documentation

int Pylon::WaitObject::GetFd ( void  ) const
inherited

Getter for file descriptor.

Returns
the file descriptor wrapped by the WaitObject. When the file descriptor is added to the file descriptor set indicated by the GetReadyMask() method, the select() or poll() function can be used to wait for pylon and non-pylon events simultaneously.
bool Pylon::WaitObject::IsValid ( ) const
inherited

Checks if the wait object is valid.

Don't call the Wait methods() for an invalid wait object. Wait objects returned by the pylon libraries are valid.

Returns
true if the object contains a valid handle/file descriptor
Pylon::WaitObject::operator struct _WaitObjectPosix_t * ( ) const
inherited

conversion operator

Returns
the internal wait object handle. (Not supported by pylon4Windows)
static void Pylon::WaitObject::Sleep ( unsigned long  ms)
staticinherited

Suspend calling thread for specified time.

Parameters
mswait time in ms
bool Pylon::WaitObject::Wait ( unsigned int  timeout) const
inherited

Wait for the object to be signaled.

Parameters
timeouttimeout in ms
Returns
false when the timeout has been expired, true when the waiting was successful before the timeout has been expired.
EWaitExResult Pylon::WaitObject::WaitEx ( unsigned int  timeout,
bool  bAlertable 
) const
inherited

Wait for the object to be signaled (interruptible)

Parameters
timeouttimeout in ms
bAlertableWhen 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.
Returns
The returned Pylon::EWaitExResult value indicates the result of the wait operation.

The documentation for this class was generated from the following file:

pylon 5.0.5
Copyright © 2006-2016 Basler AG (Thu Aug 11 2016 18:01:28)