|
cisst-saw
|
#include <mtsEventReceiver.h>
Public Member Functions | |
| mtsEventReceiverWrite () | |
| ~mtsEventReceiverWrite () | |
| mtsCommandWriteBase * | GetCommand () |
| void | SetHandlerCommand (mtsCommandWriteBase *commandHandler) |
| template<class __classType, class __argumentType> | |
| mtsCommandWriteBase * | SetHandler (void(__classType::*method)(const __argumentType &), __classType *classInstantiation, mtsEventQueueingPolicy queueingPolicy=MTS_INTERFACE_EVENT_POLICY) |
| virtual bool | PrepareToWait (mtsGenericObject &obj) |
| bool | IsArgValid () const |
| virtual bool | Wait () |
| virtual bool | WaitWithTimeout (double timeoutInSec) |
| virtual void | ClearWait () |
| bool | RemoveHandler (void) |
| void | ToStream (std::ostream &outputStream) const |
| virtual bool | PrepareToWait () |
| Public Member Functions inherited from mtsEventReceiverBase | |
| mtsEventReceiverBase () | |
| virtual | ~mtsEventReceiverBase () |
| void | SetName (const std::string &name) |
| virtual std::string | GetName () const |
| virtual void | SetRequired (const std::string &name, mtsInterfaceRequired *req) |
| virtual void | SetThreadSignal (osaThreadSignal *signal) |
| virtual void | Detach () |
Protected Member Functions | |
| void | EventHandler (const mtsGenericObject &arg) |
| Protected Member Functions inherited from mtsEventReceiverBase | |
| bool | CheckRequired () const |
| void | CheckEventSignal () |
| bool | WaitCommon () |
Protected Attributes | |
| mtsCommandWriteBase * | Command |
| mtsCommandWriteBase * | UserHandler |
| mtsGenericObject * | ArgPtr |
| Protected Attributes inherited from mtsEventReceiverBase | |
| std::string | Name |
| mtsInterfaceRequired * | Required |
| osaThreadSignal * | EventSignal |
| bool | OwnEventSignal |
| WaitStates | WaitState |
| osaMutex | WaitMutex |
Additional Inherited Members | |
| Protected Types inherited from mtsEventReceiverBase | |
| enum | WaitStates { EVENT_RECEIVER_IDLE , EVENT_RECEIVER_PREPARING , EVENT_RECEIVER_WAITING , EVENT_RECEIVER_SIGNALED } |
| mtsEventReceiverWrite::mtsEventReceiverWrite | ( | ) |
| mtsEventReceiverWrite::~mtsEventReceiverWrite | ( | ) |
|
virtual |
Clear the WaitState (set to EVENT_RECEIVER_IDLE)
Reimplemented from mtsEventReceiverBase.
|
protected |
| mtsCommandWriteBase * mtsEventReceiverWrite::GetCommand | ( | ) |
Called from mtsInterfaceRequired::BindCommandsAndEvents
|
inline |
|
virtual |
Indicate that the waiting thread is preparing to wait on an event, but that there may be some time before Wait or WaitWithTimeout will be called. Calling this command ensures that if the event if raised after the call to PrepareToWait, but before the call to Wait or WaitWithTimeout, that the Wait or WaitWithTimeout methods will return rather than wait indefinitely. It is not required to call this method, but it is recommended if there is a possibility of an indefinite (or infinite) wait if only a single event is expected and if it can occur before Wait or WaitWithTimeout is called. See the description of WaitStates above.
Reimplemented from mtsEventReceiverBase.
|
virtual |
| bool mtsEventReceiverWrite::RemoveHandler | ( | void | ) |
|
inline |
| void mtsEventReceiverWrite::SetHandlerCommand | ( | mtsCommandWriteBase * | commandHandler | ) |
Called from mtsInterfaceRequired::AddEventHandlerWrite
|
virtual |
Human readable output to stream.
Implements mtsEventReceiverBase.
|
virtual |
Wait for event to be issued. If successful, object specified in PrepareToWait is valid.
Reimplemented from mtsEventReceiverBase.
|
virtual |
Wait for event to be issued, up to specified timeout.
Reimplemented from mtsEventReceiverBase.
|
protected |
|
protected |
|
protected |