Commit 1bd81acd authored by fischerjo's avatar fischerjo
Browse files

Continued editing

parent 40126845
Loading
Loading
Loading
Loading
+58
Changes for ttcn/CALM/ATSP/LibItsAtsp_Functions.ttcn3: 58 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -5,4 +5,62 @@
 *  @desc       Access Technology Layer (ISO 21218) functions
 */
module LibItsAtsp_Functions {
	
    import from CALMllsap language "ASN.1:1997" {
        type 
//            INsapPrimitivesDown, INsapPrimitivesUp, 
//            IN_UNITDATA_request, IN_UNITDATA_indication, IN_UNITDATA_STATUS_indication,
//			UserPriority,
//			LLserviceAddr, INdata, IN_SAPaddress, EUI64, 
			Link_ID, MedType
//			AccessParameters,
//		    NullType
    };
	
	
        /**
         * @desc Wait for RegReq (ref = 1) from IUT 
         * @param   p_linkID    Link-ID used by IUT
         * @param   p_medType   MedType of IUT
         */
		function f_cnAwaitRegistrationCI( 
            in template Link_ID p_linkID,	// PIXIT Element
            in template MedType p_medType, 	// PIXIT Element
            in boolean p_discard 			// set to TRUE
        ) runs on ItsCalm {
//            var CfEventInd p_result;
            
            log("*** f_cfAwaitNotificationToManagement: INFO: Expected MI-Request.request: ", p_cfEventInd, " ***");
            tc_wait.start;
            alt {
                [] cfPort.receive(p_cfEventInd) {
                    tc_wait.stop;
                    log("*** f_cnAwaitRegistrationCI: INFO: RegReq received ***"); 
                }
                [] cfPort.receive(CfEventInd : { cfFntpEventInd := ? } ) -> value p_result { 
                    if (p_discard == false) { 
                        tc_wait.stop;
                        log("*** f_cnAwaitRegistrationCI: ERROR: An unexpected MI-COMMAND was received ***", p_result);
                        f_selfOrClientSyncAndVerdict("error", e_timeout); // to be checked
                    } else { 
                        log("*** f_cnAwaitRegistrationCI: INFO: An unexpected MI-COMMAND was received, repeating check ***");
                        repeat;
                    } 
                }
                [] tc_wait.timeout {
                    if (p_discard == false) { 
                        log("*** f_cnAwaitRegistrationCI: ERROR: Timeout while waiting for event check result ***");
                        f_selfOrClientSyncAndVerdict("error", e_timeout); // to be checked
                    } else { // What is the purpose of this? 
                        log("*** f_cnAwaitRegistrationCI: INFO: Event not indicated at application layer ***");
                    }
                }
            } // End of 'alt' statement
			
			// Reply MI-Command.request "RegCmd"
			
			// Check for reception of Status notification (I-Parameter 12 "CIstatus" set to "registered". 
        
        } // End of function f_cfAwaitNotificationToManagement	
	
} // End of module LibItsAtsp_Functions
+462 −5

File changed.

Preview size limit exceeded, changes collapsed.