Represents an TimeTicks as described in RFC 2741. More...
#include <TimeTicksValue.hpp>
Public Member Functions | |
| TimeTicksValue (uint32_t initial_value=0) | |
| Create an TimeTicksValue without initialization. | |
| TimeTicksValue (binary::const_iterator &pos, const binary::const_iterator &end, bool big_endian=true) | |
| Parse Constructor. | |
| virtual binary | serialize () const |
| Encode the object as described in RFC 2741, section 5.4. | |
Public Member Functions inherited from agentxcpp::AbstractValue | |
| virtual | ~AbstractValue () |
| Destructor. | |
Public Attributes | |
| uint32_t | value |
| The TimeTicks value. | |
Represents an TimeTicks as described in RFC 2741.
Definition at line 34 of file TimeTicksValue.hpp.
|
inline |
Create an TimeTicksValue without initialization.
| initial_value | The initial value of the object. |
Definition at line 50 of file TimeTicksValue.hpp.
| TimeTicksValue::TimeTicksValue | ( | binary::const_iterator & | pos, |
| const binary::const_iterator & | end, | ||
| bool | big_endian = true |
||
| ) |
Parse Constructor.
This constructor parses the serialized form of the object. It takes an iterator, starts parsing at the position of the iterator and advances the iterator to the position right behind the object.
The constructor expects valid data from the stream; if parsing fails, parse_error is thrown. In this case, the iterator position is undefined.
| pos | Iterator pointing to the current stream position. The iterator is advanced while reading the header. |
| end | Iterator pointing one element past the end of the current stream. This is needed to mark the end of the buffer. |
| big_endian | Whether the input stream is in big endian format |
Definition at line 36 of file TimeTicksValue.cpp.
References agentxcpp::read32(), and value.
|
virtual |
Encode the object as described in RFC 2741, section 5.4.
This function uses big endian.
Implements agentxcpp::AbstractValue.
Definition at line 25 of file TimeTicksValue.cpp.
References value, and agentxcpp::write32().
| uint32_t agentxcpp::TimeTicksValue::value |
The TimeTicks value.
According to RFC 2578, TimeTicks is a non-negative 32-bit number.
Definition at line 43 of file TimeTicksValue.hpp.
Referenced by serialize(), and TimeTicksValue().