![]() |
User Manual, Developers Guide and API Documentation |
![]() |
00001 /****************************************************************************** 00002 * WiFiMac * 00003 * This file is part of openWNS (open Wireless Network Simulator) 00004 * _____________________________________________________________________________ 00005 * 00006 * Copyright (C) 2004-2007 00007 * Chair of Communication Networks (ComNets) 00008 * Kopernikusstr. 16, D-52074 Aachen, Germany 00009 * phone: ++49-241-80-27910, 00010 * fax: ++49-241-80-22242 00011 * email: info@openwns.org 00012 * www: http://www.openwns.org 00013 * _____________________________________________________________________________ 00014 * 00015 * openWNS is free software; you can redistribute it and/or modify it under the 00016 * terms of the GNU Lesser General Public License version 2 as published by the 00017 * Free Software Foundation; 00018 * 00019 * openWNS is distributed in the hope that it will be useful, but WITHOUT ANY 00020 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR 00021 * A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 00022 * details. 00023 * 00024 * You should have received a copy of the GNU Lesser General Public License 00025 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00026 * 00027 ******************************************************************************/ 00028 00029 #ifndef WIFIMAC_DRAFTN_BLOCKACKCOMMAND_HPP 00030 #define WIFIMAC_DRAFTN_BLOCKACKCOMMAND_HPP 00031 00032 #include <WNS/ldk/arq/ARQ.hpp> 00033 #include <set> 00034 00035 namespace wifimac { 00036 namespace draftn { 00037 00038 typedef enum {I, BA, BAREQ} BlockAckFrameType; 00039 00055 class BlockACKCommand: 00056 public wns::ldk::arq::ARQCommand 00057 { 00058 public: 00059 00060 struct {} local; 00061 struct { 00063 BlockAckFrameType type; 00064 00069 SequenceNumber sn; 00070 00074 std::set<SequenceNumber> ackSNs; 00075 } peer; 00076 struct {} magic; 00077 00078 BlockACKCommand() 00079 { 00080 peer.type = I; 00081 peer.sn = 0; 00082 peer.ackSNs.clear(); 00083 } 00084 00085 virtual bool 00086 isACK() const 00087 { 00088 return peer.type == BA; 00089 } 00090 00091 virtual bool 00092 isACKreq() const 00093 { 00094 return peer.type == BAREQ; 00095 } 00096 }; 00097 00098 } // draftn 00099 } // wifimac 00100 00101 #endif // WIFIMAC_LOWERMAC_BLOCKACKCOMMAND_HPP
1.5.5