OLD | NEW |
(Empty) | |
| 1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
| 2 /* |
| 3 * Copyright (c) 2013 Fraunhofer FKIE |
| 4 * |
| 5 * This program is free software; you can redistribute it and/or modify |
| 6 * it under the terms of the GNU General Public License version 2 as |
| 7 * published by the Free Software Foundation; |
| 8 * |
| 9 * This program is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 * GNU General Public License for more details. |
| 13 * |
| 14 * You should have received a copy of the GNU General Public License |
| 15 * along with this program; if not, write to the Free Software |
| 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 17 * |
| 18 * Author: |
| 19 * Sascha Alexander Jopen <jopen@cs.uni-bonn.de> |
| 20 */ |
| 21 #ifndef LR_WPAN_LQI_TAG_H |
| 22 #define LR_WPAN_LQI_TAG_H |
| 23 |
| 24 #include <ns3/tag.h> |
| 25 |
| 26 namespace ns3 { |
| 27 |
| 28 class Tag; |
| 29 |
| 30 class LrWpanLqiTag : public Tag |
| 31 { |
| 32 public: |
| 33 static TypeId GetTypeId (void); |
| 34 virtual TypeId GetInstanceTypeId (void) const; |
| 35 |
| 36 /** |
| 37 * Create a LrWpanLqiTag with the default LQI 0 . |
| 38 */ |
| 39 LrWpanLqiTag (void); |
| 40 |
| 41 /** |
| 42 * Create a LrWpanLqiTag with the given LQI value. |
| 43 */ |
| 44 LrWpanLqiTag (uint8_t lqi); |
| 45 |
| 46 virtual uint32_t GetSerializedSize (void) const; |
| 47 virtual void Serialize (TagBuffer i) const; |
| 48 virtual void Deserialize (TagBuffer i); |
| 49 virtual void Print (std::ostream &os) const; |
| 50 |
| 51 /** |
| 52 * Set the LQI to the given value. |
| 53 * |
| 54 * @param lqi the value of the LQI to set |
| 55 */ |
| 56 void Set (uint8_t lqi); |
| 57 /** |
| 58 * Get the LQI value. |
| 59 * |
| 60 * @return the LQI value |
| 61 */ |
| 62 uint8_t Get (void) const; |
| 63 private: |
| 64 uint8_t m_lqi; |
| 65 }; |
| 66 |
| 67 |
| 68 } |
| 69 #endif /* LR_WPAN_LQI_TAG_H */ |
OLD | NEW |