//Editor-Info: -*- C++ -*-
//
//Subject: TOVE project/CC
//
//File: cctdp_abandon.cpp
//
//Version: $Revision: 1.7 $
//
//State: $State: Exp $
//
//Date: $Date: 1998/11/11 14:56:17 $
//
//Organisation:
//      University of Technology
// 
//Author:
//      Pasi Nummisalo
//
//Description:
//      See header.
//
//Copyright:
//      Copyright 1999 Helsinki University of Technology
//      ALL RIGHTS RESERVED BETWEEN JANUARY 1996 AND JUNE 1999.
//      
//Licence:
//     
//
//History:
//

#include "protocol/cc/ccprotocol.h"
#include "cctstate_null.h"
#include "cctdp_abandon.h"

ccTdpAbandon *ccTdpAbandon :: _only = 0;

ccTdpAbandon :: ccTdpAbandon(void)
{
    return;
}

ccTdpAbandon :: ~ccTdpAbandon(void)
{
    _only = 0;
    return;
}

ccTdpAbandon *ccTdpAbandon :: instance(void)
{
    if(_only == 0)
    {
        _only = new ccTdpAbandon();
        assert(_only != 0);
    }
    return _only;
}

toveinap_EventTypeBCSMType ccTdpAbandon :: getInapType(void) const
{
    return toveinap_tAbandon;
}


//
//Function: proceed
//
//Description:
//   This function is called from PIC when it is time
//   to check DP criteria. Function reads the right
//   dp object from protocol and passes it to common
//   process function in base class.
//
//

void ccTdpAbandon :: proceed(ccProtocol *protocol_)
{
#if CC_DEBUG
traceDp(ccCCT,"Abandon");
#endif

    process(protocol_->getDp(getInapType()), protocol_);
    return;
}

void ccTdpAbandon :: toNextState(ccDp &, ccProtocol *protocol_)
{
    exitAction(protocol_, ccTstateNull::instance());
    return;
}












