satellite-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) 2014 Magister Solutions
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: Budiarto Herman <budiarto.herman@magister.fi>
19  */
20 
21 #ifndef SATELLITE_ADDRESS_TAG_H
22 #define SATELLITE_ADDRESS_TAG_H
23 
24 #include <ns3/address.h>
25 #include <ns3/tag.h>
26 
27 namespace ns3
28 {
29 
35 class SatAddressTag : public Tag
36 {
37  public:
41  SatAddressTag();
42 
47  SatAddressTag(Address addr);
48 
53  void SetSourceAddress(Address addr);
54 
59  Address GetSourceAddress() const;
60 
64  static TypeId GetTypeId();
65 
70  virtual TypeId GetInstanceTypeId() const;
71 
75  virtual uint32_t GetSerializedSize() const;
76 
81  virtual void Serialize(TagBuffer buf) const;
82 
87  virtual void Deserialize(TagBuffer buf);
88 
93  virtual void Print(std::ostream& os) const;
94 
95  private:
96  Address m_sourceAddress;
97 };
98 
99 } // namespace ns3
100 
101 #endif /* SATELLITE_ADDRESS_TAG_H */
This class implements a tag that carries the MAC address of the sender of the packet.
virtual void Serialize(TagBuffer buf) const
Serializes information to buffer from this instance of Inherited.
virtual uint32_t GetSerializedSize() const
Inherited from Tag base class.
static TypeId GetTypeId()
Inherited from ObjectBase base class.
void SetSourceAddress(Address addr)
Set the source address.
Address GetSourceAddress() const
Get the source address.
virtual void Print(std::ostream &os) const
Print time stamp of this instance of Inherited.
virtual void Deserialize(TagBuffer buf)
Deserializes information from buffer to this instance of Inherited.
virtual TypeId GetInstanceTypeId() const
Get the type ID of instance.
SatAddressTag()
/ Creates a SatAddressTag instance with an invalid source address.
Address m_sourceAddress
The source address.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.