OSVR Framework (Internal Development Docs)  0.6-1962-g59773924
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
osvr::connection::RequestToSend Class Reference

RAII object for use by an async thread to manage a request to send. More...

#include <osvr/Connection/AsyncAccessControl.h>

Inheritance diagram for osvr::connection::RequestToSend:

Public Member Functions

 RequestToSend (AsyncAccessControl &aac)
 Creates an RAII object to manage the request to send - note that it does not immediately request to send.
 
 ~RequestToSend ()
 Destructor.
 
bool request ()
 Issues a blocking request to send. More...
 
bool isNested () const
 Method to find out if this is a nested RTS - primarily for testing. More...
 

Detailed Description

RAII object for use by an async thread to manage a request to send.

Todo:
allow timeout on RTS enum RequestResults { RR_CTS_GRANTED, RR_DENIED, RR_TIMED_OUT };

Definition at line 129 of file AsyncAccessControl.h.

Member Function Documentation

bool osvr::connection::RequestToSend::request ( )

Issues a blocking request to send.

Can only be called once in the lifetime of a RequestToSend object!

Returns
true if request granted, false if denied.

OK, so we're recursive here. Make a note and don't add another locking layer

Take the main thread "free to go" status lock.

Definition at line 59 of file AsyncAccessControl.cpp.

bool osvr::connection::RequestToSend::isNested ( ) const
inline

Method to find out if this is a nested RTS - primarily for testing.

Only valid to call following a true return from request()

Definition at line 150 of file AsyncAccessControl.h.


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