MIRA
Public Member Functions | Protected Attributes | List of all members
CANOpenNodeStatusFuture Class Reference

Wrapper for boost::unique_future that is specialized for NMT status requests. More...

#include <can/CANOpenNMTMaster.h>

Public Member Functions

 CANOpenNodeStatusFuture ()
 Default constructor. More...
 
 CANOpenNodeStatusFuture (boost::unique_future< CANOpenNodeStatus > other, CANOpenNMTMaster *master, uint64 requestID)
 Constructor. More...
 
 CANOpenNodeStatusFuture (CANOpenNodeStatusFuture &&other)
 Move constructor. More...
 
CANOpenNodeStatusFutureoperator= (CANOpenNodeStatusFuture &&other)
 Move assignment operator. More...
 
 ~CANOpenNodeStatusFuture ()
 Destructor. More...
 
bool isReady () const
 Checks to see if the result of the status request associated with this future is set. More...
 
bool hasException () const
 Returns true if the status request associated with this future has finished with an exception rather than a return value. More...
 
bool hasValue () const
 Returns true if the status request call associated with this future has finished with a return value value rather than an exception. More...
 
void wait () const
 Waits and blocks the current thread until the result of the associated status request is ready. More...
 
template<typename Duration >
bool timedWait (Duration const &relTime) const
 Waits and blocks the current thread until the result of the associated status request is ready, or the time duration specified by waitDuration has elapsed. More...
 
bool timedWaitUntil (boost::system_time const &absTime) const
 Waits and blocks the current thread until the result of the associated status request is ready, or the time point specified by waitDuration has passed. More...
 
void swap (CANOpenNodeStatusFuture &other)
 Swaps ownership of the asynchronous results associated with other and *this. More...
 
CANOpenNodeStatus get ()
 Obtains the return value of the status request. More...
 

Protected Attributes

CANOpenNMTMastermNMTMaster
 
uint64 mRequestID
 
boost::unique_future< CANOpenNodeStatusmFuture
 

Detailed Description

Wrapper for boost::unique_future that is specialized for NMT status requests.

Constructor & Destructor Documentation

◆ CANOpenNodeStatusFuture() [1/3]

Default constructor.

◆ CANOpenNodeStatusFuture() [2/3]

CANOpenNodeStatusFuture ( boost::unique_future< CANOpenNodeStatus other,
CANOpenNMTMaster master,
uint64  requestID 
)
inline

Constructor.

◆ CANOpenNodeStatusFuture() [3/3]

Move constructor.

◆ ~CANOpenNodeStatusFuture()

Destructor.

Member Function Documentation

◆ operator=()

CANOpenNodeStatusFuture& operator= ( CANOpenNodeStatusFuture &&  other)
inline

Move assignment operator.

◆ isReady()

bool isReady ( ) const
inline

Checks to see if the result of the status request associated with this future is set.

◆ hasException()

bool hasException ( ) const
inline

Returns true if the status request associated with this future has finished with an exception rather than a return value.

◆ hasValue()

bool hasValue ( ) const
inline

Returns true if the status request call associated with this future has finished with a return value value rather than an exception.

◆ wait()

void wait ( ) const
inline

Waits and blocks the current thread until the result of the associated status request is ready.

This is an interruption point.

◆ timedWait()

bool timedWait ( Duration const &  relTime) const
inline

Waits and blocks the current thread until the result of the associated status request is ready, or the time duration specified by waitDuration has elapsed.

This is an interruption point.

◆ timedWaitUntil()

bool timedWaitUntil ( boost::system_time const &  absTime) const
inline

Waits and blocks the current thread until the result of the associated status request is ready, or the time point specified by waitDuration has passed.

This is an interruption point.

◆ swap()

void swap ( CANOpenNodeStatusFuture other)
inline

Swaps ownership of the asynchronous results associated with other and *this.

◆ get()

CANOpenNodeStatus get ( )
inline

Obtains the return value of the status request.

Note
This method will block until the result becomes available.
This method will throw the exception that may have occurred on the server side while processing the call.
See also
wait(), timedWait(), hasValue(), hasException()

Member Data Documentation

◆ mNMTMaster

CANOpenNMTMaster* mNMTMaster
protected

◆ mRequestID

uint64 mRequestID
protected

◆ mFuture

boost::unique_future<CANOpenNodeStatus> mFuture
protected

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