User Manual, Developers Guide and API Documentation

RANG.hpp

Go to the documentation of this file.
00001 /*******************************************************************************
00002  * This file is part of openWNS (open Wireless Network Simulator)
00003  * _____________________________________________________________________________
00004  *
00005  * Copyright (C) 2004-2009
00006  * Chair of Communication Networks (ComNets)
00007  * Kopernikusstr. 5, D-52074 Aachen, Germany
00008  * email: info@openwns.org
00009  * www: http://www.openwns.org
00010  * _____________________________________________________________________________
00011  *
00012  * openWNS is free software; you can redistribute it and/or modify it under the
00013  * terms of the GNU Lesser General Public License version 2 as published by the
00014  * Free Software Foundation;
00015  *
00016  * openWNS is distributed in the hope that it will be useful, but WITHOUT ANY
00017  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
00018  * A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
00019  * details.
00020  *
00021  * You should have received a copy of the GNU Lesser General Public License
00022  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
00023  *
00024  ******************************************************************************/
00025 #ifndef WIMAC_RANG_HPP
00026 #define WIMAC_RANG_HPP
00027 
00028 #include <WNS/logger/Logger.hpp>
00029 
00030 #include <WNS/service/dll/DataTransmission.hpp>
00031 #include <WNS/service/dll/Handler.hpp>
00032 #include <WNS/node/component/Component.hpp>
00033 #include <WNS/container/Registry.hpp>
00034 
00035 #include <WNS/osi/PDU.hpp>
00036 
00037 namespace wimac {
00049     class RANG :
00050         public virtual wns::service::dll::UnicastDataTransmission,
00051         public virtual wns::service::dll::Notification,
00052         public virtual wns::service::dll::Handler,
00053         public wns::node::component::Component
00054     {
00055         typedef wns::container::Registry<wns::service::dll::UnicastAddress,
00056                                          wns::service::dll::UnicastDataTransmission*> AccessPointLookup;
00057     public:
00058         RANG(wns::node::Interface*, const wns::pyconfig::View&);
00059 
00060 
00061     //****
00062     /*
00063     void wns::service::dll::DataTransmission<Address>::sendData(
00064         const Address&,
00065         const wns::osi::PDUPtr&,
00066         wns::service::dll::protocolNumber,
00067         wns::service::dll::FlowID)
00068         
00069         [with Address = wns::service::dll::UnicastAddress]
00070     */
00071 
00074         virtual void
00075         sendData(
00076             const wns::service::dll::UnicastAddress& _peer,
00077             const wns::SmartPtr<wns::osi::PDU>& _data,
00078             wns::service::dll::protocolNumber protocol,
00079         wns::service::dll::FlowID _dllFlowID = wns::service::dll::NoFlowID);//****
00081 
00082         virtual wns::service::dll::UnicastAddress
00083         getMACAddress() const { return wns::service::dll::UnicastAddress();}
00084 
00087         virtual void
00088         registerHandler(wns::service::dll::protocolNumber protocol,
00089                         wns::service::dll::Handler* _dh);
00091 
00097         virtual void onData(const wns::SmartPtr<wns::osi::PDU>& _data,
00098                           wns::service::dll::FlowID _dllFlowID = wns::service::dll::NoFlowID);//****
00099 
00106         bool knowsAddress(wns::service::dll::UnicastAddress _sourceMACAddress);
00107 
00108         wns::service::dll::UnicastDataTransmission*
00109         getAccessPointFor(wns::service::dll::UnicastAddress _sourceMACAddress);
00110 
00111         void updateAPLookUp(wns::service::dll::UnicastAddress _sourceMACAddress,
00112                             wns::service::dll::UnicastDataTransmission* _ap);
00113 
00114         void removeAddress(wns::service::dll::UnicastAddress _sourceMACAddress,
00115                            wns::service::dll::UnicastDataTransmission* _ap);
00116 
00117         void onData(const wns::SmartPtr<wns::osi::PDU>& _data,
00118                     wns::service::dll::UnicastAddress _sourceMACAddress,
00119                     wns::service::dll::UnicastDataTransmission* _ap,
00120                     wns::service::dll::FlowID _dllFlowID = wns::service::dll::NoFlowID);//****
00122 
00125         virtual void onNodeCreated();
00126         virtual void onWorldCreated();
00127         virtual void onShutdown();
00128         virtual void registerFlowHandler(wns::service::dll::FlowHandler*){};
00129         virtual void registerIRuleControl(wns::service::dll::IRuleControl*){};
00131 
00132     protected:
00133         virtual void
00134         doStartup();
00135 
00136     private:
00137         wns::pyconfig::View config;
00138         AccessPointLookup accessPointLookup;
00139 
00143         typedef wns::container::Registry<wns::service::dll::protocolNumber, wns::service::dll::Handler*> DataHandlerRegistry;
00144 
00149         DataHandlerRegistry dataHandlerRegistry;
00150 
00151         wns::logger::Logger logger;
00152     };
00153 }
00154 
00155 #endif
00156 
00157 

Generated on Sun May 27 03:31:36 2012 for openWNS by  doxygen 1.5.5