message_router_response.h
Go to the documentation of this file.
1 
26 #ifndef ODVA_ETHERNETIP_MESSAGE_ROUTER_RESPONSE_H
27 #define ODVA_ETHERNETIP_MESSAGE_ROUTER_RESPONSE_H
28 
29 #include <string>
30 #include <boost/shared_ptr.hpp>
31 
36 
37 using boost::shared_ptr;
38 
39 namespace eip {
40 
41 using serialization::Serializable;
42 using serialization::Reader;
43 using serialization::Writer;
44 
48 class MessageRouterResponse : public Serializable
49 {
50 public:
51 
54 
58  MessageRouterResponse() : service(0), general_status(0) { }
59 
64  shared_ptr<Serializable> getAdditionalStatus() const
65  {
66  return additional_status_;
67  }
68 
73  shared_ptr<Serializable> getResponseData() const
74  {
75  return response_data_;
76  }
77 
82  virtual size_t getLength() const;
83 
90  virtual Writer& serialize(Writer& writer) const
91  {
92  throw std::logic_error("Not implemented");
93  }
94 
98  virtual Reader& deserialize(Reader& reader, size_t length);
99 
103  virtual Reader& deserialize(Reader& reader)
104  {
105  throw std::logic_error("Must have size to deserialize");
106  }
107 
108 private:
109  shared_ptr<Serializable> additional_status_;
110  shared_ptr<Serializable> response_data_;
111 
120  shared_ptr<Serializable> readData(Reader& reader, int length);
121 };
122 
123 } // namespace eip
124 
125 #endif // ODVA_ETHERNETIP_MESSAGE_ROUTER_RESPONSE_H
uint8_t EIP_USINT
Definition: eip_types.h:36
shared_ptr< Serializable > readData(Reader &reader, int length)
virtual Reader & deserialize(Reader &reader)
Definition: connection.h:41
virtual Reader & deserialize(Reader &reader, size_t length)
shared_ptr< Serializable > response_data_
shared_ptr< Serializable > additional_status_
shared_ptr< Serializable > getResponseData() const
virtual Writer & serialize(Writer &writer) const
virtual size_t getLength() const
shared_ptr< Serializable > getAdditionalStatus() const


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