//Editor-Info: -*- C++ -*-
//
//Subject: TOVE project
//
//File: dss1bearercapability.cpp
//
//Version: $Revision: 1.1 $
//
//State: $State: Exp $
//
//Date: $Date: 1999/03/08 06:49:52 $
//
//Organisation:
//      Helsinki University of Technology
//      Laboratory of Telecommunications Software and Multimedia
//
//Author:
//      Teemu Tynjälä
//
//Description:
//      This file provides the implementation of the DSS1 bearer
//      capability information element.  Bearer capability information
//      element is necessary for the identification of the type of
//      connection the user is asking.
//
//Copyright:
//      Copyright 1999 Helsinki University of Technology
//      ALL RIGHTS RESERVED BETWEEN JANUARY 1996 AND JUNE 1999.
//
//Licence:
//
//
//History: 

#include "dss1bearercapability.h"

//--------------------------------------------------------------------------

ieDss1BearerCapability :: ieDss1BearerCapability(
                          pfByte infoTransferCapability_,
                          pfByte transferMode_,
                          pfByte infoTransferRate_)
  : _infoTransferCapability(infoTransferCapability_),
    _transferMode(transferMode_),
    _infoTransferRate(infoTransferRate_)
{
  return;
}

ieDss1BearerCapability :: ieDss1BearerCapability(
                        const ieDss1BearerCapability &other_)
{
  _infoTransferCapability = other_._infoTransferCapability;
  _transferMode = other_._transferMode;
  _infoTransferRate = other_._infoTransferRate;
  _rateMultiplier = other_._rateMultiplier;
  _userInfoLayer1Protocol = other_._userInfoLayer1Protocol;
  _synchOrAsynch = other_._synchOrAsynch;
  _inBandNegotiation = other_._inBandNegotiation;
  _userRate = other_._userRate;
  _intermediateRate = other_._intermediateRate;
  _NIConTx = other_._NIConTx;
  _flowControlOnTx = other_._flowControlOnTx;
  _flowControlOnRx = other_._flowControlOnRx;
  _rateAdaptationHeaderOrNot = other_._rateAdaptationHeaderOrNot;
  _multiFrameSupport = other_._multiFrameSupport;
  _modeOfOperation = other_._modeOfOperation;
  _LLInegotiation = other_._LLInegotiation;
  _inBandOutBandNegotiation = other_._inBandOutBandNegotiation;
  _numberOfStopBits = other_._numberOfStopBits;
  _numberOfDataBits = other_._numberOfDataBits;
  _parityInfo = other_._parityInfo;
  _duplexMode = other_._duplexMode;
  _modemType = other_._modemType;
  _userInfoLayer2Protocol = other_._userInfoLayer2Protocol;
  _userInfoLayer3Protocol = other_._userInfoLayer3Protocol;
  return;
}

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

//----------------------------------------------------------------------------

const ieDss1BearerCapability &ieDss1BearerCapability :: operator=(
                                 const ieDss1BearerCapability &other_)
{
  if (&other_ != this)
  {
    _infoTransferCapability = other_._infoTransferCapability;
    _transferMode = other_._transferMode;
    _infoTransferRate = other_._infoTransferRate;
    _rateMultiplier = other_._rateMultiplier;
    _userInfoLayer1Protocol = other_._userInfoLayer1Protocol;
    _synchOrAsynch = other_._synchOrAsynch;
    _inBandNegotiation = other_._inBandNegotiation;
    _userRate = other_._userRate;
    _intermediateRate = other_._intermediateRate;
    _NIConTx = other_._NIConTx;
    _flowControlOnTx = other_._flowControlOnTx;
    _flowControlOnRx = other_._flowControlOnRx;
    _rateAdaptationHeaderOrNot = other_._rateAdaptationHeaderOrNot;
    _multiFrameSupport = other_._multiFrameSupport;
    _modeOfOperation = other_._modeOfOperation;
    _LLInegotiation = other_._LLInegotiation;
    _inBandOutBandNegotiation = other_._inBandOutBandNegotiation;
    _numberOfStopBits = other_._numberOfStopBits;
    _numberOfDataBits = other_._numberOfDataBits;
    _parityInfo = other_._parityInfo;
    _duplexMode = other_._duplexMode;
    _modemType = other_._modemType;
    _userInfoLayer2Protocol = other_._userInfoLayer2Protocol;
    _userInfoLayer3Protocol = other_._userInfoLayer3Protocol;
  }
  return *this;
}

pfIE* ieDss1BearerCapability :: clone(void) const
{
  ieDss1BearerCapability *newIe = new ieDss1BearerCapability(*this);
  return (pfIE *)newIe;
}


ieDss1BearerCapability *ieDss1BearerCapability :: narrow(pfIE *ie_)
{
  ieDss1BearerCapability* result =
               dynamic_cast<ieDss1BearerCapability*>(ie_);
  THROW_IF_DYNAMIC_CAST_FAILED(result);
  return result;
}


//--------------------------------------------------------------------------

void ieDss1BearerCapability :: setInfoTransferCapability(pfByte value_)
{
  _infoTransferCapability = value_;
  return;
}

pfByte ieDss1BearerCapability :: getInfoTransferCapability(void) const
{
  return _infoTransferCapability;
}

void ieDss1BearerCapability :: setTransferMode(pfByte value_)
{
  _transferMode = value_;
  return;
}

pfByte ieDss1BearerCapability :: getTransferMode(void) const
{
  return _transferMode;
}

void ieDss1BearerCapability :: setInfoTransferRate(pfByte value_)
{
  _infoTransferRate = value_;
  return;
}

pfByte ieDss1BearerCapability :: getInfoTransferRate(void) const
{
  return _infoTransferRate;
}

