Loading...
Searching...
No Matches
satellite-fading-output-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_OUTPUT_TRACE_CONTAINER_H
21#define SATELLITE_FADING_OUTPUT_TRACE_CONTAINER_H
22
24#include "satellite-enums.h"
25
26#include "ns3/mac48-address.h"
27#include "ns3/satellite-output-fstream-double-container.h"
28
29#include <map>
30#include <utility>
31#include <vector>
32
33namespace ns3
34{
35
43{
44 public:
48 typedef std::pair<Address, SatEnums::ChannelType_t> key_t;
49
53 typedef std::map<key_t, Ptr<SatOutputFileStreamDoubleContainer>> container_t;
54
59
64
69 static TypeId GetTypeId(void);
70
74 void DoDispose();
75
81 void AddToContainer(key_t key, std::vector<double> newItem);
82
87 void EnableFigureOutput(bool enableFigureOutput)
88 {
89 m_enableFigureOutput = enableFigureOutput;
90 }
91
95 void Reset();
96
97 private:
103 Ptr<SatOutputFileStreamDoubleContainer> AddNode(
104 std::pair<Address, SatEnums::ChannelType_t> key);
105
111 Ptr<SatOutputFileStreamDoubleContainer> FindNode(key_t key);
112
116 void WriteToFile();
117
122
127};
128
129} // namespace ns3
130
131#endif /* SATELLITE_FADING_OUTPUT_TRACE_CONTAINER_H */
static TypeId GetTypeId(void)
NS-3 type id function.
void AddToContainer(key_t key, std::vector< double > newItem)
Add the vector containing the values to container matching the key.
std::map< key_t, Ptr< SatOutputFileStreamDoubleContainer > > container_t
typedef for map of containers
std::pair< Address, SatEnums::ChannelType_t > key_t
typedef for map key
void EnableFigureOutput(bool enableFigureOutput)
Function for enabling / disabling figure output.
Ptr< SatOutputFileStreamDoubleContainer > AddNode(std::pair< Address, SatEnums::ChannelType_t > key)
Function for adding the node to the map.
Ptr< SatOutputFileStreamDoubleContainer > FindNode(key_t key)
Function for finding the container matching the key.
void WriteToFile()
Write the contents of a container matching to the key into a file.
void Reset()
Function for resetting the variables.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.