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 namespace ns3
27 {
28 
42 class SatEncapPduStatusTag : public Tag
43 {
44  public:
49 
54  void SetStatus(uint8_t status);
55 
60  uint8_t GetStatus(void) const;
61 
66  static TypeId GetTypeId(void);
67 
72  virtual TypeId GetInstanceTypeId(void) const;
73 
78  virtual uint32_t GetSerializedSize(void) const;
79 
84  virtual void Serialize(TagBuffer i) const;
85 
90  virtual void Deserialize(TagBuffer i);
91 
96  virtual void Print(std::ostream& os) const;
97 
101  typedef enum
102  {
103  FULL_PDU = 0,
106  END_PDU = 3,
107  LAST_ELEMENT = 4
109 
110  private:
111  uint8_t m_pduStatus;
112 };
113 
114 } // namespace ns3
115 
116 #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.