A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
data-collector.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2008 Drexel University
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: Joe Kopena (tjkopena@cs.drexel.edu)
19  */
20 
21 #ifndef DATA_COLLECTOR_H
22 #define DATA_COLLECTOR_H
23 
24 #include <list>
25 #include <string>
26 
27 #include "ns3/object.h"
28 
29 namespace ns3 {
30 
36 
37 //------------------------------------------------------------
38 //--------------------------------------------
39 typedef std::list<Ptr<DataCalculator> > DataCalculatorList;
40 typedef std::list<std::pair<std::string, std::string> > MetadataList;
41 
46 class DataCollector : public Object {
47 public:
48  DataCollector();
49  virtual ~DataCollector();
50 
51  void DescribeRun (std::string experiment,
52  std::string strategy,
53  std::string input,
54  std::string runID,
55  std::string description = "");
56 
57  std::string GetExperimentLabel () const { return m_experimentLabel; }
58  std::string GetStrategyLabel () const { return m_strategyLabel; }
59  std::string GetInputLabel () const { return m_inputLabel; }
60  std::string GetRunLabel () const { return m_runLabel; }
61  std::string GetDescription () const { return m_description; }
62 
63  void AddMetadata (std::string key, std::string value);
64  void AddMetadata (std::string key, double value);
65  void AddMetadata (std::string key, uint32_t value);
66  MetadataList::iterator MetadataBegin ();
67  MetadataList::iterator MetadataEnd ();
68 
70  DataCalculatorList::iterator DataCalculatorBegin ();
71  DataCalculatorList::iterator DataCalculatorEnd ();
72 
73 protected:
74  virtual void DoDispose ();
75 
76 private:
77  std::string m_experimentLabel;
78  std::string m_strategyLabel;
79  std::string m_inputLabel;
80  std::string m_runLabel;
81  std::string m_description;
82 
85 
86  // end class DataCollector
87 };
88 
89 // end namespace ns3
90 };
91 
92 #endif /* DATA_COLLECTOR_H */
std::string m_strategyLabel
DataCalculatorList::iterator DataCalculatorEnd()
void experiment(bool enableCtsRts)
Run single 10 seconds experiment with enabled or disabled RTS/CTS mechanism.
std::list< Ptr< DataCalculator > > DataCalculatorList
std::string GetRunLabel() const
std::string m_description
virtual ~DataCollector()
MetadataList::iterator MetadataBegin()
void AddDataCalculator(Ptr< DataCalculator > datac)
std::string GetStrategyLabel() const
void AddMetadata(std::string key, std::string value)
std::string m_experimentLabel
std::string m_runLabel
std::string GetExperimentLabel() const
DataCalculatorList m_calcList
std::string m_inputLabel
std::string GetDescription() const
DataCalculatorList::iterator DataCalculatorBegin()
void DescribeRun(std::string experiment, std::string strategy, std::string input, std::string runID, std::string description="")
virtual void DoDispose()
std::string GetInputLabel() const
a base class which provides memory management and object aggregation
Definition: object.h:63
MetadataList m_metadata
MetadataList::iterator MetadataEnd()
std::list< std::pair< std::string, std::string > > MetadataList