io_scanner.h
Go to the documentation of this file.
1 
26 #ifndef ODVA_ETHERNETIP_IO_SCANNER_H
27 #define ODVA_ETHERNETIP_IO_SCANNER_H
28 
29 #include <string>
30 #include <boost/array.hpp>
31 #include <boost/asio.hpp>
32 
34 
35 using std::string;
36 using boost::asio::ip::udp;
37 
38 namespace eip {
39 
43 class IOScanner
44 {
45 public:
46  IOScanner(boost::asio::io_service& io_service, string hostname);
47 
48  virtual ~IOScanner()
49  {
50  socket_.close();
51  }
52 
57 
61  void handleListIdentityResponse(const boost::system::error_code& ec,
62  std::size_t num_bytes);
63 
67  void run();
68 
69 private:
70  string hostname_;
71  udp::socket socket_;
72  udp::endpoint device_endpoint_;
73  boost::array<EIP_BYTE, 4*1024> recv_buf_;
74 };
75 
76 } // namespace eip
77 
78 #endif // ODVA_ETHERNETIP_IO_SCANNER_H
eip_types.h
eip::IOScanner::hostname_
string hostname_
Definition: io_scanner.h:70
eip
Definition: connection.h:41
eip::IOScanner::IOScanner
IOScanner(boost::asio::io_service &io_service, string hostname)
Definition: io_scanner.cpp:49
eip::IOScanner::socket_
udp::socket socket_
Definition: io_scanner.h:71
eip::IOScanner::handleListIdentityResponse
void handleListIdentityResponse(const boost::system::error_code &ec, std::size_t num_bytes)
Definition: io_scanner.cpp:76
eip::IOScanner
Definition: io_scanner.h:43
eip::IOScanner::~IOScanner
virtual ~IOScanner()
Definition: io_scanner.h:48
eip::IOScanner::recv_buf_
boost::array< EIP_BYTE, 4 *1024 > recv_buf_
Definition: io_scanner.h:73
eip::IOScanner::device_endpoint_
udp::endpoint device_endpoint_
Definition: io_scanner.h:72
eip::IOScanner::run
void run()
Definition: io_scanner.cpp:160
eip::IOScanner::sendListIdentityRequest
void sendListIdentityRequest()
Definition: io_scanner.cpp:61


odva_ethernetip
Author(s): Kareem Shehata
autogenerated on Wed Mar 2 2022 00:38:56