00001
00002 #ifndef DDF_EVENTSIMU_HPP
00003 #define DDF_EVENTSIMU_HPP
00004
00005 namespace jafar
00006 {
00007 namespace ddfsimu
00008 {
00012 class EventSimu : public SensorSimuBase
00013 {
00014 unsigned short m_node_id;
00015 VEC m_stat;
00016 bool m_update_tracker;
00017 bool m_sync_tracker;
00018
00019 public:
00020 EventSimu(unsigned short node_id): SensorSimuBase(1,1), m_node_id(node_id), m_stat(1), m_update_tracker(false), m_sync_tracker(false)
00021 {
00022 m_type_name = SENSOR_EVENT;
00023 m_stat.clear();
00024 }
00025 EventSimu(EventSimu const& other): SensorSimuBase(1,1), m_node_id(other.m_node_id), m_stat(other.m_stat) {}
00026
00027 virtual ~EventSimu() {}
00028
00029 void SetUpdateTrackerWithPOM(bool update) { m_update_tracker = update; }
00030 void SetSyncTracker(bool sync) { m_sync_tracker = sync; }
00031 bool GetUpdateTrackerWithPOM() const { return m_update_tracker; }
00032 bool GetSyncTracker() const{ return m_sync_tracker; }
00033 unsigned short GetNodeID() const { return m_node_id; }
00034 void Perceive(VEC const& proc_state, time t) {
00035 AddMeasurement(t,t+GetProcTime(),m_stat);
00036 m_stat[0] += 1.0;
00037 }
00038
00039 VEC GetSensorSimVariance() const { VEC v(1); return v;}
00040 void ComputeInformation(VEC const& z, VEC &i, MSYM &I) {}
00041
00042 };
00043 }
00044 }
00045 #endif