register_session_data.h
Go to the documentation of this file.
1 
26 #ifndef ODVA_ETHERNETIP_IDENTITY_ITEM_DATA_H
27 #define ODVA_ETHERNETIP_IDENTITY_ITEM_DATA_H
28 
29 #include <string>
30 
35 
36 namespace eip {
37 
38 using std::string;
39 using serialization::Serializable;
40 using serialization::Reader;
41 using serialization::Writer;
42 
47 {
48 public:
51 
53 
58  virtual size_t getLength() const
59  {
60  return 4;
61  }
62 
69  virtual Writer& serialize(Writer& writer) const
70  {
71  writer.write(protocol_version);
72  writer.write(options);
73  return writer;
74  }
75 
79  virtual Reader& deserialize(Reader& reader, size_t length)
80  {
81  deserialize(reader);
82  return reader;
83  }
84 
91  virtual Reader& deserialize(Reader& reader)
92  {
93  reader.read(protocol_version);
94  reader.read(options);
95  return reader;
96  }
97 };
98 
99 } // namespace eip
100 
101 #endif // ODVA_ETHERNETIP_IDENTITY_ITEM_DATA_H
eip::serialization::Writer
Definition: writer.h:41
eip_types.h
eip::serialization::Reader
Definition: reader.h:42
eip::RegisterSessionData::RegisterSessionData
RegisterSessionData()
Definition: register_session_data.h:52
eip
Definition: connection.h:41
eip::serialization::Writer::write
void write(const T &v)
Definition: writer.h:50
EIP_UINT
uint16_t EIP_UINT
Definition: eip_types.h:39
eip::serialization::Reader::read
void read(T &v)
Definition: reader.h:51
eip::serialization::Serializable
Definition: serializable.h:38
eip::RegisterSessionData::deserialize
virtual Reader & deserialize(Reader &reader, size_t length)
Definition: register_session_data.h:79
eip::RegisterSessionData::protocol_version
EIP_UINT protocol_version
Definition: register_session_data.h:49
reader.h
EIP_PROTOCOL_VERSION
#define EIP_PROTOCOL_VERSION
Definition: eip_types.h:31
eip::RegisterSessionData::options
EIP_UINT options
Definition: register_session_data.h:50
eip::RegisterSessionData::serialize
virtual Writer & serialize(Writer &writer) const
Definition: register_session_data.h:69
eip::RegisterSessionData
Definition: register_session_data.h:46
eip::RegisterSessionData::getLength
virtual size_t getLength() const
Definition: register_session_data.h:58
eip::RegisterSessionData::deserialize
virtual Reader & deserialize(Reader &reader)
Definition: register_session_data.h:91
serializable.h
writer.h


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