//Editor-Info: -*- C++ -*-
//
//Subject: TOVE project / bisup
//
//File: bisuppducoders.cpp
//
//Version: $Revision: 1.19 $
//
//State: $State: Exp $
//
//Date: $Date: 1999/03/08 07:42:31 $
//
//Organisation:
//      Helsinki University of Technology
//      Laboratory of Telecommunications Software and Multimedia
//
//Author:
//      Timo Kokkonen
//      Sami Raatikainen
//
//Description:
//      See corresponding header file.
//      Note add optional ieCoders first (see. pduCoder::addIECoder),
//      we hope that mandatory IEs are in the beginning of the frame.
//      IEs will be encoded to the frame in the order as their coders
//      are added, first added will be at the end of frame.
//
//Copyright:
//      Copyright 1999 Helsinki University of Technology
//      ALL RIGHTS RESERVED BETWEEN JANUARY 1996 AND JUNE 1999.
//
//Licence:
//
//
//History:
//

#include "bisuppducoders.h"
#include "bisupiecoders.h"
#include "ie/iestrings.h"


testCoder :: testCoder(void)
    : bisupPduCoder(B1111_1111),
      _aal(ieAALParametersStr, B0100_0111, 0),
      _calledPartyNumber(ieCalledPartyNumberStr, B0000_0100, 0),
      _cause(ieCauseStr, B0001_0010, 0),
      _connectionIdentifier(ieConnectionIdentifierStr, B0000_0110, 0),
      _DSID(ieDSIDStr, B0000_0011, 0),
      _transitNetworkSelection(ieTransitNetworkSelectionStr, B0010_0011, 0),
      _atmCellRate(ieATMCellRateStr, B0000_1000, 0),
      _BBC(ieBroadbandBearerCapabilityStr, B0101_0000, 0)
{
    addIECoder(&_aal);
    addIECoder(&_calledPartyNumber);
    addIECoder(&_cause);
    addIECoder(&_connectionIdentifier);
    addIECoder(&_DSID);
    addIECoder(&_transitNetworkSelection);
    addIECoder(&_atmCellRate);
    addIECoder(&_BBC);
    return;
}

testCoder :: ~testCoder(void)
{
    return;
}


//
//Class: bisupIAMcoder
//
//Description:
//      Bisup initial address pdu's specific methods.
//

bisupIAMCoder :: bisupIAMCoder(void)
    : bisupPduCoder(B0000_0001),
      _calledPartyNumber(ieCalledPartyNumberStr, B0000_0100, 0),
      _connectionIdentifier(ieConnectionIdentifierStr, B0000_0110, 0),
      _OSID(ieOSIDStr, B0000_0010, 0),
      _DSID(ieDSIDStr, B0000_0011, 0),
      _transitNetworkSelection(ieTransitNetworkSelectionStr, B0010_0011, 0),
      _atmCellRate(ieATMCellRateStr, B0000_1000, 1),
      _BBC(ieBroadbandBearerCapabilityStr, B0101_0000, 0)
{
    addIECoder(&_connectionIdentifier);
    addIECoder(&_OSID);
    addIECoder(&_DSID);
    addIECoder(&_transitNetworkSelection);
    addIECoder(&_atmCellRate);
    addIECoder(&_calledPartyNumber);
    addIECoder(&_BBC);
    return;
}

bisupIAMCoder :: ~bisupIAMCoder(void)
{
    return;
}

//----------------------------------------------------------------------
//
//Class: bisupIAACoder
//
//Description:
//      Bisup initial address acknowledgement pdu's specific methods.
//

bisupIAACoder :: bisupIAACoder(void)
    : bisupPduCoder(B0000_1010),
      _connectionIdentifier(ieConnectionIdentifierStr, B0000_0110, 0),
      _DSID(ieDSIDStr, B0000_0011, 0)
{
    addIECoder(&_connectionIdentifier);
    addIECoder(&_DSID);
    return;
}

bisupIAACoder :: ~bisupIAACoder(void)
{
    return;
}

//----------------------------------------------------------------------
//
//Class: bisupIARCoder
//
//Description:
//      Bisup initial address reject pdu's specific methods.
//

bisupIARCoder :: bisupIARCoder(void)
    : bisupPduCoder(B0000_1011),
      _cause(ieCauseStr, B0001_0010, 0),
      _OSID(ieOSIDStr, B0000_0010, 0),
      _DSID(ieDSIDStr, B0000_0011, 0)
{
    addIECoder(&_OSID);
    addIECoder(&_DSID);
    addIECoder(&_cause);
    return;
}

bisupIARCoder :: ~bisupIARCoder(void)
{
    return;
}

//----------------------------------------------------------------------
//
//Class: bisupANMCoder
//
//Description:
//      Bisup answer pdu's specific methods.
//

bisupANMCoder :: bisupANMCoder(void)
    : bisupPduCoder(B0000_1001),
      _DSID(ieDSIDStr, B0000_0011, 0)
{
    addIECoder(&_DSID);
    return;
}

bisupANMCoder :: ~bisupANMCoder(void)
{
    return;
}

//----------------------------------------------------------------------
//
//Class: bisupACMCoder
//
//Description:
//      Address Complete Message.
//

bisupACMCoder :: bisupACMCoder(void)
    : bisupPduCoder(B0000_0110)
{
    return;
}

bisupACMCoder :: ~bisupACMCoder(void)
{
    return;
}


//----------------------------------------------------------------------
//
//Class: bisupCPGCoder
//
//Description:
//      Call Progress Message
//

bisupCPGCoder :: bisupCPGCoder(void)
    : bisupPduCoder(B0010_1100)
{
    return;
}

bisupCPGCoder :: ~bisupCPGCoder(void)
{
    return;
}


//----------------------------------------------------------------------
//
//Class: bisupRELCoder
//
//Description:
//      Bisup release pdu's specific methods.
//

bisupRELCoder :: bisupRELCoder(void)
    : bisupPduCoder(B0000_1100),
      _cause(ieCauseStr, B0001_0010, 0),
      _DSID(ieDSIDStr, B0000_0011, 0)
{
    addIECoder(&_cause);
    addIECoder(&_DSID);
    return;
}

bisupRELCoder :: ~bisupRELCoder(void)
{
    return;
}

//----------------------------------------------------------------------
//
//Class: bisupRLCCoder
//
//Description:
//      Bisup release complete pdu's specific methods.
//

bisupRLCCoder :: bisupRLCCoder(void)
    : bisupPduCoder(B0001_0000),
      _cause(ieCauseStr, B0001_0010, 0),
      _DSID(ieDSIDStr, B0000_0011, 0)
{
    addIECoder(&_cause);
    addIECoder(&_DSID);
    return;
}

bisupRLCCoder :: ~bisupRLCCoder(void)
{
    return;
}


