next up previous contents index
Next: 13.4 MacClassifier Class Up: 13.3 Channel Class Previous: 13.3.2 Example: Channel and

   
13.3.3 Channel Class in C++

In C++, the class Channel extends the Connector object with several new methods to support a variety of MAC protocols. The class is defined as follow in channel.h:

   class Channel : public Connector {
   public:
        Channel();
        void recv(Packet* p, Handler*);
        virtual int send(Packet* p, double txtime);
        virtual void contention(Packet*, Handler*);
        int hold(double txtime);
        virtual int collision() { return numtx_ \> 1; }
        virtual double txstop() { return txstop_; }
                . . .
   };

The important methods of the class Channel are:


next up previous contents index
Next: 13.4 MacClassifier Class Up: 13.3 Channel Class Previous: 13.3.2 Example: Channel and

2000-08-24