Loading...
Searching...
No Matches
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
35namespace 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
82 void DoDispose();
83
89 double GetRxCno(key_t key);
90
96 void SetRxCno(key_t key, double cno);
97
103 void SetRxCnoFile(key_t key, std::string path);
104
108 void Reset();
109
115 Ptr<SatInputFileStreamTimeDoubleContainer> AddNode(
116 std::pair<Address, SatEnums::ChannelType_t> key);
117
118 private:
124 Ptr<SatInputFileStreamTimeDoubleContainer> FindNode(key_t key);
125
130
136};
137
138} // namespace ns3
139
140#endif /* SATELLITE_RX_CNO_INPUT_TRACE_CONTAINER_H */
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.
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.