connection.h
Go to the documentation of this file.
00001 
00026 #ifndef ODVA_ETHERNETIP_CONNECTION_H
00027 #define ODVA_ETHERNETIP_CONNECTION_H
00028 
00029 #include <string>
00030 #include <boost/shared_ptr.hpp>
00031 
00032 #include "odva_ethernetip/eip_types.h"
00033 #include "odva_ethernetip/path.h"
00034 #include "odva_ethernetip/forward_open_request.h"
00035 #include "odva_ethernetip/forward_open_success.h"
00036 #include "odva_ethernetip/forward_close_request.h"
00037 #include "odva_ethernetip/forward_close_success.h"
00038 
00039 using boost::shared_ptr;
00040 
00041 namespace eip {
00042 
00046 class Connection
00047 {
00048 public:
00049 
00050   EIP_UINT originator_vendor_id;
00051   EIP_UDINT originator_sn;
00052   EIP_UINT connection_sn;
00053 
00054   EIP_UDINT o_to_t_connection_id;
00055   EIP_UDINT t_to_o_connection_id;
00056 
00057   EIP_BYTE timeout_tick_size;
00058   EIP_USINT timeout_ticks;
00059   EIP_USINT timeout_multiplyer;
00060 
00061   EIP_UDINT o_to_t_rpi;
00062   EIP_UDINT t_to_o_rpi;
00063   EIP_UDINT o_to_t_api;
00064   EIP_UDINT t_to_o_api;
00065 
00066   EIP_UINT o_to_t_buffer_size;
00067   EIP_UINT t_to_o_buffer_size;
00068 
00074   Connection(const EIP_CONNECTION_INFO_T& o_to_t, const EIP_CONNECTION_INFO_T& t_to_o);
00075 
00080   Path& getPath()
00081   {
00082     return path_;
00083   }
00084 
00090   void setConnectionPoints(EIP_USINT origin, EIP_USINT target);
00091 
00095   shared_ptr<ForwardOpenRequest> createForwardOpenRequest();
00096 
00100   shared_ptr<ForwardCloseRequest> createForwardCloseRequest();
00101 
00106   bool verifyForwardOpenResult(const ForwardOpenSuccess& result);
00107 
00112   bool verifyForwardCloseResult(const ForwardCloseSuccess& result);
00113 
00114 private:
00115     Path path_;
00116 
00117 };
00118 
00119 } // namespace eip
00120 
00121 #endif  // ODVA_ETHERNETIP_CONNECTION_H


odva_ethernetip
Author(s): Kareem Shehata
autogenerated on Sat Jun 8 2019 20:21:23