Robot Raconteur Core C++ Library
Loading...
Searching...
No Matches
RobotRaconteur::WireSubscriptionBase Class Reference

Base class for WireSubscription. More...

#include <Subscription.h>

Inheritance diagram for RobotRaconteur::WireSubscriptionBase:
RobotRaconteur::WireSubscription< T >

Public Member Functions

bool WaitInValueValid (int32_t timeout=RR_TIMEOUT_INFINITE)
 Wait for a valid InValue to be received from a client.
size_t GetActiveWireConnectionCount ()
 Get the number of wire connections currently connected.
bool GetIgnoreInValue ()
 Get if InValue is currently being ignored.
void SetIgnoreInValue (bool ignore)
 Set if InValue should be ignored.
int32_t GetInValueLifespan ()
 Get the InValue lifespan in milliseconds.
void SetInValueLifespan (int32_t millis)
 Set the InValue lifespan in milliseconds.
void Close ()
 Closes the wire subscription.

Detailed Description

Base class for WireSubscription.

Base class for templated WireSubscription

Member Function Documentation

◆ Close()

void RobotRaconteur::WireSubscriptionBase::Close ( )

Closes the wire subscription.

Wire subscriptions are automatically closed when the parent ServiceSubscription is closed or when the node is shut down.

◆ GetActiveWireConnectionCount()

size_t RobotRaconteur::WireSubscriptionBase::GetActiveWireConnectionCount ( )

Get the number of wire connections currently connected.

Returns
size_t The number of active connections

◆ GetIgnoreInValue()

bool RobotRaconteur::WireSubscriptionBase::GetIgnoreInValue ( )

Get if InValue is currently being ignored.

Returns
true InValue is being ignored
false InValue is not being ignored

◆ GetInValueLifespan()

int32_t RobotRaconteur::WireSubscriptionBase::GetInValueLifespan ( )

Get the InValue lifespan in milliseconds.

Get the lifespan of InValue in milliseconds. The value will expire after the specified lifespan, becoming invalid. Use -1 for infinite lifespan.

Returns
int32_t The lifespan in milliseconds. -1 for infinite

◆ SetIgnoreInValue()

void RobotRaconteur::WireSubscriptionBase::SetIgnoreInValue ( bool ignore)

Set if InValue should be ignored.

See WireConnection::SetIgnoreInValue()

If true, InValue will be ignored for all wire connections.

Parameters
ignore

◆ SetInValueLifespan()

void RobotRaconteur::WireSubscriptionBase::SetInValueLifespan ( int32_t millis)

Set the InValue lifespan in milliseconds.

Set the lifespan of InValue in milliseconds. The value will expire after the specified lifespan, becoming invalid. Use -1 for infinite lifespan.

See also WireConnection::SetInValueLifespan()

Parameters
millisThe lifespan in milliseconds. -1 for infinite

◆ WaitInValueValid()

bool RobotRaconteur::WireSubscriptionBase::WaitInValueValid ( int32_t timeout = RR_TIMEOUT_INFINITE)

Wait for a valid InValue to be received from a client.

Blocks the current thread until value is received or timeout

Parameters
timeoutThe timeout in milliseconds
Returns
true A value was received
false The wait timed out, or RR_TIMEOUT_INFINITE for no timeout

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