User Manual, Developers Guide and API Documentation

AssociationHandlerUT.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-2007
00006  * Chair of Communication Networks (ComNets)
00007  * Kopernikusstr. 5, D-52074 Aachen, Germany
00008  * phone: ++49-241-80-27910,
00009  * fax: ++49-241-80-22242
00010  * email: info@openwns.org
00011  * www: http://www.openwns.org
00012  * _____________________________________________________________________________
00013  *
00014  * openWNS is free software; you can redistribute it and/or modify it under the
00015  * terms of the GNU Lesser General Public License version 2 as published by the
00016  * Free Software Foundation;
00017  *
00018  * openWNS is distributed in the hope that it will be useful, but WITHOUT ANY
00019  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
00020  * A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
00021  * details.
00022  *
00023  * You should have received a copy of the GNU Lesser General Public License
00024  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
00025  *
00026  ******************************************************************************/
00027 
00028 #ifndef LTE_CONTROLPLANE_ASSOCIATIONHANDLER_ASSOCIATIONHANDLERUT_HPP
00029 #define LTE_CONTROLPLANE_ASSOCIATIONHANDLER_ASSOCIATIONHANDLERUT_HPP
00030 
00031 #include <LTE/controlplane/associationHandler/AssociationHandler.hpp>
00032 #include <LTE/controlplane/associationHandler/IAssociationHandler.hpp>
00033 
00034 #include <WNS/Cloneable.hpp>
00035 #include <WNS/events/CanTimeout.hpp>
00036 
00037 namespace lte {
00038 
00039   namespace controlplane {
00040 
00041     class AssociationsProxyUT;
00042 
00043     namespace associationHandler {
00044 
00045       class AssociationHandlerUT :
00046     public AssociationHandler,
00047     public IAssociationHandlerTriggers,
00048     public wns::events::CanTimeout,
00049     public wns::Cloneable<AssociationHandlerUT>
00050       {
00051 
00052       public:
00053     AssociationHandlerUT(wns::ldk::fun::FUN* fun, const wns::pyconfig::View& config);
00054     virtual ~AssociationHandlerUT(){};
00055 
00056     virtual void
00057     onFUNCreated();
00058 
00059     virtual void
00060     doOnData(const wns::ldk::CompoundPtr&);
00061 
00062     virtual void
00063     onTimeout();
00064 
00065     void
00066     associateTo(wns::service::dll::UnicastAddress rapAdr);
00067 
00068     void
00069     disassociate(wns::service::dll::UnicastAddress rapAdr);
00070 
00071     void
00072     switchAssociationTo(wns::service::dll::UnicastAddress rapAdr);
00073 
00074     // the below two functions will only be called by BCHService, if used without MIH
00075     void
00076     bestRAP(wns::service::dll::UnicastAddress destination);
00077 
00078     void
00079     belowThreshold(wns::service::dll::UnicastAddress destination);
00080 
00081     int getMyDuplexGroup(int frameNr, bool isDL);
00082     int getPeerDuplexGroup(wns::service::dll::UnicastAddress user);
00083       private:
00084     void
00085     createAssociation_req(wns::service::dll::UnicastAddress destination) const;
00086 
00087     void
00088     createDisassociation_req(wns::service::dll::UnicastAddress target) const;
00089 
00090     double timeout;
00091 
00092     lte::controlplane::AssociationsProxyUT* associationsProxy;
00093 
00094     wns::service::dll::UnicastAddress scheduledRAP;
00095 
00096     void
00097     associate(wns::service::dll::UnicastAddress destination);
00098 
00099     //my own duplexgroup
00100     int duplexGroup;
00101       };
00102     }
00103   }
00104 }
00105 #endif // LTE_CONTROLPLANE_ASSOCIATIONHANDLER_ASSOCIATIONHANDLERUT_HPP

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