Class for the UDP communication with the scanner.
More...
#include <psen_scan_udp_interface.h>
Class for the UDP communication with the scanner.
Definition at line 33 of file psen_scan_udp_interface.h.
◆ PSENscanUDPInterface()
psen_scan::PSENscanUDPInterface::PSENscanUDPInterface |
( |
const std::string & |
scanner_ip, |
|
|
const uint32_t & |
host_udp_port, |
|
|
const unsigned short |
scanner_port_write = PSEN_SCAN_PORT_WRITE , |
|
|
const unsigned short |
scanner_port_read = PSEN_SCAN_PORT_READ |
|
) |
| |
◆ ~PSENscanUDPInterface()
psen_scan::PSENscanUDPInterface::~PSENscanUDPInterface |
( |
| ) |
|
|
virtual |
◆ close()
void psen_scan::PSENscanUDPInterface::close |
( |
| ) |
|
|
overridevirtual |
◆ isUdpMsgAvailable()
bool psen_scan::PSENscanUDPInterface::isUdpMsgAvailable |
( |
| ) |
const |
|
private |
◆ open()
void psen_scan::PSENscanUDPInterface::open |
( |
| ) |
|
|
overridevirtual |
◆ read()
std::size_t psen_scan::PSENscanUDPInterface::read |
( |
boost::asio::mutable_buffers_1 & |
buffer, |
|
|
const std::chrono::steady_clock::duration |
timeout |
|
) |
| |
|
overridevirtual |
Receive data from the scanner.
- Parameters
-
buffer | Buffer which contains the data received from the scanner device after the function call is done. |
timeout | Defines how long to wait for new messages from the scanner device. |
- Returns
- the number of bytes received from the scanner device.
- Exceptions
-
Implements psen_scan::ScannerCommunicationInterface.
Definition at line 93 of file psen_scan_udp_interface.cpp.
◆ write()
void psen_scan::PSENscanUDPInterface::write |
( |
const boost::asio::mutable_buffers_1 & |
buffer | ) |
|
|
overridevirtual |
◆ io_service_
boost::asio::io_service psen_scan::PSENscanUDPInterface::io_service_ |
|
private |
◆ socket_read_
boost::asio::ip::udp::socket psen_scan::PSENscanUDPInterface::socket_read_ |
|
private |
◆ socket_write_
boost::asio::ip::udp::socket psen_scan::PSENscanUDPInterface::socket_write_ |
|
private |
◆ udp_read_endpoint_
boost::asio::ip::udp::endpoint psen_scan::PSENscanUDPInterface::udp_read_endpoint_ |
|
private |
◆ udp_write_endpoint_
boost::asio::ip::udp::endpoint psen_scan::PSENscanUDPInterface::udp_write_endpoint_ |
|
private |
The documentation for this class was generated from the following files: