Commit 74538a93 authored by Bostjan Pintar's avatar Bostjan Pintar
Browse files

Spatem update to support 2PTC

parent c0979bfd
Loading
Loading
Loading
Loading
+244 −19
Original line number Diff line number Diff line
@@ -256,9 +256,10 @@ module ItsSpatem_TpFunctions {
            /**
             * @desc    TP Function for TC_IS_TLM_GEN_MSGF_BV_05
             */
            function f_IS_TLM_GEN_MSGF_BV_05 () runs on ItsMapemSpatem {
                
            function f_IS_TLM_GEN_MSGF_BV_05 () runs on ItsMtc {
                // Local variables
                var ItsMapemSpatem v_mapem;
                var ItsMapemSpatem v_spatem;
                
                // Test control
                if (not PICS_SPATEM_GENERATION) {
@@ -268,14 +269,72 @@ module ItsSpatem_TpFunctions {
                }
                    
                // Test component configuration
                f_cfUp();
                f_cf02Up();
                
                // Preamble
                
                // Start components
                v_mapem := f_getComponent(c_compMap);
                v_spatem := f_getComponent(c_compSpat);
                v_mapem.start(f_IS_TLM_GEN_MSGF_BV_05_MAPEM());
                v_spatem.start(f_IS_TLM_GEN_MSGF_BV_05_SPATEM());
                
                // Synchronization
                f_serverSync2ClientsAndStop({c_prDone, c_tbDone});
                
                // Cleanup
                f_cf02Down();
                
            } // End of function f_IS_TLM_GEN_MSGF_BV_05
            
            /**
             * @desc    TP Function for TC_IS_TLM_GEN_MSGF_BV_05_SPATEM
             */
            function f_IS_TLM_GEN_MSGF_BV_05_MAPEM () runs on ItsMapemSpatem {
                // Local variables
                var MapemInd v_mapem;
                
                // Preamble
                f_prInitialState();
                f_awaitMapeMessage(
                    mw_mapemInd(
                        mw_mapemPdu(
                            mw_mapem(
                                {mw_intersectionGeometry(
                                    -, 
                                    -, 
                                    -, 
                                    {mw_roadLane(
                                        -,//laneID
                                        -,//laneAttributes
                                        -,//p_ingressApproach
                                        -,//egressApproach
                                        ? //connectsTo
                                    )} 
                                 )}
                            )
                    )),
                    v_mapem
                );
                f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
                f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
                
            } // End of function f_IS_TLM_GEN_MSGF_BV_05_MAPEM
            
            /**
             * @desc    TP Function for TC_IS_TLM_GEN_MSGF_BV_05_SPATEM
             */
            function f_IS_TLM_GEN_MSGF_BV_05_SPATEM () runs on ItsMapemSpatem {
                
                // Local variables
                
                // Preamble
                f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
                
                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;
@@ -288,7 +347,7 @@ module ItsSpatem_TpFunctions {
                                        -, //IntersectionReferenceID p_id
                                        -, //MsgCount p_revision
                                        -, //IntersectionStatusObject p_status
                                        {mw_movementState}  //MovementList p_states
                                        {mw_movementState(?)}  //MovementList p_states with signalGroup
                                    )}
                                )
                            )
@@ -306,16 +365,16 @@ module ItsSpatem_TpFunctions {
                // Postamble
                f_utTriggerEvent(m_utTriggerEvent(stopTLMService));
                f_poDefault();
                f_cfDown();
                
            } // End of function f_IS_TLM_GEN_MSGF_BV_05
            } // End of function f_IS_TLM_GEN_MSGF_BV_05_SPATEM
            
            /**
             * @desc    TP Function for TC_IS_TLM_GEN_MSGF_BV_06
             */
            function f_IS_TLM_GEN_MSGF_BV_06 () runs on ItsMapemSpatem {
                
            function f_IS_TLM_GEN_MSGF_BV_06 () runs on ItsMtc {
                // Local variables
                var ItsMapemSpatem v_mapem;
                var ItsMapemSpatem v_spatem;
                
                // Test control
                if (not PICS_SPATEM_GENERATION) {
@@ -325,14 +384,72 @@ module ItsSpatem_TpFunctions {
                }
                    
                // Test component configuration
                f_cfUp();
                f_cf02Up();
                
                // Preamble
                
                // Start components
                v_mapem := f_getComponent(c_compMap);
                v_spatem := f_getComponent(c_compSpat);
                v_mapem.start(f_IS_TLM_GEN_MSGF_BV_06_MAPEM());
                v_spatem.start(f_IS_TLM_GEN_MSGF_BV_06_SPATEM());
                
                // Synchronization
                f_serverSync2ClientsAndStop({c_prDone, c_tbDone});
                
                // Cleanup
                f_cf02Down();
                
            } // End of function f_IS_TLM_GEN_MSGF_BV_06
            
            /**
             * @desc    TP Function for TC_IS_TLM_GEN_MSGF_BV_06_SPATEM
             */
            function f_IS_TLM_GEN_MSGF_BV_06_MAPEM () runs on ItsMapemSpatem {
                // Local variables
                var MapemInd v_mapem;
                
                // Preamble
                f_prInitialState();
                f_awaitMapeMessage(
                    mw_mapemInd(
                        mw_mapemPdu(
                            mw_mapem(
                                {mw_intersectionGeometry(
                                    -, 
                                    -, 
                                    -, 
                                    {mw_roadLane(
                                        -,//laneID
                                        ?,//laneAttributes
                                        -,//p_ingressApproach
                                        -,//egressApproach
                                        ? //connectsTo
                                    )} 
                                 )}
                            )
                    )),
                    v_mapem
                );
                f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
                f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
                
            } // End of function f_IS_TLM_GEN_MSGF_BV_06_MAPEM
            
            /**
             * @desc    TP Function for TC_IS_TLM_GEN_MSGF_BV_06
             */
            function f_IS_TLM_GEN_MSGF_BV_06_SPATEM () runs on ItsMapemSpatem {
                
                // Local variables
                
                // Preamble
                f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
                
                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;
@@ -366,19 +483,127 @@ module ItsSpatem_TpFunctions {
                // Postamble
                f_utTriggerEvent(m_utTriggerEvent(stopTLMService));
                f_poDefault();
                f_cfDown();
                
            } // End of function f_IS_TLM_GEN_MSGF_BV_06
            } // End of function f_IS_TLM_GEN_MSGF_BV_06_SPATEM
            
            /**
             * @desc    TP Function for TC_IS_TLM_GEN_MSGF_BV_07
             */
            function f_IS_TLM_GEN_MSGF_BV_07 () runs on ItsMapemSpatem {
            function f_IS_TLM_GEN_MSGF_BV_07 () runs on ItsMtc {
                // Local variables
                var ItsMapemSpatem v_mapem;
                var ItsMapemSpatem v_spatem;
                
                // TODO
                // Test control
                if (not (PICS_SPATEM_GENERATION and PICS_SPATEM_PEDESTRIAN_MANOEUVRES)) {
                    log("*** " & testcasename() & ": PICS_SPATEM_GENERATION AND PICS_SPATEM_PEDESTRIAN_MANOEUVRES required for executing the TC ***");
                    setverdict(inconc);
                    stop;
                }
                    
                // Test component configuration
                f_cf02Up();
                
                // Preamble
                
                // Start components
                v_mapem := f_getComponent(c_compMap);
                v_spatem := f_getComponent(c_compSpat);
                v_mapem.start(f_IS_TLM_GEN_MSGF_BV_07_MAPEM());
                v_spatem.start(f_IS_TLM_GEN_MSGF_BV_07_SPATEM());
                
                // Synchronization
                f_serverSync2ClientsAndStop({c_prDone, c_tbDone});
                
                // Cleanup
                f_cf02Down();
                
            } // End of function f_IS_TLM_GEN_MSGF_BV_07
            
            /**
             * @desc    TP Function for TC_IS_TLM_GEN_MSGF_BV_07_SPATEM
             */
            function f_IS_TLM_GEN_MSGF_BV_07_MAPEM () runs on ItsMapemSpatem {
                // Local variables
                var MapemInd v_mapem;
                
                // Preamble
                f_prInitialState();
                f_awaitMapeMessage(
                    mw_mapemInd(
                        mw_mapemPdu(
                            mw_mapem(
                                {mw_intersectionGeometry(
                                    -, 
                                    -, 
                                    -, 
                                    {mw_roadLane(
                                        -,//laneID
                                        ?,//laneAttributes
                                        -,//p_ingressApproach
                                        -,//egressApproach
                                        ? //connectsTo
                                    )} 
                                 )}
                            )
                    )),
                    v_mapem
                );
                f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
                f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
                
            } // End of function f_IS_TLM_GEN_MSGF_BV_07_MAPEM
            
            /**
             * @desc    TP Function for TC_IS_TLM_GEN_MSGF_BV_07_SPATEM
             */
            function f_IS_TLM_GEN_MSGF_BV_07_SPATEM () runs on ItsMapemSpatem {
                
                // Local variables
                
                // Preamble
                f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
                
                f_prInitialState();
                f_utTriggerEvent(m_utTriggerEvent(startTLMService));
                // Wait for SPATEM sent
                tc_ac.start(2.0);
                    
                // 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();
                
            } // End of function f_IS_TLM_GEN_MSGF_BV_07_SPATEM
            
            /**
             * @desc    TP Function for TC_IS_TLM_GEN_MSGF_BV_08
             */
Compare 12e18a7c to 6fcc4da3
Original line number Diff line number Diff line
Subproject commit 12e18a7cf845de04442bb717e4663ac976c5815c
Subproject commit 6fcc4da30157b23bf2777185a66261958a39ac59