INET Framework for OMNeT++/OMNEST
MassMobility.h
Go to the documentation of this file.
00001 //
00002 // Author: Emin Ilker Cetinbas (niw3_at_yahoo_d0t_com)
00003 // Generalization: Andras Varga
00004 // Copyright (C) 2005 Emin Ilker Cetinbas, Andras Varga
00005 //
00006 // This program is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU General Public License
00008 // as published by the Free Software Foundation; either version 2
00009 // of the License, or (at your option) any later version.
00010 //
00011 // This program is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 // GNU General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU General Public License
00017 // along with this program; if not, see <http://www.gnu.org/licenses/>.
00018 //
00019 
00020 
00021 #ifndef MASS_MOBILITY_H
00022 #define MASS_MOBILITY_H
00023 
00024 #include <omnetpp.h>
00025 
00026 #include "BasicMobility.h"
00027 
00028 
00036 class INET_API MassMobility : public BasicMobility
00037 {
00038   protected:
00039     // config (see NED file for explanation)
00040     cPar *changeInterval;
00041     cPar *changeAngleBy;
00042     cPar *speed;
00043 
00044     // current state
00045     double currentSpeed;   
00046     double currentAngle;   
00047     double updateInterval; 
00048     Coord step;            
00049 
00050   protected:
00052     virtual void initialize(int);
00053 
00054    protected:
00056     virtual void handleSelfMsg(cMessage *msg);
00057 
00059     virtual void move();
00060 };
00061 
00062 #endif