|
|||||||||||
Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages
recorder.hGo to the documentation of this file.00001 00005 #ifndef _RECORDER_H_ 00006 #define _RECORDER_H_ 00007 00008 #include "advanceable.h" 00009 00011 class csimRecorder : public Advancable { 00012 00013 public: 00014 csimRecorder(void); 00015 virtual ~csimRecorder(); 00016 00017 virtual void reset(void); 00018 virtual int advance(void); 00019 virtual int updateInternal(void); 00020 00021 // Adds a new field to record from object O. 00022 virtual int addFieldToRecord(csimClass *O, char *fieldname); 00023 00024 virtual int addOutgoing(Advancable *){return 0;}; 00025 virtual int addIncoming(Advancable *){return 0;}; 00026 00028 double dt; 00029 00031 double Tprealloc; 00032 00034 int enabled; 00035 00036 protected: 00038 int nRecordSteps; 00039 00041 struct RecField { 00043 short i; 00044 00046 csimClass *o; 00047 00049 char *p; 00050 00052 short type; 00053 }; 00054 00056 int nRecFields; 00057 00059 int lRecFields; 00060 00062 RecField **recFields; 00063 00065 int nAnalogFields; 00066 00068 double *values; // pointer to memory where we write the recorded stuff 00070 int nValues; 00072 int lValues; 00074 int mod; // every mod time steps we actually do a recording 00075 00076 private: 00077 double *v; // current position to write to 00078 00079 int nStepsToRec; // how much time steps until the next actual recording is done 00080 00082 int add(RecField *f); 00083 00084 }; 00085 00086 #endif | |||||||||||
(C) 2003, Thomas Natschläger | last modified 07/10/2006 |