module TestCodec_Multiport {
    
  // LibCommon
  import from LibCommon_BasicTypesAndValues all;
  import from LibCommon_DataStrings all;
  import from LibCommon_Time all;
  import from LibCommon_VerdictControl all;
  import from LibCommon_Sync all;
  
  // LibIts
  import from ITS_Container language "ASN.1:1997" all;
  import from CAM_PDU_Descriptions language "ASN.1:1997"all;
  import from DENM_PDU_Descriptions language "ASN.1:1997" all;
    
  // LibItsCommon
  import from LibItsCommon_TypesAndValues all;
  import from LibItsCommon_TestSystem all;
  import from LibItsCommon_Functions all;
    
  // LibItsExternal
  import from LibItsExternal_TypesAndValues all;
    
  // LibItsCam
  import from LibItsCam_TypesAndValues all;
  import from LibItsCam_TestSystem all;
  import from LibItsCam_EncdecDeclarations all;
     
  // LibItsDenm
  import from LibItsDenm_TypesAndValues all;
  import from LibItsDenm_TestSystem all;
  import from LibItsDenm_EncdecDeclarations all;
    
  // LibItsGeoNetworking
  import from LibItsGeoNetworking_TypesAndValues all;
  import from LibItsGeoNetworking_TestSystem all;
  import from LibItsGeoNetworking_EncdecDeclarations all;
    
  // TestCodec
  //import from TestCodec_TestAndSystem all;

  type component ItsMultiplePorts extends ItsBaseComponent {
    //port UpperTesterPort utPort;
      
    port GeoNetworkingPort geoNetworkingPort;
    port CamPort camPort;
    port DenmPort denmPort;
      
    //component variables
    var CamInd vc_camMsg;
    var DenmInd vc_denmMsg;
    var GeoNetworkingInd vc_gnMsg;
    
    //default
    var default vc_default := null;
    
    //global variables
    var boolean vc_camReceived := false;
    
    var UtCamEventIndList vc_utEvents := {};
    
    var boolean vc_utDefaultActive := true;
    var boolean vc_camDefaultActive := true;
    var boolean vc_denmDefaultActive := true;
    var boolean vc_geoNetworkingDefaultActive := true;
    
  } // End of component ItsMultiplePorts
  
  type component ItsMultiplePortsSystem {
    //port UpperTesterPort utPort;
      
    port GeoNetworkingPort geoNetworkingPort;
    port CamPort camPort;
    port DenmPort denmPort;
  } // End of component ItsMultiplePortsSystem
  
  group LibItsGeoNetworking_testCases {
        
    group testMultiPort {
            
      /**
       * @desc validate GeoNetworkingReq/Broadcast
       * @verdict Pass on success, Fail otherwise
       */
      testcase tc_multiPort() runs on ItsMultiplePorts system ItsMultiplePortsSystem { 
                
        tc_ac.start;
        alt {
          [] geoNetworkingPort.receive(?) -> value vc_gnMsg {
            log("Receive GN message");
            repeat;
          }
          [] camPort.receive(?) -> value vc_camMsg {
            log("Receive CAM message");
            repeat;
          }
          [] denmPort.receive(?) -> value vc_denmMsg {
            log("Receive DENM message");
            repeat;
          }
          [] tc_ac.timeout {
            setverdict(inconc, "Expected message not received");
          }
        } // End of 'alt' statement
	
      } // End of function tc_multiPort
        
    } // End of group testMultiPort 
        
  } // End of group LibItsGeoNetworking_testCases
    
} // End of module TestCodec_Multiport
