MacToNetwControlInfo.h

00001 //
00002 // This program is free software: you can redistribute it and/or modify
00003 // it under the terms of the GNU Lesser General Public License as published by
00004 // the Free Software Foundation, either version 3 of the License, or
00005 // (at your option) any later version.
00006 // 
00007 // This program is distributed in the hope that it will be useful,
00008 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 // GNU Lesser General Public License for more details.
00011 // 
00012 // You should have received a copy of the GNU Lesser General Public License
00013 // along with this program.  If not, see http://www.gnu.org/licenses/.
00014 // 
00015 
00016 #ifndef MACTONETWCONTROLINFO_H_
00017 #define MACTONETWCONTROLINFO_H_
00018 
00019 #include <omnetpp.h>
00020 
00033 class MacToNetwControlInfo : public cObject {
00034 protected:
00036   double bitErrorRate;
00037 
00039   long lastHopMac;
00040 
00042   double rssi;
00043 
00044 public:
00048   MacToNetwControlInfo(long lastHop, double ber = 0, double rssi = 0):
00049     bitErrorRate(ber),
00050     lastHopMac(lastHop),
00051     rssi(rssi)
00052   {}
00053 
00054   virtual ~MacToNetwControlInfo() {}
00055 
00059   double getBitErrorRate() const
00060     {
00061         return bitErrorRate;
00062     }
00063 
00069   virtual void setBitErrorRate(double ber) {
00070     bitErrorRate = ber;
00071   }
00072 
00076   long getLastHopMac() const {
00077     return lastHopMac;
00078   }
00079 
00085   virtual void setLastHopMac(long lastHop) {
00086     lastHopMac = lastHop;
00087   }
00088 
00094   virtual const double getRSSI() {
00095     return rssi;
00096   }
00097 
00102   void setRSSI(double _rssi) {
00103     rssi = _rssi;
00104   }
00105 };
00106 
00107 #endif /* MACTONETWCONTROLINFO_H_ */