Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __INET_PPP_H
00019 #define __INET_PPP_H
00020
00021
00022 #include <omnetpp.h>
00023 #include "INETDefs.h"
00024 #include "PPPFrame_m.h"
00025 #include "TxNotifDetails.h"
00026 #include "INotifiable.h"
00027
00028 class InterfaceEntry;
00029 class IPassiveQueue;
00030 class NotificationBoard;
00031
00035 class INET_API PPP : public cSimpleModule, public INotifiable
00036 {
00037 protected:
00038 long txQueueLimit;
00039 cGate *physOutGate;
00040 cChannel *datarateChannel;
00041
00042 cQueue txQueue;
00043 cMessage *endTransmissionEvent;
00044 IPassiveQueue *queueModule;
00045
00046 InterfaceEntry *interfaceEntry;
00047
00048 NotificationBoard *nb;
00049 TxNotifDetails notifDetails;
00050 bool hasSubscribers;
00051
00052 std::string oldConnColor;
00053
00054
00055 long numSent;
00056 long numRcvdOK;
00057 long numBitErr;
00058 long numDroppedIfaceDown;
00059
00060 protected:
00061 virtual InterfaceEntry *registerInterface(double datarate);
00062 virtual void startTransmitting(cPacket *msg);
00063 virtual PPPFrame *encapsulate(cPacket *msg);
00064 virtual cPacket *decapsulate(PPPFrame *pppFrame);
00065 virtual void displayBusy();
00066 virtual void displayIdle();
00067 virtual void updateDisplayString();
00068 virtual void updateHasSubcribers();
00069 virtual void receiveChangeNotification(int category, const cPolymorphic *details);
00070
00071 public:
00072 PPP();
00073 virtual ~PPP();
00074
00075 protected:
00076 virtual int numInitStages() const {return 4;}
00077 virtual void initialize(int stage);
00078 virtual void handleMessage(cMessage *msg);
00079 };
00080
00081 #endif
00082
00083