#include <encap_header.h>
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.
virtual Reader& eip::EncapHeader::deserialize |
( |
Reader & |
reader, |
|
|
size_t |
length |
|
) |
| |
|
inlinevirtual |
Deserialize data from the given reader with the length given. Length must be 24 or a length_error is thrown
- Parameters
-
reader | Reader to use for deserialization |
length | Length expected for data, must be 24 |
- Returns
- the reader again
- Exceptions
-
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
- Parameters
-
reader | Reader to use for deserialization |
- Returns
- the reader again
- Exceptions
-
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 |
|
inlinevirtual |
Always returns 24, the size of the encapsulation packer header
- Returns
- Total length in bytes to be serialized, always 24 bytes
Definition at line 68 of file encap_header.h.
Writer & eip::EncapHeader::serialize |
( |
Writer & |
writer | ) |
const |
|
virtual |
Serialize data into the given buffer
- Parameters
-
writer | Writer to use for serialization |
- Returns
- the writer again
- Exceptions
-
std::length_error | if the buffer is too small for the header data |
Definition at line 35 of file encap_header.cpp.
The documentation for this class was generated from the following files: