satellite-encap-pdu-status-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: Jani Puttonen <jani.puttonen@magister.fi>
19  */
20 
21 #ifndef SATELLITE_ENCAP_PDU_STATUS_TAG_H
22 #define SATELLITE_ENCAP_PDU_STATUS_TAG_H
23 
24 #include <ns3/tag.h>
25 
26 #include <ostream>
27 #include <stdint.h>
28 
29 namespace ns3
30 {
31 
45 class SatEncapPduStatusTag : public Tag
46 {
47  public:
52 
57  void SetStatus(uint8_t status);
58 
63  uint8_t GetStatus(void) const;
64 
69  static TypeId GetTypeId(void);
70 
75  virtual TypeId GetInstanceTypeId(void) const;
76 
81  virtual uint32_t GetSerializedSize(void) const;
82 
87  virtual void Serialize(TagBuffer i) const;
88 
93  virtual void Deserialize(TagBuffer i);
94 
99  virtual void Print(std::ostream& os) const;
100 
104  typedef enum
105  {
106  FULL_PDU = 0,
109  END_PDU = 3,
110  LAST_ELEMENT = 4
112 
113  private:
114  uint8_t m_pduStatus;
115 };
116 
117 } // namespace ns3
118 
119 #endif // SATELLITE_ENCAP_PDU_STATUS_TAG_H
SatEncapPduStatusTag is used temporarily to tag packets with the fragmentation status in the encapsul...
virtual void Deserialize(TagBuffer i)
Deserializes information from buffer to this instance of SatEncapPduStatusTag.
virtual uint32_t GetSerializedSize(void) const
Get serialized size of SatEncapPduStatusTag.
static TypeId GetTypeId(void)
Get the type ID.
void SetStatus(uint8_t status)
Set PDU status.
uint8_t GetStatus(void) const
Get PDU status.
virtual void Serialize(TagBuffer i) const
Serializes information to buffer from this instance of SatEncapPduStatusTag.
virtual TypeId GetInstanceTypeId(void) const
Get the type ID of instance.
virtual void Print(std::ostream &os) const
Print time stamp of this instance of SatEncapPduStatusTag.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.