satellite-fading-input-trace-container.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: Frans Laakso <frans.laakso@magister.fi>
19  */
20 #ifndef SATELLITE_FADING_INPUT_TRACE_CONTAINER_H
21 #define SATELLITE_FADING_INPUT_TRACE_CONTAINER_H
22 
24 #include "satellite-enums.h"
25 
26 #include <ns3/mac48-address.h>
27 #include <ns3/satellite-input-fstream-time-double-container.h>
28 
29 #include <map>
30 #include <utility>
31 
32 namespace ns3
33 {
34 
42 {
43  public:
47  typedef std::pair<Address, SatEnums::ChannelType_t> key_t;
48 
52  typedef std::map<key_t, Ptr<SatInputFileStreamTimeDoubleContainer>> container_t;
53 
58 
63 
68  static TypeId GetTypeId(void);
69 
74  TypeId GetInstanceTypeId(void) const;
75 
79  void DoDispose();
80 
86  double GetFadingValue(key_t key);
87 
91  void Reset();
92 
93  private:
99  Ptr<SatInputFileStreamTimeDoubleContainer> AddNode(
100  std::pair<Address, SatEnums::ChannelType_t> key);
101 
107  Ptr<SatInputFileStreamTimeDoubleContainer> FindNode(key_t key);
108 
113 };
114 
115 } // namespace ns3
116 
117 #endif /* SATELLITE_FADING_INPUT_TRACE_CONTAINER_H */
Base class for trace containers such as interference or fading traces.
Class for fading input trace container.
std::pair< Address, SatEnums::ChannelType_t > key_t
typedef for map key
static TypeId GetTypeId(void)
NS-3 type id function.
std::map< key_t, Ptr< SatInputFileStreamTimeDoubleContainer > > container_t
typedef for map of containers
double GetFadingValue(key_t key)
Function for getting the fading value.
void Reset()
Function for resetting the variables.
Ptr< SatInputFileStreamTimeDoubleContainer > AddNode(std::pair< Address, SatEnums::ChannelType_t > key)
Function for adding the node to the map.
TypeId GetInstanceTypeId(void) const
NS-3 instance type id function.
Ptr< SatInputFileStreamTimeDoubleContainer > FindNode(key_t key)
Function for finding the container matching the key.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.