Public Member Functions | List of all members
psen_scan::ScannerCommunicationInterface Class Referenceabstract

Abstract base class for the communication interface with the PSENscan scanner. More...

#include <scanner_communication_interface.h>

Inheritance diagram for psen_scan::ScannerCommunicationInterface:
Inheritance graph
[legend]

Public Member Functions

virtual void close ()=0
 Closes the connection to the scanner device. More...
 
virtual void open ()=0
 Opens the connection to the scanner device. More...
 
virtual std::size_t read (boost::asio::mutable_buffers_1 &buffer, const std::chrono::steady_clock::duration timeout)=0
 Receive data from the scanner. More...
 
virtual void write (const boost::asio::mutable_buffers_1 &buffer)=0
 Sends data to the scanner device. More...
 
virtual ~ScannerCommunicationInterface ()=default
 

Detailed Description

Abstract base class for the communication interface with the PSENscan scanner.

Definition at line 70 of file scanner_communication_interface.h.

Constructor & Destructor Documentation

◆ ~ScannerCommunicationInterface()

virtual psen_scan::ScannerCommunicationInterface::~ScannerCommunicationInterface ( )
virtualdefault

Member Function Documentation

◆ close()

virtual void psen_scan::ScannerCommunicationInterface::close ( )
pure virtual

Closes the connection to the scanner device.

Implemented in psen_scan::PSENscanUDPInterface.

◆ open()

virtual void psen_scan::ScannerCommunicationInterface::open ( )
pure virtual

Opens the connection to the scanner device.

Implemented in psen_scan::PSENscanUDPInterface.

◆ read()

virtual std::size_t psen_scan::ScannerCommunicationInterface::read ( boost::asio::mutable_buffers_1 &  buffer,
const std::chrono::steady_clock::duration  timeout 
)
pure virtual

Receive data from the scanner.

Parameters
bufferBuffer which contains the data received from the scanner device after the function call is done.
timeoutDefines how long to wait for new messages from the scanner device.
Returns
the number of bytes received from the scanner device.
Exceptions
UDPReadTimeoutExceptioninidcating a timeout while reading data from the scanner device.

Implemented in psen_scan::PSENscanUDPInterface.

◆ write()

virtual void psen_scan::ScannerCommunicationInterface::write ( const boost::asio::mutable_buffers_1 &  buffer)
pure virtual

Sends data to the scanner device.

Parameters
bufferData which have to be send to the scanner device.

Implemented in psen_scan::PSENscanUDPInterface.


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


psen_scan
Author(s):
autogenerated on Mon Feb 28 2022 23:16:20