Public Member Functions | Public Attributes
eip::EncapHeader Class Reference

#include <encap_header.h>

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

List of all members.

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

Detailed Description

Representation of an EtherNet/IP Encapsulation Packet Header

Definition at line 44 of file encap_header.h.


Constructor & Destructor Documentation

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.


Member Function Documentation

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

Parameters:
readerReader to use for deserialization
lengthLength expected for data, must be 24
Returns:
the reader again
Exceptions:
std::length_errorif 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:
readerReader to use for deserialization
Returns:
the reader again
Exceptions:
std::length_errorif 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

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:
writerWriter to use for serialization
Returns:
the writer again
Exceptions:
std::length_errorif the buffer is too small for the header data

Definition at line 35 of file encap_header.cpp.


Member Data Documentation

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.


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


odva_ethernetip
Author(s): Kareem Shehata
autogenerated on Sat Jun 8 2019 20:21:23