//Editor-Info: -*- C++ -*-
//
//Subject: TOVE project
//
//File: channelidentification.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 contains the implementation of the Channel Identification
//      Information Element.  It identifies by a number or channel map the
//      channel controlled by DSS1 signalling.  See also the 
//      channelidentification.h header file.
//
//Copyright:
//      Copyright 1999 Helsinki University of Technology
//      ALL RIGHTS RESERVED BETWEEN JANUARY 1996 AND JUNE 1999.
//
//Licence:
//
//
//History: 

#include "channelidentification.h"

ieChannelIdentification :: ieChannelIdentification(
                             pfByte ifaceIdPresent_,
                             pfByte ifaceType_,
                             pfByte preferredOrExclusive_,
                             pfByte DchannelInd_,
                             pfByte infoChannelSelection_)
  : _ifaceIdPresent(ifaceIdPresent_),
    _ifaceType(ifaceType_),
    _preferredOrExclusive(preferredOrExclusive_),
    _DchannelInd(DchannelInd_),
    _infoChannelSelection(infoChannelSelection_)
{
  return;
}

ieChannelIdentification :: ieChannelIdentification(
                          const ieChannelIdentification &other_)
{
  _ifaceIdPresent = other_._ifaceIdPresent;
  _ifaceType = other_._ifaceType;
  _preferredOrExclusive = other_._preferredOrExclusive;
  _DchannelInd = other_._DchannelInd;
  _infoChannelSelection = other_._infoChannelSelection;
  _ifaceIdentifier = other_._ifaceIdentifier;
  _numberOrMap = other_._numberOrMap;
  _channelOrMapElementType = other_._channelOrMapElementType;
  _map = other_._map;
  return;
}

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

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

const ieChannelIdentification& ieChannelIdentification :: operator=(
                                const ieChannelIdentification &other_)
{
  if (&other_ != this)
  {
    _ifaceIdPresent = other_._ifaceIdPresent;
    _ifaceType = other_._ifaceType;
    _preferredOrExclusive = other_._preferredOrExclusive;
    _DchannelInd = other_._DchannelInd;
    _infoChannelSelection = other_._infoChannelSelection;
    _ifaceIdentifier = other_._ifaceIdentifier;
    _numberOrMap = other_._numberOrMap;
    _channelOrMapElementType = other_._channelOrMapElementType;
    _map = other_._map;
  }
  return *this;
}

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

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

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

void ieChannelIdentification :: setIfaceIdPresent(pfByte value_)
{
  _ifaceIdPresent = value_;
  return;
}

pfByte ieChannelIdentification :: getIfaceIdPresent(void) const
{
  return _ifaceIdPresent;
}

void ieChannelIdentification :: setIfaceType(pfByte value_)
{
  _ifaceType = value_;
  return;
}

pfByte ieChannelIdentification :: getIfaceType(void) const
{
  return _ifaceType;
}

void ieChannelIdentification :: setPreferredOrExclusive(pfByte value_)
{
  _preferredOrExclusive = value_;
  return;
}

pfByte ieChannelIdentification :: getPreferredOrExclusive(void) const
{
  return _preferredOrExclusive;
}

void ieChannelIdentification :: setDchannelInd(pfByte value_)
{
  _DchannelInd = value_;
  return;
}

pfByte ieChannelIdentification :: getDchannelInd(void) const
{
  return _DchannelInd;
}

void ieChannelIdentification :: setInfoChannelSelection(pfByte value_)
{
  _infoChannelSelection = value_;
  return;
}

pfByte ieChannelIdentification :: getInfoChannelSelection(void) const
{
  return _infoChannelSelection;
}

void ieChannelIdentification :: setIfaceIdentifier(pfUlong value_)
{
  _ifaceIdentifier = value_;
  return;
}

pfUlong ieChannelIdentification :: getIfaceIdentifier(void) const
{
  return _ifaceIdentifier;
}

void ieChannelIdentification :: setNumberOrMap(pfByte value_)
{
  _numberOrMap = value_;
  return;
}

pfByte ieChannelIdentification :: getNumberOrMap(void) const
{
  return _numberOrMap;
}

void ieChannelIdentification :: setChannelOrMapElementType(pfByte value_)
{
  _channelOrMapElementType = value_;
  return;
}

pfByte ieChannelIdentification :: getChannelOrMapElementType(void) const
{
  return _channelOrMapElementType;
}

void ieChannelIdentification :: setMap(pfUlong value_)
{
  _map = value_;
  return;
}

pfUlong ieChannelIdentification :: getMap(void) const
{
  return _map;
}

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

