#include <encap_header.h>
Public Member Functions | |
virtual Reader & | deserialize (Reader &reader) |
virtual Reader & | deserialize (Reader &reader, size_t length) |
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.
Construct an encapsulation packet for a given command and session handle
Definition at line 57 of file encap_header.h.
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 |
Implements eip::serialization::Serializable.
Definition at line 46 of file encap_header.cpp.
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 |
Implements eip::serialization::Serializable.
Definition at line 89 of file encap_header.h.
|
inlinevirtual |
Always returns 24, the size of the encapsulation packer header
Implements eip::serialization::Serializable.
Definition at line 68 of file encap_header.h.
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 |
Implements eip::serialization::Serializable.
Definition at line 35 of file encap_header.cpp.
EIP_UINT eip::EncapHeader::command |
Definition at line 47 of file encap_header.h.
EIP_DWORD eip::EncapHeader::context[2] |
Definition at line 51 of file encap_header.h.
EIP_UINT eip::EncapHeader::length |
Definition at line 48 of file encap_header.h.
EIP_DWORD eip::EncapHeader::options |
Definition at line 52 of file encap_header.h.
EIP_UDINT eip::EncapHeader::session_handle |
Definition at line 49 of file encap_header.h.
EIP_DWORD eip::EncapHeader::status |
Definition at line 50 of file encap_header.h.