Ilya Moiseenko | 59c6221 | 2011-08-04 19:04:24 -0700 | [diff] [blame] | 1 | // |
| 2 | // ndn_timeoutheader.h |
| 3 | // Abstraction |
| 4 | // |
| 5 | // Created by Ilya Moiseenko on 04.08.11. |
| 6 | // Copyright 2011 UCLA. All rights reserved. |
| 7 | // |
| 8 | |
| 9 | #include "ns3/header.h" |
| 10 | #include <iostream> |
| 11 | |
| 12 | namespace ns3 |
| 13 | { |
| 14 | namespace NDNabstraction |
| 15 | { |
| 16 | |
| 17 | class TimeoutHeader: public Header |
| 18 | { |
| 19 | public: |
| 20 | TimeoutHeader(); |
| 21 | TimeoutHeader(uint32_t timeout); |
| 22 | uint32_t GetValue(); |
| 23 | |
| 24 | |
| 25 | // Header serialization/deserialization |
| 26 | static TypeId GetTypeId (); |
| 27 | TypeId GetInstanceTypeId () const; |
| 28 | uint32_t GetSerializedSize () const; |
| 29 | void Serialize (Buffer::Iterator start) const; |
| 30 | uint32_t Deserialize (Buffer::Iterator start); |
| 31 | void Print (std::ostream &os) const; |
| 32 | |
| 33 | private: |
| 34 | uint32_t m_value; |
| 35 | }; |
| 36 | } |
| 37 | } |