#include <path.h>
Public Member Functions | |
void | addLogicalAttribute (EIP_USINT attribute_id) |
void | addLogicalClass (EIP_USINT class_id) |
void | addLogicalConnectionPoint (EIP_USINT connection_id) |
void | addLogicalInstance (EIP_USINT instance_id) |
virtual Reader & | deserialize (Reader &reader, size_t length) |
virtual Reader & | deserialize (Reader &reader) |
virtual size_t | getLength () const |
Path (bool pad_after_length=false) | |
Path (EIP_USINT class_id, EIP_USINT instance_id, EIP_USINT attribute_id, bool pad_after_length=false) | |
Path (EIP_USINT class_id, EIP_USINT instance_id) | |
void | reset () |
virtual Writer & | serialize (Writer &writer) const |
virtual Writer & | serialize (Writer &writer, bool pad_after_length) const |
void | setPadAfterLength (bool pad) |
Private Member Functions | |
void | addSegment (EIP_USINT type, EIP_USINT data) |
Private Attributes | |
bool | pad_after_length_ |
vector< EIP_USINT > | path_buf_ |
Class to handle serialization of the Path data type in EthernetIP. Note that this is not a complete implementation of all path segment types, just the elements needed for the OS32c.
eip::Path::Path | ( | bool | pad_after_length = false | ) |
eip::Path::Path | ( | EIP_USINT | class_id, |
EIP_USINT | instance_id, | ||
EIP_USINT | attribute_id, | ||
bool | pad_after_length = false |
||
) |
Shortcut to construct a path to the given logical class instance and attribute IDs.
class_id | Logical Class ID for the first segment of the path |
instance_id | Logical instance ID for the second segment of the path |
attribute_id | Logical instance ID for the third segment of the path |
pad_after_length | set to true to enable pad byte after length when serializing the path. |
Shortcut to construct a path to the given logical class instance
class_id | Logical Class ID for the first segment of the path |
instance_id | Logical instance ID for the second segment of the path |
pad_after_length | set to true to enable pad byte after length when serializing the path. |
void eip::Path::addLogicalAttribute | ( | EIP_USINT | attribute_id | ) |
void eip::Path::addLogicalClass | ( | EIP_USINT | class_id | ) |
void eip::Path::addLogicalConnectionPoint | ( | EIP_USINT | connection_id | ) |
void eip::Path::addLogicalInstance | ( | EIP_USINT | instance_id | ) |
|
inlinevirtual |
|
inlinevirtual |
|
virtual |
|
inline |
|
inlinevirtual |
|
virtual |
Serialize data into the given buffer with a flag for adding a pad after the length field.
writer | Writer to use for serialization |
pad_after_length | set to true to add a byte after the length field |
std::length_error | if the buffer is too small for the header data |
|
inline |