/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2009, 2010 MIRKO BANCHI * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Authors: Mirko Banchi * Tommaso Pecorella */ #include "originator-block-ack-agreement.h" namespace ns3 { OriginatorBlockAckAgreement::OriginatorBlockAckAgreement () : BlockAckAgreement (), m_state (PENDING), m_sentMpdus (0), m_needBlockAckReq (false) { } OriginatorBlockAckAgreement::OriginatorBlockAckAgreement (Mac48Address recipient, uint8_t tid) : BlockAckAgreement (recipient, tid), m_state (PENDING), m_sentMpdus (0), m_needBlockAckReq (false) { } OriginatorBlockAckAgreement::~OriginatorBlockAckAgreement () { //NS_LOG_FUNCTION (this); //std::cout<<"destructor for OriginatorBlockAckAgreement is called, destroy event is canceled, destroy agreement with="<= min || m_sentMpdus == m_bufferSize) { m_needBlockAckReq = true; } } bool OriginatorBlockAckAgreement::IsBlockAckRequestNeeded (void) const { return m_needBlockAckReq; } void OriginatorBlockAckAgreement::CompleteExchange (void) { m_needBlockAckReq = false; m_sentMpdus = 0; } } //namespace ns3