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 namespace ns3
32 {
33 
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 
57  typedef std::map<key_t, double> containerConstantCno_t;
58 
63 
68 
73  static TypeId GetTypeId(void);
74 
79  TypeId GetInstanceTypeId(void) const;
80 
84  void DoDispose();
85 
91  double GetRxCno(key_t key);
92 
98  void SetRxCno(key_t key, double cno);
99 
105  void SetRxCnoFile(key_t key, std::string path);
106 
110  void Reset();
111 
117  Ptr<SatInputFileStreamTimeDoubleContainer> AddNode(
118  std::pair<Address, SatEnums::ChannelType_t> key);
119 
120  private:
126  Ptr<SatInputFileStreamTimeDoubleContainer> FindNode(key_t key);
127 
132 
138 };
139 
140 } // namespace ns3
141 
142 #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.