00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef UWBIREDSYNC_H_
00010 #define UWBIREDSYNC_H_
00011
00012 #include <vector>
00013 #include <map>
00014 #include <math.h>
00015
00016 #include "Mapping.h"
00017 #include "AirFrame_m.h"
00018 #include "MacPkt_m.h"
00019 #include "Decider.h"
00020 #include "DeciderUWBIRED.h"
00021
00022 using namespace std;
00023
00024 class PhyLayerUWBIR;
00025
00053 class DeciderUWBIREDSync: public DeciderUWBIRED {
00054 public:
00055 DeciderUWBIREDSync(DeciderToPhyInterface* iface,
00056 PhyLayerUWBIR* _uwbiface,
00057 double _syncThreshold, bool _syncAlwaysSucceeds, bool _stats,
00058 bool _trace, double _tmin, bool alwaysFailOnDataInterference);
00059 ~DeciderUWBIREDSync();
00060
00061 protected:
00062 virtual bool attemptSync(Signal* signal);
00063 bool evaluateEnergy(Signal* s);
00064
00065 private:
00066 simtime_t tmin;
00067 AirFrameVector syncVector;
00068 Argument argSync;
00069 };
00070
00071 #endif