Robot Raconteur Core C++ Library
Loading...
Searching...
No Matches
RobotRaconteur::PipeEndpointBase Class Referenceabstract

Base class for PipeEndpoint. More...

#include <PipeMember.h>

Inheritance diagram for RobotRaconteur::PipeEndpointBase:
RobotRaconteur::PipeEndpoint< T >

Public Member Functions

virtual int32_t GetIndex ()
 Returns the pipe endpoint index used when endpoint connected.
virtual uint32_t GetEndpoint ()
 Returns the Robot Raconteur node Endpoint ID.
bool GetRequestPacketAck ()
 Get if pipe endpoint is requesting acks.
void SetRequestPacketAck (bool ack)
 Set if pipe endpoint should request packet acks.
virtual void Close ()
 Close the pipe endpoint.
virtual void AsyncClose (boost::function< void(const boost::shared_ptr< RobotRaconteurException > &)> handler, int32_t timeout=RR_TIMEOUT_INFINITE)
 Asynchronously close the pipe endpoint.
virtual size_t Available ()
 Return number of packets in the receive queue.
bool IsUnreliable ()
 Get if pipe endpoint is unreliable.
MemberDefinition_Direction Direction ()
 The direction of the pipe.
bool GetIgnoreReceived ()
 Get if pipe endpoint is ignoring incoming packets.
void SetIgnoreReceived (bool ignore)
 Set whether pipe endpoint should ignore incoming packets.

Detailed Description

Base class for PipeEndpoint.

Base class for templated PipeEndpoint

Member Function Documentation

◆ AsyncClose()

virtual void RobotRaconteur::PipeEndpointBase::AsyncClose ( boost::function< void(const boost::shared_ptr< RobotRaconteurException > &)> handler,
int32_t timeout = RR_TIMEOUT_INFINITE )
virtual

Asynchronously close the pipe endpoint.

Same as Close() but returns asynchronously

Parameters
handlerA handler function to call on completion, possibly with an exception
timeoutTimeout in milliseconds, or RR_TIMEOUT_INFINITE for no timeout

Reimplemented in RobotRaconteur::PipeEndpoint< T >.

◆ Available()

virtual size_t RobotRaconteur::PipeEndpointBase::Available ( )
virtual

Return number of packets in the receive queue.

Invalid for writeonly pipes.

Returns
size_t The number of packets in the receive queue

◆ Close()

virtual void RobotRaconteur::PipeEndpointBase::Close ( )
virtual

Close the pipe endpoint.

Close the pipe endpoint. Blocks until close complete. The peer endpoint is destroyed automatically.

Reimplemented in RobotRaconteur::PipeEndpoint< T >.

◆ Direction()

MemberDefinition_Direction RobotRaconteur::PipeEndpointBase::Direction ( )

The direction of the pipe.

Pipes may be declared readonly or writeonly in the service definition file. (If neither is specified, the pipe is assumed to be full duplex.) readonly pipes may only send packets from service to client. writeonly pipes may only send packets from client to service.

Returns
MemberDefinition_Direction

◆ GetEndpoint()

virtual uint32_t RobotRaconteur::PipeEndpointBase::GetEndpoint ( )
virtual

Returns the Robot Raconteur node Endpoint ID.

Returns the endpoint associated with the ClientContext or ServerEndpoint associated with the pipe endpoint.

Returns
uint32_t The Robot Raconteur node Endpoint ID

◆ GetIgnoreReceived()

bool RobotRaconteur::PipeEndpointBase::GetIgnoreReceived ( )

Get if pipe endpoint is ignoring incoming packets.

If true, pipe endpoint is ignoring incoming packets and is not adding incoming packets to the receive queue.

Returns
true Pipe endpoint is ignoring incoming packets
false Pipe endpoint is not ignoring incoming packets

◆ GetIndex()

virtual int32_t RobotRaconteur::PipeEndpointBase::GetIndex ( )
virtual

Returns the pipe endpoint index used when endpoint connected.

Returns
int32_t The pipe endpoint index

◆ GetRequestPacketAck()

bool RobotRaconteur::PipeEndpointBase::GetRequestPacketAck ( )

Get if pipe endpoint is requesting acks.

Returns
true The pipe endpoint is requesting acks
false The pipe endpoint is not requesting acks

◆ IsUnreliable()

bool RobotRaconteur::PipeEndpointBase::IsUnreliable ( )

Get if pipe endpoint is unreliable.

Pipe members may be declared as unreliable using member modifiers in the service definition. Pipes confirm unreliable operation when pipe endpoints are connected.

Returns
true The pipe endpoint is unreliable
false The pipe endpoint is reliable

◆ SetIgnoreReceived()

void RobotRaconteur::PipeEndpointBase::SetIgnoreReceived ( bool ignore)

Set whether pipe endpoint should ignore incoming packets.

Pipe endpoints may optionally desire to ignore incoming data. This is useful if the endpoint is only being used to send packets, and received packets may create a potential memory leak if they are not being removed from the queue. If ignore is true, incoming packets will be discarded and will not be added to the receive queue.

Parameters
ignoreIf true, incoming packets are ignored. If false, the packets are added to the receive queue.

◆ SetRequestPacketAck()

void RobotRaconteur::PipeEndpointBase::SetRequestPacketAck ( bool ack)

Set if pipe endpoint should request packet acks.

Packet acks are generated by receiving endpoints to inform the sender that a packet has been received. The ack contains the packet index, the sequence number of the packet. Packet acks are used for flow control by PipeBroadcaster.

Parameters
acktrue to request packet acks, otherwise false

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