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

Base class for PipeBroadcaster. More...

#include <PipeMember.h>

Inheritance diagram for RobotRaconteur::PipeBroadcasterBase:
RobotRaconteur::PipeBroadcaster< T >

Public Member Functions

boost::function< bool(const boost::shared_ptr< PipeBroadcasterBase > &, uint32_t, int32_t)> GetPredicate ()
 Get the current predicate callback function.
void SetPredicate (boost::function< bool(const boost::shared_ptr< PipeBroadcasterBase > &, uint32_t, int32_t)> f)
 Set the predicate callback function.
int32_t GetMaxBacklog ()
 Gets the currently configured maximum backlog.
void SetMaxBacklog (int32_t maximum_backlog)
 Set the maximum backlog.

Detailed Description

Base class for PipeBroadcaster.

Base class for templated PipeBroadcaster class

Member Function Documentation

◆ GetMaxBacklog()

int32_t RobotRaconteur::PipeBroadcasterBase::GetMaxBacklog ( )

Gets the currently configured maximum backlog.

Returns
int32_t The maximum backlog

◆ GetPredicate()

boost::function< bool(const boost::shared_ptr< PipeBroadcasterBase > &, uint32_t, int32_t)> RobotRaconteur::PipeBroadcasterBase::GetPredicate ( )

Get the current predicate callback function.

Returns
boost::function<bool(RR_SHARED_PTR<PipeBroadcasterBase>&, uint32_t, int32_t) > The predicate callback function

◆ SetMaxBacklog()

void RobotRaconteur::PipeBroadcasterBase::SetMaxBacklog ( int32_t maximum_backlog)

Set the maximum backlog.

PipeBroadcaster provides flow control by optionally tracking how many packets are in flight to each client pipe endpoint. (This is accomplished using packet acks.) If a maximum backlog is specified, pipe endpoints exceeding this count will stop sending packets.

Parameters
maximum_backlogThe maximum number of packets in flight, or -1 for unlimited

◆ SetPredicate()

void RobotRaconteur::PipeBroadcasterBase::SetPredicate ( boost::function< bool(const boost::shared_ptr< PipeBroadcasterBase > &, uint32_t, int32_t)> f)

Set the predicate callback function.

A predicate is optionally used to regulate when packets are sent to clients. This is used by the BroadcastDownsampler to regulate update rates of packets sent to clients.

The predicate callback is invoked before the broadcaster sends a packet to an endpoint. If the predicate returns true, the packet will be sent. If it is false, the packet will not be sent to that endpoint. The predicate callback must have the following signature:

bool broadcaster_predicate(PipeBroadcasterBasePtr& broadcaster, uint32_t client_endpoint, int32_t

pipe_endpoint_index);

It receives the broadcaster, the client endpoint ID, and the pipe endpoint index. It returns true to send the packet, or false to not send the packet.

Parameters
fThe predicate callback function

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