src/lte/model/lte-rlc-tag.h
author Nicola Baldo <nbaldo@cttc.es>
Fri, 17 Jun 2011 17:32:20 +0200
changeset 8148 09e2d03022a2
parent 7901 2451f71f1ce4
child 8374 5a07200122a6
permissions -rw-r--r--
run check-style on src/lte/model
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7901
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
     1
/* -*-  Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
     2
/*
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
     3
 * Copyright (c) 2011 CTTC
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
     4
 *
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
     5
 * This program is free software; you can redistribute it and/or modify
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
     6
 * it under the terms of the GNU General Public License version 2 as
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
     7
 * published by the Free Software Foundation;
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
     8
 *
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    12
 * GNU General Public License for more details.
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    13
 *
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    14
 * You should have received a copy of the GNU General Public License
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    15
 * along with this program; if not, write to the Free Software
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    16
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    17
 *
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    18
 * Author: Jaume Nin <jaume.nin@cttc.es>
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    19
 */
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    20
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    21
#ifndef RLC_TAG_H
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    22
#define RLC_TAG_H
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    23
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    24
#include "ns3/packet.h"
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    25
#include "ns3/nstime.h"
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    26
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    27
8148
09e2d03022a2 run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents: 7901
diff changeset
    28
namespace ns3 {
7901
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    29
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    30
class Tag;
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    31
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    32
/**
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    33
 * Tag to calculate the per-PDU delay from eNb RLC to UE RLC
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    34
 */
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    35
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    36
class RlcTag : public Tag
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    37
{
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    38
public:
8148
09e2d03022a2 run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents: 7901
diff changeset
    39
  static TypeId  GetTypeId (void);
09e2d03022a2 run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents: 7901
diff changeset
    40
  virtual TypeId  GetInstanceTypeId (void) const;
7901
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    41
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    42
  /**
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    43
   * Create an empty RLC tag
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    44
   */
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    45
  RlcTag ();
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    46
  /**
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    47
   * Create an RLC tag with the given senderTimestamp
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    48
   */
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    49
  RlcTag (Time senderTimestamp);
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    50
8148
09e2d03022a2 run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents: 7901
diff changeset
    51
  virtual void  Serialize (TagBuffer i) const;
09e2d03022a2 run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents: 7901
diff changeset
    52
  virtual void  Deserialize (TagBuffer i);
09e2d03022a2 run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents: 7901
diff changeset
    53
  virtual uint32_t  GetSerializedSize () const;
7901
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    54
  virtual void Print (std::ostream &os) const;
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    55
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    56
  /**
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    57
   * Get the instant when the RLC delivers the PDU to the MAC SAP provider
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    58
   */
8148
09e2d03022a2 run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents: 7901
diff changeset
    59
  Time  getSenderTimestamp (void) const
7901
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    60
  {
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    61
    return m_senderTimestamp;
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    62
  }
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    63
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    64
  /**
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    65
   * Set the sender timestamp
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    66
   * @param senderTimestamp time stamp of the instant when the RLC delivers the PDU to the MAC SAP provider
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    67
   */
8148
09e2d03022a2 run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents: 7901
diff changeset
    68
  void  setSenderTimestamp (Time senderTimestamp)
7901
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    69
  {
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    70
    this->m_senderTimestamp = senderTimestamp;
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    71
  }
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    72
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    73
private:
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    74
  Time m_senderTimestamp;
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    75
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    76
};
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    77
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    78
} //namespace ns3
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    79
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents:
diff changeset
    80
#endif /* RLC_TAG_H */