A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
uan-mac.h
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2009 University of Washington
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: Leonard Tracy <lentracy@gmail.com>
19  */
20 
21 #ifndef UAN_MAC_H
22 #define UAN_MAC_H
23 
24 #include "ns3/address.h"
25 #include "ns3/object.h"
26 #include "ns3/packet.h"
27 
28 #include "ns3/address.h"
29 #include "ns3/nstime.h"
30 #include "ns3/ptr.h"
31 
32 namespace ns3 {
33 
34 class UanPhy;
35 class UanChannel;
36 class UanNetDevice;
37 class UanTransducer;
38 class UanAddress;
39 
40 
41 
47 class UanMac : public Object
48 {
49 public:
50  static TypeId GetTypeId (void);
51 
55  virtual Address GetAddress (void) = 0;
56 
60  virtual void SetAddress (UanAddress addr) = 0;
61 
68  virtual bool Enqueue (Ptr<Packet> pkt, const Address &dest, uint16_t protocolNumber) = 0;
72  virtual void SetForwardUpCb (Callback<void, Ptr<Packet>, const UanAddress&> cb) = 0;
73 
82  virtual void AttachPhy (Ptr<UanPhy> phy) = 0;
83 
87  virtual Address GetBroadcast (void) const = 0;
88 
92  virtual void Clear (void) = 0;
93 
102  virtual int64_t AssignStreams (int64_t stream) = 0;
103 
104 };
105 
106 }
107 
108 #endif /* UAN_MAC_H */
virtual bool Enqueue(Ptr< Packet > pkt, const Address &dest, uint16_t protocolNumber)=0
Callback template class.
Definition: callback.h:369
virtual int64_t AssignStreams(int64_t stream)=0
a polymophic address class
Definition: address.h:86
Virtual base class for all UAN MAC protocols.
Definition: uan-mac.h:47
virtual Address GetAddress(void)=0
virtual Address GetBroadcast(void) const =0
virtual void SetAddress(UanAddress addr)=0
virtual void SetForwardUpCb(Callback< void, Ptr< Packet >, const UanAddress & > cb)=0
virtual void Clear(void)=0
a base class which provides memory management and object aggregation
Definition: object.h:63
virtual void AttachPhy(Ptr< UanPhy > phy)=0
a unique identifier for an interface.
Definition: type-id.h:44