Public Member Functions | Private Attributes | List of all members
eip::CPFPacket Class Reference

#include <cpf_packet.h>

Inheritance diagram for eip::CPFPacket:
Inheritance graph
[legend]

Public Member Functions

virtual Readerdeserialize (Reader &reader)
 
virtual Readerdeserialize (Reader &reader, size_t length)
 
EIP_UINT getItemCount () const
 
vector< CPFItem > & getItems ()
 
virtual size_t getLength () const
 
virtual Writerserialize (Writer &writer) const
 

Private Attributes

vector< CPFItemitems_
 

Detailed Description

Representation of an EtherNet/IP Common Packet Format packet.

Definition at line 49 of file cpf_packet.h.

Member Function Documentation

◆ deserialize() [1/2]

Reader & eip::CPFPacket::deserialize ( Reader reader)
virtual

Deserialize data from the given reader without length information

Parameters
readerReader to use for deserialization
Returns
the reader again
Exceptions
std::length_errorif the buffer is overrun while deserializing

Implements eip::serialization::Serializable.

Definition at line 56 of file cpf_packet.cpp.

◆ deserialize() [2/2]

virtual Reader& eip::CPFPacket::deserialize ( Reader reader,
size_t  length 
)
inlinevirtual

Length data isn't meaningful here. Instead just calls the deserialize without the added information.

Implements eip::serialization::Serializable.

Definition at line 89 of file cpf_packet.h.

◆ getItemCount()

EIP_UINT eip::CPFPacket::getItemCount ( ) const
inline

Get the number of items in the packet, including both address and data items

Returns
number of items in packet

Definition at line 57 of file cpf_packet.h.

◆ getItems()

vector<CPFItem>& eip::CPFPacket::getItems ( )
inline

Get the items in this packet

Returns
vector of the items in this packet

Definition at line 66 of file cpf_packet.h.

◆ getLength()

size_t eip::CPFPacket::getLength ( ) const
virtual

Get the length in bytes of this packet after serialization

Returns
Total length in bytes to be serialized

Implements eip::serialization::Serializable.

Definition at line 35 of file cpf_packet.cpp.

◆ serialize()

Writer & eip::CPFPacket::serialize ( Writer writer) const
virtual

Serialize data into the given buffer

Parameters
writerWriter to use for serialization
Returns
the writer again
Exceptions
std::length_errorif the buffer is too small for the header data

Implements eip::serialization::Serializable.

Definition at line 46 of file cpf_packet.cpp.

Member Data Documentation

◆ items_

vector< CPFItem > eip::CPFPacket::items_
private

Definition at line 104 of file cpf_packet.h.


The documentation for this class was generated from the following files:


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