Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | Related Pages

NicControlType.h

00001 /* -*- mode:c++ -*- ********************************************************
00002  * file:        NicControlType.h
00003  *
00004  * author:      Andreas Koepke
00005  *
00006  * copyright:   (C) 2006 Telecommunication Networks Group (TKN) at
00007  *              Technische Universitaet Berlin, Germany.
00008  *
00009  *              This program is free software; you can redistribute it
00010  *              and/or modify it under the terms of the GNU General Public
00011  *              License as published by the Free Software Foundation; either
00012  *              version 2 of the License, or (at your option) any later
00013  *              version.
00014  *              For further information see file COPYING
00015  *              in the top level directory
00016  ***************************************************************************
00017  * part of:     framework implementation developed by tkn
00018  **************************************************************************/
00019 
00020 #ifndef NICCONTROLTYPE_H
00021 #define NICCONTROLTYPE_H
00022 
00023 #include <omnetpp.h>
00024 
00036 class NicControlType : public cPolymorphic
00037 {    
00038  public:
00039     enum Types {
00040         NOTHING, // we don't want to start at zero -- its is ambiguous
00041         TRANSMISSION_OVER,
00042         PACKET_DROPPED
00043     };
00044     
00045 
00052     NicControlType(Types t=NOTHING) : cPolymorphic(), type(t) {
00053         ;
00054     };
00055     
00056     int getType() const  {
00057         return type;
00058     }
00059     
00060     void setType(Types t) {
00061         type = t;
00062     }
00063     
00064     std::string info() const {
00065         std::ostringstream ost;
00066         if(type == NOTHING) {
00067             ost<<"NOTHING";
00068         }
00069         else if(type == TRANSMISSION_OVER) {
00070             ost<<"TRANSMISSION_OVER";
00071         }
00072         else {
00073             ost<<"UNKNOWN TYPE";
00074         }
00075         return ost.str();
00076     }
00077     /* @} */
00078 
00079 protected:
00080     Types type;
00081 
00082 };
00083 
00084 #endif

Generated on Fri Jan 12 08:29:32 2007 for Mobility Framework by  doxygen 1.4.4