Menu

famouso::mw::attributes::access::AttributeHeader_RT Struct Reference

A structure that provides functionality to access attribute header fields at a higher level. More...

#include <AttributeHeader_RT.h>

Inheritance diagram for famouso::mw::attributes::access::AttributeHeader_RT:
famouso::mw::attributes::access::Attribute_RT famouso::mw::attributes::Attribute< AbsoluteDeadline< 0 >, tags::integral_const_tag, uint64_t, deadline, detail::HighDensityIDs::absDeadline, detail::TagSet< detail::IsHighDensity, detail::HasLessThanRelation > > famouso::mw::attributes::Attribute< FlowMgmtAction< 0 >, tags::integral_const_tag, uint8_t, action, FlowMgmtIDs::action, attributes::detail::TagSet< attributes::detail::HasLessThanRelation > > famouso::mw::attributes::Attribute< FlowMgmtID< 0 >, tags::integral_const_tag, FlowId, id, FlowMgmtIDs::flowId, attributes::detail::TagSet< attributes::detail::HasLessThanRelation > > famouso::mw::attributes::Attribute< Jitter< 0 >, tags::integral_const_tag, uint16_t, jitter, detail::HighDensityIDs::jitter, detail::TagSet< detail::IsHighDensity, detail::IsRequirable, detail::HasLessThanRelation > > famouso::mw::attributes::Attribute< Latency< 0 >, tags::integral_const_tag, uint32_t, latency, detail::HighDensityIDs::latency, detail::TagSet< detail::IsHighDensity, detail::IsRequirable, detail::HasLessThanRelation > > famouso::mw::attributes::Attribute< Null, tags::integral_const_tag, uint8_t, 0, 0, detail::TagSet<> > famouso::mw::attributes::Attribute< Omission< 0 >, tags::integral_const_tag, uint16_t, omission, detail::HighDensityIDs::omission, detail::TagSet< detail::IsHighDensity, detail::IsRequirable, detail::HasLessThanRelation > > famouso::mw::attributes::Attribute< PacketLoss< 0 >, tags::integral_const_tag, uint16_t, packetLoss, detail::HighDensityIDs::packetLoss, detail::TagSet< detail::IsHighDensity, detail::IsRequirable, detail::HasLessThanRelation > > famouso::mw::attributes::Attribute< Period< 0 >, tags::integral_const_tag, uint32_t, period, detail::HighDensityIDs::period, detail::TagSet< detail::IsHighDensity, detail::HasLessThanRelation > > famouso::mw::attributes::Attribute< Priority< 0 >, tags::integral_const_tag, int8_t, prio, FlowMgmtIDs::prio, attributes::detail::TagSet< attributes::detail::HasLessThanRelation > > famouso::mw::attributes::Attribute< RelativeDeadline< 0 >, tags::integral_const_tag, uint64_t, deadline, detail::HighDensityIDs::relDeadline, detail::TagSet< detail::IsHighDensity, detail::HasLessThanRelation > > famouso::mw::attributes::Attribute< SubjectAttribute< 0 >, tags::integral_const_tag, uint64_t, snn, FlowMgmtIDs::subject, attributes::detail::TagSet< attributes::detail::HasLessThanRelation > > famouso::mw::attributes::Attribute< Throughput< 0 >, tags::integral_const_tag, uint32_t, throughput, detail::HighDensityIDs::throughput, detail::TagSet< detail::IsHighDensity, detail::IsRequirable > > famouso::mw::attributes::Attribute< TimeStamp< 0 >, tags::integral_const_tag, uint64_t, timeStamp, detail::HighDensityIDs::timestamp, detail::TagSet< detail::IsHighDensity > > famouso::mw::attributes::Attribute< TTL< 0 >, tags::integral_const_tag, uint8_t, ttl, detail::HighDensityIDs::ttl, detail::TagSet< detail::IsHighDensity, detail::HasLessThanRelation > > famouso::mw::attributes::Attribute< BaseType, CompareTag, ValueType, Value, ID, TagSet >

Public Member Functions

bool isHighDensity () const
 Returns true if the attribute is encoded with high density.
uint8_t getID () const
 Returns the encoded attribute ID no matter if it is encoded with high or low density.
uint16_t valueLength () const
 Returns the length of this attribute's encoded value.
uint8_t headerLength () const
 Runtime accessor for the number of bytes needed by this attribute header.

Protected Types

typedef
famouso::mw::attributes::detail::AttributeElementHeader 
elemHeader_t

Protected Member Functions

 AttributeHeader_RT ()
const elemHeader_t *const asElementHeader () const
elemHeader_t *const asElementHeader ()

Detailed Description

A structure that provides functionality to access attribute header fields at a higher level.

It is considered to be the base type of the attribute type hierarchy since basic functionality related to header field access is provided here. This type basically provides methods for accessing the ID, the extension bit and the encoded value length of the attribute. The number of bytes used by the header only can also be calculated.

It is not constructible itself since it has its constructor declared protected. It is assumed that this type is derived by a type for which 'this' directly points to the first byte of an encoded attribute.


Member Typedef Documentation


Constructor & Destructor Documentation

famouso::mw::attributes::access::AttributeHeader_RT::AttributeHeader_RT (  )  [inline, protected]

Member Function Documentation

elemHeader_t* const famouso::mw::attributes::access::AttributeHeader_RT::asElementHeader (  )  [inline, protected]
const elemHeader_t* const famouso::mw::attributes::access::AttributeHeader_RT::asElementHeader (  )  const [inline, protected]
uint8_t famouso::mw::attributes::access::AttributeHeader_RT::getID (  )  const [inline]

Returns the encoded attribute ID no matter if it is encoded with high or low density.

References asElementHeader(), and isHighDensity().

uint8_t famouso::mw::attributes::access::AttributeHeader_RT::headerLength (  )  const [inline]

Runtime accessor for the number of bytes needed by this attribute header.

It has the same semantics as type::size

Returns:
The number of bytes needed by this attribute header

References asElementHeader(), and famouso::mw::attributes::detail::CaseSelector< ResultType, res1, res2, res3, res4, res5, res6 >::select_rt().

Referenced by famouso::mw::attributes::access::Attribute_RT::length().

bool famouso::mw::attributes::access::AttributeHeader_RT::isHighDensity (  )  const [inline]

Returns true if the attribute is encoded with high density.

References asElementHeader().

Referenced by getID(), and valueLength().

uint16_t famouso::mw::attributes::access::AttributeHeader_RT::valueLength (  )  const [inline]

Returns the length of this attribute's encoded value.

The returned length is determined considering all fields of the header, that is it always returns the correct length for all possible header structures The returned value should be interpreted as the number of bytes needed by the attribute's value, so for the special case of a high density attribute with its value encoded in the header 0 respective 1 will be returned.

Returns:
The bytes needed for encoding this attribute's value

References asElementHeader(), and isHighDensity().

Referenced by famouso::mw::attributes::access::Attribute_RT::length().


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