/******************************************************************************/
// @copyright   Copyright Notification
//   No part may be reproduced except as authorized by written permission.
//   The copyright and the foregoing restriction extend to reproduction in all media.
//   Trademark 2010, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC).
//   All rights reserved.
// @version: IWD_10wk37
// $Date: 2010-06-02 12:46:27 +0200 (Wed, 02 Jun 2010) $
// $Rev: 3219 $
/******************************************************************************/

module IP_PTC_Component {
  import from CommonDefs all;
  import from IP_ASP_TypeDefs all;
  import from IP_PTC_CtrlMsgs all;

  type record IP_Applications_Type {
    IP_Connection_Type         DHCP_Server,
    IP_Connection_Type         ICMPv6_Server,
    IP_Connection_Type         DNS_UdpServer,
    IP_Connection_Type         DNS_TcpServer
  };

  type component IP_PTC {
    var IP_RoutingTable_Type    vc_IP_PTC_DRB_RoutingTable;
    var IP_Applications_Type    vc_IP_PTC_Applications;

    port IP_PTC_CTRL_PORT       EUTRA_CTRL;
    port IP_PTC_CTRL_PORT       UTRAN_CTRL;
    port IP_PTC_CTRL_PORT       GERAN_CTRL;
    port IP_CONTROL_PORT        IP_CTRL;
    port IP_SOCKET_PORT         IP_SOCK;
  };

  //****************************************************************************
  // IP PTC: Error Handling
  //----------------------------------------------------------------------------

  function f_IP_PTC_Error(charstring p_FileName,
                          LineNo_Type p_LineNo,
                          charstring p_Msg)
  {
    var boolean v_TerminateOnError := true;

    if (v_TerminateOnError) {
      f_SetVerdict(inconc, p_FileName, p_LineNo, p_Msg);
      self.kill;
    } else {
      f_ErrorLog(p_FileName, p_LineNo, p_Msg);
    }
  };

}
