UWBIRPacket.h

00001 /* -*- mode:c++ -*- ********************************************************
00002  * file:        Packet.h
00003  *
00004  * author:      Jérôme Rousselot
00005  *
00006  * copyright:   (C) 2009 CSEM SA
00007  *
00008  *              This program is free software; you can redistribute it
00009  *              and/or modify it under the terms of the GNU General Public
00010  *              License as published by the Free Software Foundation; either
00011  *              version 2 of the License, or (at your option) any later
00012  *              version.
00013  *              For further information see file COPYING
00014  *              in the top level directory
00015  ***************************************************************************
00016  * part of:     framework implementation developed by tkn
00017  **************************************************************************/
00018 
00019 #ifndef BBUWBIRPACKET_H
00020 #define BBUWBIRPACKET_H
00021 
00022 #include <omnetpp.h>
00023 #include "ImNotifiable.h"
00024 #include <sstream>
00025 
00033 class  UWBIRPacket : public BBItem
00034 {
00035     BBITEM_METAINFO(BBItem)
00036 
00037 protected:
00039     long nbSyncAttempts;
00040     long nbSyncSuccesses;
00041     long nbPacketsReceived;
00042 
00043 public:
00044 
00046     UWBIRPacket() : BBItem(), nbSyncAttempts(0), nbSyncSuccesses(0), nbPacketsReceived(0) { };
00047 
00048 
00049     double getNbPacketsReceived() const  {
00050         return nbPacketsReceived;
00051     }
00052 
00053     void setNbPacketsReceived(int n)  {
00054         nbPacketsReceived = n;
00055     }
00056 
00057     double getNbSyncAttempts() const  {
00058             return nbSyncAttempts;
00059   }
00060 
00061     void setNbSyncAttempts(long n)  {
00062             nbSyncAttempts = n;
00063   }
00064 
00065     long getNbSyncSuccesses() {
00066       return nbSyncSuccesses;
00067     }
00068 
00069     void setNbSyncSuccesses(long n) {
00070       nbSyncSuccesses = n;
00071     }
00072 
00074     std::string info() const {
00075         std::ostringstream ost;
00076         ost << " Number of packets generated is "<< 0;
00077         return ost.str();
00078     }
00079 };
00080 
00081 
00082 #endif