Public Member Functions | List of all members
visionary::ITransport Class Referenceabstract

#include <ITransport.h>

Inheritance diagram for visionary::ITransport:
Inheritance graph
[legend]

Public Member Functions

virtual int read (std::vector< std::uint8_t > &buffer, std::size_t nBytesToReceive)=0
 
virtual int recv (std::vector< std::uint8_t > &buffer, std::size_t maxBytesToReceive)=0
 
virtual int send (const std::vector< std::uint8_t > &buffer)=0
 
virtual ~ITransport ()
 

Detailed Description

Definition at line 31 of file ITransport.h.

Constructor & Destructor Documentation

◆ ~ITransport()

virtual visionary::ITransport::~ITransport ( )
inlinevirtual

Definition at line 34 of file ITransport.h.

Member Function Documentation

◆ read()

virtual int visionary::ITransport::read ( std::vector< std::uint8_t > &  buffer,
std::size_t  nBytesToReceive 
)
pure virtual

Read a number of bytes

Contrary to recv this method reads precisely nBytesToReceive bytes.

Parameters
[in]bufferbuffer containing the bytes that shall be sent.
[in]maxBytesToReceivemaximum number of bytes to receive.
Returns
number of received bytes, negative values are OS error codes.

Implemented in visionary::TcpSocket, and visionary::UdpSocket.

◆ recv()

virtual int visionary::ITransport::recv ( std::vector< std::uint8_t > &  buffer,
std::size_t  maxBytesToReceive 
)
pure virtual

Receive data on socket to device

Receive at most maxBytesToReceive bytes.

Parameters
[in]bufferbuffer containing the bytes that shall be sent.
[in]maxBytesToReceivemaximum number of bytes to receive.
Returns
number of received bytes, negative values are OS error codes.

Implemented in visionary::TcpSocket, and visionary::UdpSocket.

◆ send()

virtual int visionary::ITransport::send ( const std::vector< std::uint8_t > &  buffer)
pure virtual

Send data on socket to device

All bytes are sent on the socket. It is regarded as error if this is not possible.

Parameters
[in]bufferbuffer containing the bytes that shall be sent.
Returns
OS error code.

Implemented in visionary::TcpSocket, and visionary::UdpSocket.


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


sick_safevisionary_base
Author(s):
autogenerated on Sat Oct 21 2023 02:24:26