00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef __OMNET_DATA_OUTPUT_H__
00022 #define __OMNET_DATA_OUTPUT_H__
00023
00024 #include "ns3/nstime.h"
00025
00026 #include "data-output-interface.h"
00027
00028 namespace ns3 {
00029
00030
00031
00032
00033 class OmnetDataOutput : public DataOutputInterface {
00034 public:
00035 OmnetDataOutput();
00036 virtual ~OmnetDataOutput();
00037
00038 virtual void Output(DataCollector &dc);
00039
00040 void SetFilePrefix(const std::string prefix);
00041 std::string GetFilePrefix() const;
00042
00043 protected:
00044 virtual void DoDispose();
00045
00046 private:
00047 class OmnetOutputCallback : public DataOutputCallback {
00048 public:
00049 OmnetOutputCallback(std::ostream *scalar);
00050
00051 void OutputSingleton(std::string key,
00052 std::string variable,
00053 int val);
00054
00055 void OutputSingleton(std::string key,
00056 std::string variable,
00057 uint32_t val);
00058
00059 void OutputSingleton(std::string key,
00060 std::string variable,
00061 double val);
00062
00063 void OutputSingleton(std::string key,
00064 std::string variable,
00065 std::string val);
00066
00067 void OutputSingleton(std::string key,
00068 std::string variable,
00069 Time val);
00070
00071 private:
00072 std::ostream *m_scalar;
00073
00074 };
00075
00076 std::string m_filePrefix;
00077
00078 };
00079
00080
00081 };
00082
00083
00084 #endif // __OMNET_DATA_OUTPUT_H__