User Manual, Developers Guide and API Documentation

Aggregation.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_DRAFTN_AGGREGATION_HPP
00030 #define WIFIMAC_DRAFTN_AGGREGATION_HPP
00031 
00032 #include <WIFIMAC/lowerMAC/Manager.hpp>
00033 
00034 #include <WNS/ldk/concatenation/Concatenation.hpp>
00035 #include <WNS/events/CanTimeout.hpp>
00036 #include <WNS/ldk/probe/Probe.hpp>
00037 #include <WNS/probe/bus/ContextCollector.hpp>
00038 
00039 namespace wifimac { namespace draftn {
00040 
00057     class Aggregation:
00058         public wns::ldk::concatenation::Concatenation,
00059         public wns::events::CanTimeout,
00060         public wns::ldk::probe::Probe
00061     {
00062     public:
00063         Aggregation(wns::ldk::fun::FUN* fun, const wns::pyconfig::View& config);
00064 
00069         void processOutgoing(const wns::ldk::CompoundPtr& compound);
00070 
00074         const wns::ldk::CompoundPtr hasSomethingToSend() const;
00075 
00079         wns::ldk::CompoundPtr getSomethingToSend();
00080 
00081         void onFUNCreated();
00082 
00084         void onTimeout();
00085 
00086     private:
00087         const std::string managerName;
00088         const bool impatientTransmission;
00089         const wns::simulator::Time maxDelay;
00090         bool sendNow;
00091         wns::service::dll::UnicastAddress currentReceiver;
00092 
00093         wns::probe::bus::ContextCollectorPtr aggregationSizeFrames;
00094 
00095         struct Friends
00096         {
00097             wifimac::lowerMAC::Manager* manager;
00098         } friends;
00099     };
00100 
00101 
00102 } // mac
00103 } // wifimac
00104 
00105 #endif // WIFIMAC_LOWERMAC_AGGREGATION_HPP

Generated on Mon May 21 03:32:10 2012 for openWNS by  doxygen 1.5.5