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
virtual ~IOScanner()
Definition: io_scanner.h:48
udp::endpoint device_endpoint_
Definition: io_scanner.h:72
udp::socket socket_
Definition: io_scanner.h:71
Definition: connection.h:41
void handleListIdentityResponse(const boost::system::error_code &ec, std::size_t num_bytes)
Definition: io_scanner.cpp:76
void sendListIdentityRequest()
Definition: io_scanner.cpp:61
string hostname_
Definition: io_scanner.h:70
boost::array< EIP_BYTE, 4 *1024 > recv_buf_
Definition: io_scanner.h:73
IOScanner(boost::asio::io_service &io_service, string hostname)
Definition: io_scanner.cpp:49


odva_ethernetip
Author(s): Kareem Shehata
autogenerated on Mon Jun 10 2019 14:00:16