lora-beam-tag.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2017 University of Padova
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: Bastien Tauran <bastien.tauran@viveris.fr>
19  */
20 
21 #ifndef LORA_BEAM_TAG_H
22 #define LORA_BEAM_TAG_H
23 
24 #include <ns3/tag.h>
25 
26 namespace ns3
27 {
28 
33 class LoraBeamTag : public Tag
34 {
35  public:
36  static TypeId GetTypeId(void);
37  virtual TypeId GetInstanceTypeId(void) const;
38 
44  LoraBeamTag(uint8_t beamId = 0);
45 
46  virtual ~LoraBeamTag();
47 
48  virtual void Serialize(TagBuffer i) const;
49  virtual void Deserialize(TagBuffer i);
50  virtual uint32_t GetSerializedSize() const;
51  virtual void Print(std::ostream& os) const;
52 
58  uint8_t GetBeamId() const;
59 
65  void SetBeamId(uint8_t beamId);
66 
67  private:
68  uint8_t m_beamId;
69 };
70 } // namespace ns3
71 
72 #endif // LORA_BEAM_TAG_H
Tag used to save various data about a packet, like its Spreading Factor and data about interference.
Definition: lora-beam-tag.h:34
virtual TypeId GetInstanceTypeId(void) const
void SetBeamId(uint8_t beamId)
Set which beamId this packet was transmitted with.
uint8_t GetBeamId() const
Read which beam ID this packet was transmitted with.
static TypeId GetTypeId(void)
uint8_t m_beamId
The beam ID used by the packet.
Definition: lora-beam-tag.h:68
virtual void Serialize(TagBuffer i) const
virtual ~LoraBeamTag()
virtual uint32_t GetSerializedSize() const
virtual void Print(std::ostream &os) const
LoraBeamTag(uint8_t beamId=0)
Create a LoraBeamTag with a given beam ID.
virtual void Deserialize(TagBuffer i)
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.