#include <encap_header.h>
Public Member Functions | |
virtual Reader & | deserialize (Reader &reader, size_t length) |
virtual Reader & | deserialize (Reader &reader) |
EncapHeader (EIP_UINT cmd=0, EIP_UDINT handle=0) | |
virtual size_t | getLength () const |
virtual Writer & | serialize (Writer &writer) const |
Public Attributes | |
EIP_UINT | command |
EIP_DWORD | context [2] |
EIP_UINT | length |
EIP_DWORD | options |
EIP_UDINT | session_handle |
EIP_DWORD | status |
Representation of an EtherNet/IP Encapsulation Packet Header
Definition at line 44 of file encap_header.h.
eip::EncapHeader::EncapHeader | ( | EIP_UINT | cmd = 0 , |
EIP_UDINT | handle = 0 |
||
) | [inline] |
Construct an encapsulation packet for a given command and session handle
Definition at line 57 of file encap_header.h.
virtual Reader& eip::EncapHeader::deserialize | ( | Reader & | reader, |
size_t | length | ||
) | [inline, virtual] |
Deserialize data from the given reader with the length given. Length must be 24 or a length_error is thrown
reader | Reader to use for deserialization |
length | Length expected for data, must be 24 |
std::length_error | if the buffer is overrun while deserializing |
Definition at line 89 of file encap_header.h.
Reader & eip::EncapHeader::deserialize | ( | Reader & | reader | ) | [virtual] |
Deserialize data from the given reader without length information
reader | Reader to use for deserialization |
std::length_error | if the buffer is overrun while deserializing |
Definition at line 46 of file encap_header.cpp.
virtual size_t eip::EncapHeader::getLength | ( | ) | const [inline, virtual] |
Always returns 24, the size of the encapsulation packer header
Definition at line 68 of file encap_header.h.
Writer & eip::EncapHeader::serialize | ( | Writer & | writer | ) | const [virtual] |
Serialize data into the given buffer
writer | Writer to use for serialization |
std::length_error | if the buffer is too small for the header data |
Definition at line 35 of file encap_header.cpp.
Definition at line 47 of file encap_header.h.
Definition at line 51 of file encap_header.h.
Definition at line 48 of file encap_header.h.
Definition at line 52 of file encap_header.h.
Definition at line 49 of file encap_header.h.
Definition at line 50 of file encap_header.h.