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
eip::CPFPacket
Definition: cpf_packet.h:49
eip::serialization::Writer
Definition: writer.h:41
eip_types.h
eip::serialization::Reader
Definition: reader.h:42
eip
Definition: connection.h:41
eip::CPFPacket::serialize
virtual Writer & serialize(Writer &writer) const
Definition: cpf_packet.cpp:46
eip::CPFPacket::getItems
vector< CPFItem > & getItems()
Definition: cpf_packet.h:66
EIP_UINT
uint16_t EIP_UINT
Definition: eip_types.h:39
eip::serialization::Serializable
Definition: serializable.h:38
cpf_item.h
eip::CPFPacket::getLength
virtual size_t getLength() const
Definition: cpf_packet.cpp:35
reader.h
eip::CPFPacket::getItemCount
EIP_UINT getItemCount() const
Definition: cpf_packet.h:57
eip::CPFPacket::deserialize
virtual Reader & deserialize(Reader &reader, size_t length)
Definition: cpf_packet.h:89
eip::CPFPacket::items_
vector< CPFItem > items_
Definition: cpf_packet.h:104
serializable.h
writer.h


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