Public Member Functions | Public Attributes | Private Attributes | List of all members
eip::SequencedDataItem< T > Class Template Reference

#include <sequenced_data_item.h>

Inheritance diagram for eip::SequencedDataItem< T >:
Inheritance graph
[legend]

Public Member Functions

virtual Readerdeserialize (Reader &reader)
 
virtual Readerdeserialize (Reader &reader, size_t length)
 
virtual size_t getLength () const
 
 SequencedDataItem (EIP_UINT sequence=0)
 
virtual Writerserialize (Writer &writer) const
 

Public Attributes

EIP_UINT sequence_num
 

Private Attributes

bool already_deserializing
 

Detailed Description

template<class T>
class eip::SequencedDataItem< T >

For some stupid reason, sometime EIP likes to add a sequence number to the start of a data item. This template allows for easily adding that to any already defined data item.

Definition at line 49 of file sequenced_data_item.h.

Constructor & Destructor Documentation

◆ SequencedDataItem()

template<class T >
eip::SequencedDataItem< T >::SequencedDataItem ( EIP_UINT  sequence = 0)
inline

Definition at line 54 of file sequenced_data_item.h.

Member Function Documentation

◆ deserialize() [1/2]

template<class T >
virtual Reader& eip::SequencedDataItem< T >::deserialize ( Reader reader)
inlinevirtual

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 96 of file sequenced_data_item.h.

◆ deserialize() [2/2]

template<class T >
virtual Reader& eip::SequencedDataItem< T >::deserialize ( Reader reader,
size_t  length 
)
inlinevirtual

Extra length information is not relevant in this context. Same as deserialize(reader)

Definition at line 80 of file sequenced_data_item.h.

◆ getLength()

template<class T >
virtual size_t eip::SequencedDataItem< T >::getLength ( ) const
inlinevirtual

Get the length of serialized data that would be produced if serialized

Returns
Total length in bytes to be serialized

Definition at line 60 of file sequenced_data_item.h.

◆ serialize()

template<class T >
virtual Writer& eip::SequencedDataItem< T >::serialize ( Writer writer) const
inlinevirtual

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 71 of file sequenced_data_item.h.

Member Data Documentation

◆ already_deserializing

template<class T >
bool eip::SequencedDataItem< T >::already_deserializing
private

Definition at line 108 of file sequenced_data_item.h.

◆ sequence_num

template<class T >
EIP_UINT eip::SequencedDataItem< T >::sequence_num

Definition at line 52 of file sequenced_data_item.h.


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


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