User Manual, Developers Guide and API Documentation

DuplicateFilter.hpp

Go to the documentation of this file.
00001 /******************************************************************************
00002  * WiFiMac                                                                    *
00003  * This file is part of openWNS (open Wireless Network Simulator)
00004  * _____________________________________________________________________________
00005  *
00006  * Copyright (C) 2004-2007
00007  * Chair of Communication Networks (ComNets)
00008  * Kopernikusstr. 16, D-52074 Aachen, Germany
00009  * phone: ++49-241-80-27910,
00010  * fax: ++49-241-80-22242
00011  * email: info@openwns.org
00012  * www: http://www.openwns.org
00013  * _____________________________________________________________________________
00014  *
00015  * openWNS is free software; you can redistribute it and/or modify it under the
00016  * terms of the GNU Lesser General Public License version 2 as published by the
00017  * Free Software Foundation;
00018  *
00019  * openWNS is distributed in the hope that it will be useful, but WITHOUT ANY
00020  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
00021  * A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
00022  * details.
00023  *
00024  * You should have received a copy of the GNU Lesser General Public License
00025  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
00026  *
00027  ******************************************************************************/
00028 
00029 #ifndef WIFIMAC_LOWERMAC_DUPLICATEFILTER_HPP
00030 #define WIFIMAC_LOWERMAC_DUPLICATEFILTER_HPP
00031 
00032 #include <WIFIMAC/lowerMAC/Manager.hpp>
00033 
00034 #include <WNS/service/dll/Address.hpp>
00035 #include <WNS/ldk/fu/Plain.hpp>
00036 
00037 namespace wifimac { namespace lowerMAC {
00038 
00039     class DuplicateFilterCommand :
00040         public wns::ldk::Command
00041     {
00042     public:
00043         typedef int64_t SequenceNumber;
00044 
00045         struct {} local;
00046         struct {
00047             SequenceNumber sn;
00048         } peer;
00049         struct {} magic;
00050     };
00051 
00055     class DuplicateFilter:
00056         public wns::ldk::fu::Plain<DuplicateFilter, DuplicateFilterCommand>
00057     {
00058     public:
00059         DuplicateFilter(wns::ldk::fun::FUN* fun, const wns::pyconfig::View& config);
00060         virtual ~DuplicateFilter();
00061     private:
00062         // CompoundHandlerInterface
00063         void doSendData(const wns::ldk::CompoundPtr& compound);
00064         void doOnData(const wns::ldk::CompoundPtr& compound);
00065         void onFUNCreated();
00066         bool doIsAccepting(const wns::ldk::CompoundPtr& compound) const;
00067         void doWakeup();
00068 
00069         wns::logger::Logger logger;
00070         DuplicateFilterCommand::SequenceNumber nextSN;
00071 
00072         typedef wns::container::Registry<wns::service::dll::UnicastAddress, DuplicateFilterCommand::SequenceNumber> AdrSNMap;
00073         AdrSNMap lastReceivedSN;
00074 
00075         const std::string managerName;
00076         const std::string arqCommandName;
00077 
00078         struct Friends
00079         {
00080             wifimac::lowerMAC::Manager* manager;
00081         } friends;
00082     };
00083 } // end namespace convergence
00084 } // end namespace wifimac
00085 
00086 
00087 #endif // ifndef WIFIMAC_LOWERMAC_DUPLICATEFILTER_HPP

Generated on Wed May 23 03:32:07 2012 for openWNS by  doxygen 1.5.5