envirext.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __ENVIREXT_H
00021 #define __ENVIREXT_H
00022
00023 #include <iostream>
00024 #include "simkerneldefs.h"
00025 #include "cobject.h"
00026
00027 NAMESPACE_BEGIN
00028
00029
00030 class cModule;
00031 class cStatistic;
00032
00053 class SIM_API cOutputVectorManager : public cObject
00054 {
00055 private:
00056
00057 cOutputVectorManager(const cOutputVectorManager&);
00058 cOutputVectorManager& operator=(const cOutputVectorManager&);
00059
00060 public:
00063
00067 explicit cOutputVectorManager() {}
00068
00072 virtual ~cOutputVectorManager() {}
00074
00077
00081 virtual void startRun() = 0;
00082
00086 virtual void endRun() = 0;
00088
00091
00097 virtual void *registerVector(const char *modulename, const char *vectorname) = 0;
00098
00102 virtual void deregisterVector(void *vechandle) = 0;
00103
00108 virtual void setVectorAttribute(void *vechandle, const char *name, const char *value) = 0;
00109
00115 virtual bool record(void *vechandle, simtime_t t, double value) = 0;
00116
00121 virtual const char *getFileName() const = 0;
00122
00126 virtual void flush() = 0;
00128 };
00129
00130
00151 class SIM_API cOutputScalarManager : public cObject
00152 {
00153 private:
00154
00155 cOutputScalarManager(const cOutputScalarManager&);
00156 cOutputScalarManager& operator=(const cOutputScalarManager&);
00157
00158 public:
00161
00165 explicit cOutputScalarManager() {}
00166
00170 virtual ~cOutputScalarManager() {}
00172
00175
00179 virtual void startRun() = 0;
00180
00184 virtual void endRun() = 0;
00186
00189
00193 virtual void recordScalar(cComponent *component, const char *name, double value, opp_string_map *attributes=NULL) = 0;
00194
00199 virtual void recordStatistic(cComponent *component, const char *name, cStatistic *statistic, opp_string_map *attributes=NULL) = 0;
00200
00205 virtual const char *getFileName() const = 0;
00206
00210 virtual void flush() = 0;
00212 };
00213
00214
00234 class SIM_API cSnapshotManager : public cObject
00235 {
00236 private:
00237
00238 cSnapshotManager(const cSnapshotManager&);
00239 cSnapshotManager& operator=(const cSnapshotManager&);
00240
00241 public:
00244
00248 explicit cSnapshotManager() {}
00249
00253 virtual ~cSnapshotManager() {}
00255
00258
00262 virtual void startRun() = 0;
00263
00267 virtual void endRun() = 0;
00269
00275 virtual std::ostream *getStreamForSnapshot() = 0;
00276
00280 virtual void releaseStreamForSnapshot(std::ostream *os) = 0;
00281
00286 virtual const char *getFileName() const = 0;
00288 };
00289
00290 NAMESPACE_END
00291
00292
00293 #endif
00294
00295