satellite-rx-cno-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  * Bastien Tauran <bastien.tauran@viveris.fr>
20  */
21 
22 #ifndef SATELLITE_RX_CNO_INPUT_TRACE_CONTAINER_H
23 #define SATELLITE_RX_CNO_INPUT_TRACE_CONTAINER_H
24 
26 #include "satellite-enums.h"
27 
28 #include <ns3/mac48-address.h>
29 #include <ns3/satellite-input-fstream-time-double-container.h>
30 
31 #include <map>
32 #include <string>
33 #include <utility>
34 
35 namespace ns3
36 {
37 
46 {
47  public:
51  typedef std::pair<Address, SatEnums::ChannelType_t> key_t;
52 
56  typedef std::map<key_t, Ptr<SatInputFileStreamTimeDoubleContainer>> container_t;
57 
61  typedef std::map<key_t, double> containerConstantCno_t;
62 
67 
72 
77  static TypeId GetTypeId(void);
78 
83  TypeId GetInstanceTypeId(void) const;
84 
88  void DoDispose();
89 
95  double GetRxCno(key_t key);
96 
102  void SetRxCno(key_t key, double cno);
103 
109  void SetRxCnoFile(key_t key, std::string path);
110 
114  void Reset();
115 
121  Ptr<SatInputFileStreamTimeDoubleContainer> AddNode(
122  std::pair<Address, SatEnums::ChannelType_t> key);
123 
124  private:
130  Ptr<SatInputFileStreamTimeDoubleContainer> FindNode(key_t key);
131 
136 
142 };
143 
144 } // namespace ns3
145 
146 #endif /* SATELLITE_RX_CNO_INPUT_TRACE_CONTAINER_H */
Base class for trace containers such as interference or fading traces.
Class for Rx C/N0 input trace container.
std::map< key_t, double > containerConstantCno_t
typedef for map of containers
containerConstantCno_t m_containerConstantCno
Container to store the constant values of C/N0.
TypeId GetInstanceTypeId(void) const
NS-3 instance type id function.
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.
void SetRxCno(key_t key, double cno)
Function for setting the Rx C/N0 with constant value.
std::pair< Address, SatEnums::ChannelType_t > key_t
typedef for map key
double GetRxCno(key_t key)
Function for getting the Rx C/N0.
void SetRxCnoFile(key_t key, std::string path)
Function for setting the Rx C/N0 with input file.
Ptr< SatInputFileStreamTimeDoubleContainer > FindNode(key_t key)
Function for finding the container matching the key.
static TypeId GetTypeId(void)
NS-3 type id function.
std::map< key_t, Ptr< SatInputFileStreamTimeDoubleContainer > > container_t
typedef for map of containers
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.