|
Robot Raconteur Core C++ Library
|
Base class for WireConnection. More...
#include <WireMember.h>
Public Member Functions | |
| virtual uint32_t | GetEndpoint () |
| Returns the Robot Raconteur node Endpoint ID. | |
| virtual TimeSpec | GetLastValueReceivedTime () |
| Get the timestamp of the last received value. | |
| virtual TimeSpec | GetLastValueSentTime () |
| Get the timestamp of the last sent value. | |
| virtual void | Close () |
| Close the wire connection. | |
| virtual void | AsyncClose (boost::function< void(const boost::shared_ptr< RobotRaconteurException > &)> handler, int32_t timeout) |
| Asynchronously close the wire connection. | |
| virtual bool | GetInValueValid () |
| Get if the InValue is valid. | |
| virtual bool | GetOutValueValid () |
| Get if the OutValue is valid. | |
| bool | WaitInValueValid (int32_t timeout=RR_TIMEOUT_INFINITE) |
| Waits for InValue to be valid. | |
| bool | WaitOutValueValid (int32_t timeout=RR_TIMEOUT_INFINITE) |
| Waits for OutValue to be valid. | |
| virtual bool | GetIgnoreInValue () |
| Get if wire connection is ignoring incoming values. | |
| virtual void | SetIgnoreInValue (bool ignore) |
| Set whether wire connection should ignore incoming values. | |
| MemberDefinition_Direction | Direction () |
| The direction of the wire. | |
| virtual int32_t | GetInValueLifespan () |
| Get the lifespan of InValue. | |
| virtual void | SetInValueLifespan (int32_t millis) |
| Set the lifespan of InValue. | |
| virtual int32_t | GetOutValueLifespan () |
| Get the lifespan of OutValue. | |
| virtual void | SetOutValueLifespan (int32_t millis) |
| Set the lifespan of OutValue. | |
Base class for WireConnection.
Base class for templated WireConnection
|
virtual |
Asynchronously close the wire connection.
Same as Close() but returns asynchronously
| handler | A handler function to call on completion, possibly with an exception |
| timeout | Timeout in milliseconds, or RR_TIMEOUT_INFINITE for no timeout |
Reimplemented in RobotRaconteur::WireConnection< T >.
|
virtual |
Close the wire connection.
Close the wire connection. Blocks until close complete. The peer wire connection is destroyed automatically.
Reimplemented in RobotRaconteur::WireConnection< T >.
| MemberDefinition_Direction RobotRaconteur::WireConnectionBase::Direction | ( | ) |
The direction of the wire.
Wires may be declared readonly or writeonly in the service definition file. (If neither is specified, the wire is assumed to be full duplex.) readonly wire may only send out values from service to client. writeonly wires may only send out values from client to service.
|
virtual |
Returns the Robot Raconteur node Endpoint ID.
Returns the endpoint associated with the ClientContext or ServerEndpoint associated with the wire connection.
|
virtual |
|
virtual |
Get the lifespan of InValue.
InValue may optionally have a finite lifespan specified in milliseconds. Once the lifespan after reception has expired, the InValue is cleared, and becomes invalid. Attempts to access InValue will result in a ValueNotSetException.
|
virtual |
Get if the InValue is valid.
The InValue is valid if a value has been received and the value has not expired
|
virtual |
Get the timestamp of the last received value.
Returns the timestamp of the value in the senders clock
|
virtual |
Get the timestamp of the last sent value.
Returns the timestamp of the last sent value in the local clock
|
virtual |
Get the lifespan of OutValue.
OutValue may optionally have a finite lifespan specified in milliseconds. Once the lifespan after sending has expired, the OutValue is cleared, and becomes invalid. Attempts to access OutValue will result in a ValueNotSetException.
|
virtual |
Get if the OutValue is valid.
The OutValue is valid if a value has been set using SetOutValue()
|
virtual |
Set whether wire connection should ignore incoming values.
Wire connections may optionally desire to ignore incoming values. This is useful if the connection is only being used to send out values, and received values may create a potential memory . If ignore is true, incoming values will be discarded.
| ignore | If true, incoming values are ignored. If false, the most recent value is stored. |
|
virtual |
Set the lifespan of InValue.
InValue may optionally have a finite lifespan specified in milliseconds. Once the lifespan after reception has expired, the InValue is cleared and becomes invalid. Attempts to access InValue will result in ValueNotSetException.
InValue lifespans may be used to avoid using a stale value received by the wire. If the lifespan is not set, the wire will continue to return the last received value, even if the value is old.
| millis | The lifespan in millisecond, or RR_VALUE_LIFESPAN_INFINITE for infinite lifespan |
|
virtual |
Set the lifespan of OutValue.
OutValue may optionally have a finite lifespan specified in milliseconds. Once the lifespan after sending has expired, the OutValue is cleared and becomes invalid. Attempts to access OutValue will result in ValueNotSetException.
OutValue lifespans may be used to avoid using a stale value sent by the wire. If the lifespan is not set, the wire will continue to return the last sent value, even if the value is old.
| millis | The lifespan in millisecond, or RR_VALUE_LIFESPAN_INFINITE for infinite lifespan |
| bool RobotRaconteur::WireConnectionBase::WaitInValueValid | ( | int32_t | timeout = RR_TIMEOUT_INFINITE | ) |
Waits for InValue to be valid.
Blocks the current thread until InValue is valid, with an optional timeout. Returns true if InValue is valid, or false if timeout occurred.
| timeout | Timeout in milliseconds, or RR_TIMEOUT_INFINITE for no timeout |
| bool RobotRaconteur::WireConnectionBase::WaitOutValueValid | ( | int32_t | timeout = RR_TIMEOUT_INFINITE | ) |
Waits for OutValue to be valid.
Blocks the current thread until OutValue is valid, with an optional timeout. Returns true if OutValue is valid, or false if timeout occurred.
| timeout | Timeout in milliseconds, or RR_TIMEOUT_INFINITE for no timeout |