cpf_packet.h
Go to the documentation of this file.
1 
26 #ifndef ODVA_ETHERNETIP_CPF_PACKET_H
27 #define ODVA_ETHERNETIP_CPF_PACKET_H
28 
29 #include <vector>
30 #include <iostream>
31 
37 
38 using std::vector;
39 
40 namespace eip {
41 
42 using serialization::Serializable;
43 using serialization::Reader;
44 using serialization::Writer;
45 
49 class CPFPacket : public Serializable
50 {
51 public:
52 
58  {
59  return items_.size();
60  }
61 
66  vector<CPFItem>& getItems()
67  {
68  return items_;
69  }
70 
75  virtual size_t getLength() const;
76 
83  virtual Writer& serialize(Writer& writer) const;
84 
89  virtual Reader& deserialize(Reader& reader, size_t length)
90  {
91  deserialize(reader);
92  return reader;
93  }
94 
101  virtual Reader& deserialize(Reader& reader);
102 
103 private:
104  vector< CPFItem > items_;
105 };
106 
107 } // namespace eip
108 
109 #endif // ODVA_ETHERNETIP_CPF_PACKET_H
virtual Reader & deserialize(Reader &reader, size_t length)
Definition: cpf_packet.h:89
vector< CPFItem > items_
Definition: cpf_packet.h:104
Definition: connection.h:41
virtual size_t getLength() const
Definition: cpf_packet.cpp:35
virtual Writer & serialize(Writer &writer) const
Definition: cpf_packet.cpp:46
uint16_t EIP_UINT
Definition: eip_types.h:39
vector< CPFItem > & getItems()
Definition: cpf_packet.h:66
EIP_UINT getItemCount() const
Definition: cpf_packet.h:57


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