satellite-crdsa-replica-tag.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2014 Magister Solutions Ltd
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: Frans Laakso <frans.laakso@magister.fi>
19  */
20 
21 #ifndef SATELLITE_CRDSA_REPLICA_TAG_H
22 #define SATELLITE_CRDSA_REPLICA_TAG_H
23 
24 #include <ns3/tag.h>
25 
26 #include <vector>
27 
28 namespace ns3
29 {
30 
40 class SatCrdsaReplicaTag : public Tag
41 {
42  public:
47 
52 
53  void AddSlotId(uint16_t slotId);
54  std::vector<uint16_t> GetSlotIds(void);
55 
60  static TypeId GetTypeId(void);
61 
66  virtual TypeId GetInstanceTypeId(void) const;
67 
72  virtual uint32_t GetSerializedSize(void) const;
73 
78  virtual void Serialize(TagBuffer buffer) const;
79 
84  virtual void Deserialize(TagBuffer buffer);
85 
90  virtual void Print(std::ostream& os) const;
91 
92  private:
93  std::vector<uint16_t> m_slotIds;
94  uint8_t m_numOfIds;
95 };
96 
97 } // namespace ns3
98 
99 #endif /* SATELLITE_CRDSA_REPLICA_TAG_H */
This class implements a tag that carries information about the slot IDs of CRDSA packet replicas.
virtual void Deserialize(TagBuffer buffer)
Deserializes information from buffer to this instance of SatCrdsaReplicaTag.
std::vector< uint16_t > m_slotIds
virtual uint32_t GetSerializedSize(void) const
Get serialized size of SatCrdsaReplicaTag.
virtual TypeId GetInstanceTypeId(void) const
Get the type ID of instance.
static TypeId GetTypeId(void)
Get the type ID.
~SatCrdsaReplicaTag()
Destructor for SatCrdsaReplicaTag.
virtual void Serialize(TagBuffer buffer) const
Serializes information to buffer from this instance of SatCrdsaReplicaTag.
virtual void Print(std::ostream &os) const
Print time stamp of this instance of SatCrdsaReplicaTag.
SatCrdsaReplicaTag()
Default constructor.
std::vector< uint16_t > GetSlotIds(void)
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.