satellite-ground-station-address-tag.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2013 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: Author: Bastien TAURAN <bastien.tauran@viveris.fr>
19  */
20 
21 #ifndef SATELLITE_GROUND_STATION_ADDRESS_TAG_H
22 #define SATELLITE_GROUND_STATION_ADDRESS_TAG_H
23 
24 #include <ns3/mac48-address.h>
25 #include <ns3/tag.h>
26 
27 namespace ns3
28 {
29 
34 class SatGroundStationAddressTag : public Tag
35 {
36  public:
41  static TypeId GetTypeId(void);
42 
47  virtual TypeId GetInstanceTypeId(void) const;
48 
53 
58  SatGroundStationAddressTag(Mac48Address groundStationAddress);
59 
64  virtual void Serialize(TagBuffer i) const;
65 
70  virtual void Deserialize(TagBuffer i);
71 
76  virtual uint32_t GetSerializedSize() const;
77 
82  virtual void Print(std::ostream& os) const;
83 
88  Mac48Address GetGroundStationAddress(void) const;
89 
94  void SetGroundStationAddress(Mac48Address groundStationAddress);
95 
96  private:
97  static const uint32_t ADDRESS_LENGHT = 6;
98 
99  Mac48Address m_groundStationAddress;
100 };
101 
102 } // namespace ns3
103 
104 #endif /* SATELLITE_GROUND_STATION_ADDRESS_TAG_H */
Tag to store ground station destination address.
virtual TypeId GetInstanceTypeId(void) const
Get the type ID of instance.
virtual uint32_t GetSerializedSize() const
Get serialized size of SatGroundStationAddressTag.
virtual void Serialize(TagBuffer i) const
Serializes information to buffer from this instance of SatGroundStationAddressTag.
void SetGroundStationAddress(Mac48Address groundStationAddress)
Set the ground station MAC address.
virtual void Print(std::ostream &os) const
Print time stamp of this instance of SatGroundStationAddressTag.
static TypeId GetTypeId(void)
Get the type ID.
virtual void Deserialize(TagBuffer i)
Deserializes information from buffer to this instance of SatGroundStationAddressTag.
Mac48Address GetGroundStationAddress(void) const
Get the ground station MAC address.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.