void ieDss1BearerCapability :: setRateMultiplier(pfByte value_)
{
  _rateMultiplier = value_;
  return;
}

pfByte ieDss1BearerCapability :: getRateMultiplier(void) const
{
  return _rateMultiplier;
}

void ieDss1BearerCapability :: setUserInfoLayer1Protocol(pfByte value_)
{
  _userInfoLayer1Protocol = value_;
  return;
}

pfByte ieDss1BearerCapability :: getUserInfoLayer1Protocol(void) const
{
  return _userInfoLayer1Protocol;
}

void ieDss1BearerCapability :: setSynchOrAsynch(pfByte value_)
{
  _synchOrAsynch = value_;
  return;
}

pfByte ieDss1BearerCapability :: getSynchOrAsynch(void) const
{
  return _synchOrAsynch;
}

void ieDss1BearerCapability :: setInBandNegotiation(pfByte value_)
{
  _inBandNegotiation = value_;
  return;
}

pfByte ieDss1BearerCapability :: getInBandNegotiation(void) const
{
  return _inBandNegotiation;
}

void ieDss1BearerCapability :: setUserRate(pfByte value_)
{
  _userRate = value_;
  return;
}

pfByte ieDss1BearerCapability :: getUserRate(void) const
{
  return _userRate;
}

void ieDss1BearerCapability :: setIntermediateRate(pfByte value_)
{
  _intermediateRate = value_;
  return;
}

pfByte ieDss1BearerCapability :: getIntermediateRate(void) const
{
  return _intermediateRate;
}

void ieDss1BearerCapability :: setNIConTx(pfByte value_)
{
  _NIConTx = value_;
  return;
}

pfByte ieDss1BearerCapability :: getNIConTx(void) const
{
  return _NIConTx;
}

void ieDss1BearerCapability :: setNIConRx(pfByte value_)
{
  _NIConRx = value_;
  return;
}

pfByte ieDss1BearerCapability :: getNIConRx(void) const
{
  return _NIConRx;
}

void ieDss1BearerCapability :: setFlowControlOnTx(pfByte value_)
{
  _flowControlOnTx = value_;
  return;
}

pfByte ieDss1BearerCapability :: getFlowControlOnTx(void) const
{
  return _flowControlOnTx;
}

void ieDss1BearerCapability :: setFlowControlOnRx(pfByte value_)
{
  _flowControlOnRx = value_;
  return;
}

pfByte ieDss1BearerCapability :: getFlowControlOnRx(void) const
{
  return _flowControlOnRx;
}

void ieDss1BearerCapability :: setRateAdaptationHeaderOrNot(pfByte value_)
{
  _rateAdaptationHeaderOrNot = value_;
  return;
}

pfByte ieDss1BearerCapability :: getRateAdaptationHeaderOrNot(void) const
{
  return _rateAdaptationHeaderOrNot;
}

void ieDss1BearerCapability :: setMultiFrameSupport(pfByte value_)
{
  _multiFrameSupport = value_;
  return;
}

pfByte ieDss1BearerCapability :: getMultiFrameSupport(void) const
{
  return _multiFrameSupport;
}

void ieDss1BearerCapability :: setModeOfOperation(pfByte value_)
{
  _modeOfOperation = value_;
  return;
}

pfByte ieDss1BearerCapability :: getModeOfOperation(void) const
{
  return _modeOfOperation;
}

void ieDss1BearerCapability :: setLLInegotiation(pfByte value_)
{
  _LLInegotiation = value_;
  return;
}

pfByte ieDss1BearerCapability :: getLLInegotiation(void) const
{
  return _LLInegotiation;
}

void ieDss1BearerCapability :: setInBandOutBandNegotiation(pfByte value_)
{
  _inBandOutBandNegotiation = value_;
  return;
}

pfByte ieDss1BearerCapability :: getInBandOutBandNegotiation(void) const
{
  return _inBandOutBandNegotiation;
}

void ieDss1BearerCapability :: setNumberOfStopBits(pfByte value_)
{
  _numberOfStopBits = value_;
  return;
}

pfByte ieDss1BearerCapability :: getNumberOfStopBits(void) const
{
  return _numberOfStopBits;
}

void ieDss1BearerCapability :: setNumberOfDataBits(pfByte value_)
{
  _numberOfDataBits = value_;
  return;
}

pfByte ieDss1BearerCapability :: getNumberOfDataBits(void) const
{
  return _numberOfDataBits;
}

void ieDss1BearerCapability :: setParityInfo(pfByte value_)
{
  _parityInfo = value_;
  return;
}

pfByte ieDss1BearerCapability :: getParityInfo(void) const
{
  return _parityInfo;
}

void ieDss1BearerCapability :: setDuplexMode(pfByte value_)
{
  _duplexMode = value_;
  return;
}

pfByte ieDss1BearerCapability :: getDuplexMode(void) const
{
  return _duplexMode;
}

void ieDss1BearerCapability :: setModemType(pfByte value_)
{
  _modemType = value_;
  return;
}

pfByte ieDss1BearerCapability :: getModemType(void) const
{
  return _modemType;
}

void ieDss1BearerCapability :: setUserInfoLayer2Protocol(pfByte value_)
{
  _userInfoLayer2Protocol = value_;
  return;
}

pfByte ieDss1BearerCapability :: getUserInfoLayer2Protocol(void) const
{
  return _userInfoLayer2Protocol;
}

void ieDss1BearerCapability :: setUserInfoLayer3Protocol(pfByte value_)
{
  _userInfoLayer3Protocol = value_;
  return;
}

pfByte ieDss1BearerCapability :: getUserInfoLayer3Protocol(void) const
{
  return _userInfoLayer3Protocol;
}

//----------------------------------------------------------------------------
