Commit e652beaa authored by Bostjan Pintar's avatar Bostjan Pintar
Browse files

New TP functions related to TP_IS_TLM

parent 3e7451f4
Loading
Loading
Loading
Loading
+243 −5
Original line number Diff line number Diff line
@@ -92,7 +92,55 @@ module ItsSpatem_TpFunctions {
             */
            function f_IS_TLM_GEN_MSGF_BV_02 () runs on ItsMapemSpatem {
                
                // TODO
                // Local variables
                
                // Test control
                if (not PICS_SPATEM_GENERATION) {
                    log("*** " & testcasename() & ": PICS_SPATEM_GENERATION required for executing the TC ***");
                    setverdict(inconc);
                    stop;
                }
                
                // Test component configuration
                f_cfUp();
                    
                // Preamble
                f_prInitialState();
                f_utTriggerEvent(m_utTriggerEvent(startTLMService));
                // Wait for SPATEM sent
                tc_ac.start(2.0);
                f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
                    
                // Test Body
                tc_ac.start;
                alt {
                    [] mapemSpatemPort.receive(
                        mw_spatemInd(
                            mw_spatemPdu(
                                mw_spatem_intersections(
                                    {mw_IntersectionState(
                                        ?, //IntersectionReferenceID p_id
                                        -, //MsgCount p_revision
                                        -, //IntersectionStatusObject p_status
                                        -  //MovementList p_states
                                    )}
                                )
                            )
                    )) { 
                        tc_ac.stop;
                        log("*** " & testcasename() & ": PASS: Successfully received SAPTEM PDU header. ***");
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
                    }
                    [] tc_ac.timeout {
                        log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***");
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
                    }
                }
                
                // Postamble
                f_utTriggerEvent(m_utTriggerEvent(stopTLMService));
                f_poDefault();
                f_cfDown();
                
            } // End of function f_IS_TLM_GEN_MSGF_BV_02
            
@@ -101,7 +149,55 @@ module ItsSpatem_TpFunctions {
             */
            function f_IS_TLM_GEN_MSGF_BV_03 () runs on ItsMapemSpatem {
                
                // TODO
                // Local variables
                
                // Test control
                if (not PICS_SPATEM_GENERATION) {
                    log("*** " & testcasename() & ": PICS_SPATEM_GENERATION required for executing the TC ***");
                    setverdict(inconc);
                    stop;
                }
                
                // Test component configuration
                f_cfUp();
                    
                // Preamble
                f_prInitialState();
                f_utTriggerEvent(m_utTriggerEvent(startTLMService));
                // Wait for SPATEM sent
                tc_ac.start(2.0);
                f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
                    
                // Test Body
                tc_ac.start;
                alt {
                    [] mapemSpatemPort.receive(
                        mw_spatemInd(
                            mw_spatemPdu(
                                mw_spatem_intersections(
                                    {mw_IntersectionState(
                                        -, //IntersectionReferenceID p_id
                                        ?, //MsgCount p_revision
                                        -, //IntersectionStatusObject p_status
                                        -  //MovementList p_states
                                    )}
                                )
                            )
                    )) { 
                        tc_ac.stop;
                        log("*** " & testcasename() & ": PASS: Successfully received SAPTEM PDU header. ***");
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
                    }
                    [] tc_ac.timeout {
                        log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***");
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
                    }
                }
                
                // Postamble
                f_utTriggerEvent(m_utTriggerEvent(stopTLMService));
                f_poDefault();
                f_cfDown();
                
            } // End of function f_IS_TLM_GEN_MSGF_BV_03
            
@@ -110,7 +206,50 @@ module ItsSpatem_TpFunctions {
             */
            function f_IS_TLM_GEN_MSGF_BV_04 () runs on ItsMapemSpatem {
                
                // TODO
                // Local variables
                
                // Test control
                if (not PICS_SPATEM_GENERATION) {
                    log("*** " & testcasename() & ": PICS_SPATEM_GENERATION required for executing the TC ***");
                    setverdict(inconc);
                    stop;
                }
                
                // Test component configuration
                f_cfUp();
                    
                // Preamble
                f_prInitialState();
                f_utTriggerEvent(m_utTriggerEvent(startTLMService));
                // Wait for SPATEM sent
                tc_ac.start(2.0);
                f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
                    
                // Test Body
                tc_ac.start;
                alt {
                    [] mapemSpatemPort.receive(
                        mw_spatemInd(
                            mw_spatemPdu(
                                mw_spatem_intersections(
                                    {mw_IntersectionState_moyAndTimeStamp}
                                )
                            )
                    )) { 
                        tc_ac.stop;
                        log("*** " & testcasename() & ": PASS: Successfully received SAPTEM PDU header. ***");
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
                    }
                    [] tc_ac.timeout {
                        log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***");
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
                    }
                }
                
                // Postamble
                f_utTriggerEvent(m_utTriggerEvent(stopTLMService));
                f_poDefault();
                f_cfDown();
                
            } // End of function f_IS_TLM_GEN_MSGF_BV_04
            
@@ -119,7 +258,55 @@ module ItsSpatem_TpFunctions {
             */
            function f_IS_TLM_GEN_MSGF_BV_05 () runs on ItsMapemSpatem {
                
                // TODO
                // Local variables
                
                // Test control
                if (not PICS_SPATEM_GENERATION) {
                    log("*** " & testcasename() & ": PICS_SPATEM_GENERATION required for executing the TC ***");
                    setverdict(inconc);
                    stop;
                }
                
                // Test component configuration
                f_cfUp();
                    
                // Preamble
                f_prInitialState();
                f_utTriggerEvent(m_utTriggerEvent(startTLMService));
                // Wait for SPATEM sent
                tc_ac.start(2.0);
                f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
                    
                // Test Body
                tc_ac.start;
                alt {
                    [] mapemSpatemPort.receive(
                        mw_spatemInd(
                            mw_spatemPdu(
                                mw_spatem_intersections(
                                    {mw_IntersectionState(
                                        -, //IntersectionReferenceID p_id
                                        -, //MsgCount p_revision
                                        -, //IntersectionStatusObject p_status
                                        {mw_movementState}  //MovementList p_states
                                    )}
                                )
                            )
                    )) { 
                        tc_ac.stop;
                        log("*** " & testcasename() & ": PASS: Successfully received SAPTEM PDU header. ***");
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
                    }
                    [] tc_ac.timeout {
                        log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***");
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
                    }
                }
                
                // Postamble
                f_utTriggerEvent(m_utTriggerEvent(stopTLMService));
                f_poDefault();
                f_cfDown();
                
            } // End of function f_IS_TLM_GEN_MSGF_BV_05
            
@@ -128,7 +315,58 @@ module ItsSpatem_TpFunctions {
             */
            function f_IS_TLM_GEN_MSGF_BV_06 () runs on ItsMapemSpatem {
                
                // TODO
                // Local variables
                
                // Test control
                if (not PICS_SPATEM_GENERATION) {
                    log("*** " & testcasename() & ": PICS_SPATEM_GENERATION required for executing the TC ***");
                    setverdict(inconc);
                    stop;
                }
                
                // Test component configuration
                f_cfUp();
                    
                // Preamble
                f_prInitialState();
                f_utTriggerEvent(m_utTriggerEvent(startTLMService));
                // Wait for SPATEM sent
                tc_ac.start(2.0);
                f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
                    
                // Test Body
                tc_ac.start;
                alt {
                    [] mapemSpatemPort.receive(
                        mw_spatemInd(
                            mw_spatemPdu(
                                mw_spatem_intersections(
                                    {mw_IntersectionState(
                                        ?, //IntersectionReferenceID p_id
                                        -, //MsgCount p_revision
                                        -, //IntersectionStatusObject p_status
                                        {mw_movementState(
                                            ?,//SignalGroupID,    
                                            ? //MovementEventList,
                                        )} //MovementList p_states
                                    )}
                                )
                            )
                    )) { 
                        tc_ac.stop;
                        log("*** " & testcasename() & ": PASS: Successfully received SAPTEM PDU header. ***");
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
                    }
                    [] tc_ac.timeout {
                        log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***");
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
                    }
                }
                
                // Postamble
                f_utTriggerEvent(m_utTriggerEvent(stopTLMService));
                f_poDefault();
                f_cfDown();
                
            } // End of function f_IS_TLM_GEN_MSGF_BV_06