43 #ifndef _MLAB_SDOFUTURE_H_ 44 #define _MLAB_SDOFUTURE_H_ 47 #include <boost/thread/future.hpp> 50 namespace mira {
namespace can {
116 template<
typename Duration>
118 return mFuture.timed_wait(relTime);
127 return mFuture.timed_wait_until(absTime);
162 template <
typename R>
189 #if BOOST_VERSION / 100 % 1000 > 56 190 typedef typename boost::detail::shared_state<R>::move_dest_type
ReturnValue;
192 typedef typename boost::detail::future_traits<R>::move_dest_type
ReturnValue;
210 ReturnValue
get() {
return this->
mFuture.get(); }
bool timedWait(Duration const &relTime) const
Waits and blocks the current thread until the result of the associated RPC call is ready...
Definition: SDOFuture.h:117
virtual void onDestructFuture(uint64 requestID)=0
SDOClientBase * mClient
Definition: SDOFuture.h:139
bool timedWaitUntil(boost::system_time const &absTime) const
Waits and blocks the current thread until the result of the associated RPC call is ready...
Definition: SDOFuture.h:126
SDOFutureCommon()
Definition: SDOFuture.h:73
Definition: SDOFuture.h:54
~SDOFutureCommon()
Definition: SDOFuture.h:78
bool hasValue() const
Returns true if the RPC call associated with this future has finished with a return value value rathe...
Definition: SDOFuture.h:101
bool isReady() const
Checks to see if the result of the RPC call associated with this future is set.
Definition: SDOFuture.h:89
SDOFutureCommon(SDOClientBase *client, uint64 requestID)
Definition: SDOFuture.h:75
SDOFuture(SDOFuture &&other)
move constructor
Definition: SDOFuture.h:176
void swap(SDOFutureCommon< R > &other)
Swaps ownership of the asynchronous results associated with other and *this.
Definition: SDOFuture.h:131
SDOFuture()
Definition: SDOFuture.h:224
SDOFuture & operator=(SDOFuture &&other)
move assignment operator
Definition: SDOFuture.h:181
virtual ~SDOClientBase()
Definition: SDOFuture.h:57
bool hasException() const
Returns true if the RPC call associated with this future has finished with an exception rather than a...
Definition: SDOFuture.h:95
A SDOFuture is a proxy for the result of an asynchronous SDO upload or download.
Definition: SDOFuture.h:163
SDOFuture(boost::unique_future< void > other, SDOClientBase *client, uint64 requestID)
Definition: SDOFuture.h:226
void wait() const
Waits and blocks the current thread until the result of the associated RPC call is ready...
Definition: SDOFuture.h:108
SDOFuture(boost::unique_future< R > other, SDOClientBase *client, uint64 requestID)
Definition: SDOFuture.h:168
SDOFuture(SDOFuture &&other)
move constructor
Definition: SDOFuture.h:234
uint64 mRequestID
Definition: SDOFuture.h:140
SDOFuture()
Definition: SDOFuture.h:166
boost::unique_future< R > mFuture
Definition: SDOFuture.h:141
boost::detail::future_traits< R >::move_dest_type ReturnValue
The rvalue return value, which essentially can be thought of R&&.
Definition: SDOFuture.h:192
SDOFuture & operator=(SDOFuture &&other)
move assignment operator
Definition: SDOFuture.h:239
Wrapper for boost::unique_future that is specialized for SDO processing.
Definition: SDOFuture.h:69