ItsGeoNetworking_TestCases.ttcn 913 KB
Newer Older
filatov's avatar
filatov committed
                alt {
                    [] geoNetworkingPort.receive(
                        f_receiveGeoNetMessageWithPayload(
                            mw_geoNwInd(
                                mw_geoNwPdu(
                                    mw_geoNwBroadcastPacket(
                                        mw_longPosVectorPosition_withDelta(v_longPosVectorIut), // SOPV
                                        ? // sequence number
                                    )
                                )
                            ),
                            ?
                        )
                    ) {
                        tc_ac.stop;
                        log("*** " & testcasename() & ": PASS: Fields of the received GeoBroadcast message correctly set ***");
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
filatov's avatar
filatov committed
                    }
                    [] tc_ac.timeout {
                        log("*** " & testcasename() & ": FAIL: GeoBroadcast message not received ***");
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
filatov's avatar
filatov committed
                    }
                }
                
                // Postamble
                f_poNeighbour();
                f_cf01Down();
                
            } // end TC_GEONW_FDV_GBC_BV_01
            
        } // end geoFdvGeoBroadcast
        
        // 6.2.1.6
        group geoFdvGeoAnycast {
            
            /**
             * @desc    GeoAnycast header validity
             * <pre>
             * Pics Selection: none
             * Config Id: CF01
             * Initial conditions:
             *  with {
             *      the IUT being in the "initial state" and
             *      the IUT having received Beacon information from the ItsNodeB
             *  }
             * Expected behaviour:
             *  ensure that {
             *      when {
             *          the IUT is requested to send a GeoAnycast packet
             *      }
             *      then {
             *          the IUT sends a GeoNetworking packet
             *              containing a correctly formatted Common Header
             *                  containing HT field
             *                      set to '3' (GEOANYCAST)
             *              containing GeoAnycast Extended Header
             *                  containing SOPV field
             *                      indicating position of IUT
             *       }
             *  }
             * </pre>
             *
             * @see         ETSI TS 102 871-2 v1.3.1 TP/GEONW/FDV/GAC/BV/01
filatov's avatar
filatov committed
             * @reference   EN 302 636-4-1 [1], clauses 8.7.2, 8.7.4, 8.8.5.2 and 9.3.12
             */
            testcase TC_GEONW_FDV_GAC_BV_01() runs on ItsGeoNetworking system ItsGeoNetworkingSystem {
                
                // Local variables
                var LongPosVector v_longPosVectorIut;
                var octetstring v_payload := char2oct("PAYLOAD");
                
                // Test control
                
                // Test component configuration
                f_cf01Up();
                
                // Test adapter configuration
                
                // Preamble
                v_longPosVectorIut := f_getPosition(c_compIut);
                f_prNeighbour();
                f_selfOrClientSyncAndVerdict(c_prDone, e_success);
filatov's avatar
filatov committed
                
                // Test Body
                if ( not f_utTriggerEvent(m_generateGeoAnycastMessageWithPayload(f_getArea(c_area1), v_payload)) ) {
                    log("*** " & testcasename() & ": INCONC: Trigger failed ***");
                    f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
filatov's avatar
filatov committed
                }
                tc_ac.start;
                alt {
                    [] geoNetworkingPort.receive(
                        f_receiveGeoNetMessageWithPayload(
                            mw_geoNwInd(
                                mw_geoNwPdu(
                                    mw_geoNwAnycastPacket(
                                        mw_longPosVectorPosition_withDelta(v_longPosVectorIut), // SOPV
                                        ? // sequence number
                                    )
                                )
                            ),
                            ?
                        )
                    ) {
                        tc_ac.stop;
                        log("*** " & testcasename() & ": PASS: Fields of the received GeoAnycast message correctly set ***");
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
filatov's avatar
filatov committed
                    }
                    [] tc_ac.timeout {
                        log("*** " & testcasename() & ": INCONC: GeoAnycast message not received ***");
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
filatov's avatar
filatov committed
                    }
                }
                
                // Postamble
                f_poNeighbour();
                f_cf01Down();
                
            } // end TC_GEONW_FDV_GAC_BV_01
            
        } // end geoFdvGeoAnycast
        
        // 6.2.1.7
        group geoFdvSingleHopBroadcast {
            
            /**
             * @desc    SHB header validity
             * <pre>
             * Pics Selection: none
             * Config Id: CF01
             * Initial conditions:
             *  with {
             *      the IUT being in the "initial state" and
             *      the IUT having received Beacon information from the ItsNodeB
             *  }
             * Expected behaviour:
             *  ensure that {
             *      when {
             *          the IUT is requested to send a SHB packet
             *      }
             *      then {
             *          the IUT sends a GeoNetworking packet
             *              containing a correctly formatted Common Header
             *                  containing HT field
             *                      set to '5' (TSB)
             *                  containing HST field
             *                      set to '0' (SINGLE_HOP)
             *                  containing MHL field
             *                      set to '1'
             *              containing Extended Header
             *                  containing SOPV
             *                      indicating LPV of the IUT
             *       }
             *  }
             * </pre>
             *
             * @see         ETSI TS 102 871-2 v1.3.1 TP/GEONW/FDV/SHB/BV/01
filatov's avatar
filatov committed
             * @reference   EN 302 636-4-1 [1], clauses 8.7.2, 8.7.4, 9.3.4, 8.8.4.2 and 9.3.10
             */
            testcase TC_GEONW_FDV_SHB_BV_01() runs on ItsGeoNetworking system ItsGeoNetworkingSystem {
                
                // Local variables
                var LongPosVector v_longPosVectorIut;
                
                // Test control
                
                // Test component configuration
                f_cf01Up();
                
                // Test adapter configuration
                
                // Preamble
                v_longPosVectorIut := f_getPosition(c_compIut);
                f_prNeighbour();
                f_selfOrClientSyncAndVerdict(c_prDone, e_success);
filatov's avatar
filatov committed
                
                // Test Body
                if ( not f_utTriggerEvent(m_generateShbMessage) ) {
                    log("*** " & testcasename() & ": INCONC: Trigger failed ***");
                    f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
filatov's avatar
filatov committed
                }
                tc_ac.start;
                alt {
                    [] geoNetworkingPort.receive(
                            mw_geoNwInd(
                                mw_geoNwPdu(
                                    mw_geoNwShbPacket(
                                      mw_longPosVectorPosition_withDelta(v_longPosVectorIut), // SOPV
                                      1 //MHL
                                    )
                                )
                            )
                        ) {
                        tc_ac.stop;
                        log("*** " & testcasename() & ": PASS: Fields of the received SHB message correctly set ***");
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
filatov's avatar
filatov committed
                    }
                    [] tc_ac.timeout {
                        log("*** " & testcasename() & ": INCONC: SHB message not received ***");
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
filatov's avatar
filatov committed
                    }
                }
                
                // Postamble
                f_poNeighbour();
                f_cf01Down();
                
            } // end TC_GEONW_FDV_SHB_BV_01
            
        } // end geoFdvSingleHopBroadcast
        
        // 6.2.1.8
        group geoFdvTopologicallyScopedBroadcast {
            
            /**
             * @desc    TSB header validity
             * <pre>
             * Pics Selection: none
             * Config Id: CF01
             * Initial conditions:
             *  with {
             *      the IUT being in the "initial state" and
             *      the IUT having received Beacon information from the ItsNodeB
             *  }
             * Expected behaviour:
             *  ensure that {
             *      when {
             *          the IUT is requested to send a TSB packet
             *      }
             *      then {
             *          the IUT sends a GeoNetworking packet
             *              containing a correctly formatted Common Header
             *                  containing HT field
             *                      set to '5' (TSB)
             *                  containing HST field
             *                      set to '1' (MULTI_HOP)
             *              containing TSB Extended Header
             *                  containing SOPV field
             *                      indicating position of the IUT
             *       }
             *  }
             * </pre>
             *
             * @see         ETSI TS 102 871-2 v1.3.1 TP/GEONW/FDV/TSB/BV/01
filatov's avatar
filatov committed
             * @reference   EN 302 636-4-1 [1], clauses 8.7.2, 8.7.4, 8.8.3.2 and 9.3.9
             */
            testcase TC_GEONW_FDV_TSB_BV_01() runs on ItsGeoNetworking system ItsGeoNetworkingSystem {
                
                // Local variables
                var LongPosVector v_longPosVectorIut;
                
                // Test control
                
                // Test component configuration
                f_cf01Up();
                
                // Test adapter configuration
                
                // Preamble
                v_longPosVectorIut := f_getPosition(c_compIut);
                f_prNeighbour();
                f_selfOrClientSyncAndVerdict(c_prDone, e_success);
filatov's avatar
filatov committed
                
                // Test Body
                if ( not f_utTriggerEvent(m_generateTsbMessage) ) {
                    log("*** " & testcasename() & ": INCONC: Trigger failed ***");
                    f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
filatov's avatar
filatov committed
                }
                tc_ac.start;
                alt {
                    [] geoNetworkingPort.receive(
                           mw_geoNwInd(
                                mw_geoNwPdu(
                                    mw_geoNwTsbPacket(
                                        ?, // sequence number
                                        mw_longPosVectorPosition_withDelta(v_longPosVectorIut) // SOPV
                                    )
                                )
                            )
                        ) {
                        tc_ac.stop;
                        log("*** " & testcasename() & ": PASS: message received with correct common and extended headers ***");
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
filatov's avatar
filatov committed
                    }
                    [] tc_ac.timeout {
                        log("*** " & testcasename() & ": INCONC: TSB message not received ***");
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
filatov's avatar
filatov committed
                    }
                }
                
                // Postamble
                f_poNeighbour();
                f_cf01Down();
                
            } // end TC_GEONW_FDV_TSB_BV_01
            
        } // end geoFdvTopologicallyScopedBroadcast
        
    } // end geoFormatingAndDataValidity
    
    // 6.2.2
    group geoProtocolOperation {
        
        // 6.2.2.1
        group geoLocationTable {
            
            /**
             * @desc    Test of adding new entries into location table from Beacon header
             * <pre>
             * Pics Selection: none
             * Config Id: CF01
             * Initial conditions:
             *  with {
             *      the IUT being in the "initial state" and
             *      the IUT having received Beacon information from the ItsNodeB and
             *      the lifetime of the ItsNodeB Location Table entry not being expired
             *  }
             * Expected behaviour:
             *  ensure that {
             *      when {
             *          the IUT is requested to send a GeoUnicast packet to ItsNodeB
             *      }
             *      then {
             *          the IUT does not send a GeoNetworking packet
             *              containing a LS_REQUEST
             *                  containing Request field
             *                      containing GN_ADDR
             *                          containing M_ID
             *                              indicating ItsNodeB
             *          the IUT sends a GeoNetworking packet
             *              containing a correctly formatted Common Header
             *                  containing HT field
             *                      set to '2' (GEOUNICAST)
             *              containing GeoUnicast Extended Header
             *                  containing DEPV field
             *                      indicating same position as the SOPV value of the Beacon information received from ItsNodeB
             *      }
             *  }
             * </pre>
             *
             * @see         ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOT/BV/01
             * @reference   EN 302 636-4-1 [1], clauses 9.3.10.3, 9.3.6.2 and 9.3.8.2
filatov's avatar
filatov committed
             */
            testcase TC_GEONW_PON_LOT_BV_01() runs on ItsGeoNetworking system ItsGeoNetworkingSystem {
                
                // Local variables
                var LongPosVector v_longPosVectorNodeB;
                
                // Test control
                
                // Test component configuration
                f_cf01Up();
                v_longPosVectorNodeB := f_getPosition(c_compNodeB);
                
                // Test adapter configuration
                
                // Preamble
                f_prNeighbour();
                f_selfOrClientSyncAndVerdict(c_prDone, e_success);
filatov's avatar
filatov committed
                
                // Test Body
                if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeB.gnAddr)) ) {
                    log("*** " & testcasename() & ": INCONC: Trigger failed ***");
                    f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
filatov's avatar
filatov committed
                }
                
                tc_ac.start;
                alt {
                    [] a_receiveGeoUnicastWithDestination(mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeB))) {
                        tc_ac.stop;
                        log("*** " & testcasename() & ": PASS: GeoUnicast packet received correctly ***");
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
filatov's avatar
filatov committed
                    }
                    [] a_receiveAnyLsRequest() {
                        tc_ac.stop;
                        log("*** " & testcasename() & ": FAIL: Received Location Service Request ***");
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
filatov's avatar
filatov committed
                    }
                    [] tc_ac.timeout {
                        log("*** " & testcasename() & ": TIMEOUT: Expected message not received ***");
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
filatov's avatar
filatov committed
                    }
                }
                    
                // Postamble
                f_poNeighbour();
                f_cf01Down();
                
            } // end TC_GEONW_PON_LOT_BV_01
            
            /**
             * @desc    Test of adding new entries into location table from LS Reply data
             * <pre>
             * Pics Selection: none
             * Config Id: CF01
             * Initial conditions:
             *  with {
             *      the IUT being in the "initial state" and
             *      the IUT having been requested to send a first GeoUnicast packet to ItsNodeA and
             *      the IUT having sent a LS_REQUEST packet
             *          containing Request field
             *              containing GN_ADDR
             *                  containing M_ID
             *                      indicating ItsNodeA
             *      the IUT having received a LS_REPLY packet from ItsNodeA
             *          containing SOPV field and
             *      the IUT having sent the GeoUnicast packet to ItsNodeA and
             *      the lifetime of the ItsNodeA Location Table entry not being expired
             *  }
             * Expected behaviour:
             *  ensure that {
             *      when {
             *          the IUT is requested to send a second GeoUnicast packet to ItsNodeA
             *      }
             *      then {
             *          the IUT does not send a GeoNetworking packet
             *              containing a LS_REQUEST
             *                  containing Request field
             *                      containing GN_ADDR
             *                          containing M_ID
             *                              indicating ItsNodeA
             *          the IUT sends a GeoNetworking packet
             *              containing a correctly formatted Common Header
             *                  containing HT field
             *                      set to '2' (GEOUNICAST)
             *              containing GeoUnicast Extended Header
             *                  containing DEPV field
             *                      indicating same position as the SOPV value of the LS_REPLY packet received from ItsNodeA
             *      }
             *  }
             * </pre>
             *
             * @see         ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOT/BV/02
             * @reference   EN 302 636-4-1 [1], clauses 9.3.7.1.4, 9.3.7.1.2 and 9.3.8.2
filatov's avatar
filatov committed
             */
            testcase TC_GEONW_PON_LOT_BV_02() runs on ItsGeoNetworking system ItsGeoNetworkingSystem {
                
                // Local variables
                var LongPosVector v_longPosVectorNodeA;
                var LongPosVector v_longPosVectorNodeB;
                var LongPosVector v_longPosVectorIut;
                var GN_Address v_gnAddressNodeA;
                var boolean v_lsRequestReceived := false;
                
                // Test control
                
                // Test component configuration
                f_cf01Up();
                v_longPosVectorNodeA := f_getPosition(c_compNodeA);
                v_longPosVectorNodeB := f_getPosition(c_compNodeB);
                v_gnAddressNodeA := v_longPosVectorNodeA.gnAddr;
                
                // Test adapter configuration
                
                // Preamble
                f_prNeighbour();
                
                if ( not  f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeA.gnAddr)) ) {
                    log("*** " & testcasename() & ": INCONC: Trigger failed ***");
                    f_selfOrClientSyncAndVerdict(c_prDone, e_timeout);
filatov's avatar
filatov committed
                }
                tc_ac.start;
                alt {
                    [] a_receiveLsRequestAndReply(
                            ?, v_gnAddressNodeA.mid,
                            v_longPosVectorNodeA, v_longPosVectorNodeB
                        ) {
                        v_lsRequestReceived := true;
                        log("*** " & testcasename() & ": Pre-conditions: Received and answered Location Service Request ***");
                        repeat;
                    }
                    [] a_receiveGeoUnicastWithDestination(mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA))) {
                        tc_ac.stop;
                        if(v_lsRequestReceived == true) {
                            log("*** " & testcasename() & ": Pre-conditions: First GeoUnicast message received correctly ***");
                        }
                        else {
                            log("*** " & testcasename() & ": Pre-conditions: GeoUnicast packet received without LS Request ***");
                            f_selfOrClientSyncAndVerdict(c_prDone, e_error);
filatov's avatar
filatov committed
                        }
                    }
                    [] tc_ac.timeout {
                        log("*** " & testcasename() & ": Pre-conditions: Initial conditions not satisfied. ***");
                        f_selfOrClientSyncAndVerdict(c_prDone, e_timeout);
                f_selfOrClientSyncAndVerdict(c_prDone, e_success);
filatov's avatar
filatov committed
                
                // Test Body
                if ( not  f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeA.gnAddr)) ) {
                    log("*** " & testcasename() & ": INCONC: Trigger failed ***");
                    f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
filatov's avatar
filatov committed
                }
                tc_ac.start;
                alt {
                    [] a_receiveLsRequest(?, v_gnAddressNodeA.mid, v_longPosVectorIut) {
                        tc_ac.stop;
                        log("*** " & testcasename() & ": FAIL: Received Location Service Request ***");
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
filatov's avatar
filatov committed
                    }
                    [] a_receiveGeoUnicastWithDestination(mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA))) {
                        tc_ac.stop;
                        log("*** " & testcasename() & ": PASS: Received second GeoUnicast packet without LS Request ***");
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
filatov's avatar
filatov committed
                        
                    }
                    [] tc_ac.timeout {
                        log("*** " & testcasename() & ": INCONC: Expected message not received ***");
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
filatov's avatar
filatov committed
                    }
                }
                
                // Postamble
                f_poNeighbour();
                f_cf01Down();
                
            } // end TC_GEONW_PON_LOT_BV_02
            
            group GEONW_PON_LOT_BV_03 {
                
                /**
                 * @desc    Test of adding new entries into location table from extended header processing
                 *          (e.g. Unicast header)
                 * <pre>
                 * Pics Selection: none
                 * Config Id: CF01
                 * Initial conditions:
                 *  with {
                 *      the IUT being in the "initial state" and
                 *      the IUT having received a MESSAGE from ItsNodeA
                 *  }
                 *  MESSAGE: Beacon packet
                 *
                 * Expected behaviour:
                 *  ensure that {
                 *      when {
                 *          the IUT is requested to send a GeoUnicast packet to ItsNodeA
                 *      }
                 *      then {
                 *          the IUT does not send a GeoNetworking packet
                 *              containing a LS_REQUEST Extended Header
                 *                  containing Request field
                 *                      containing GN_ADDR
                 *                          containing M_ID
                 *                              indicating ItsNodeA
                 *          the IUT sends a GeoNetworking packet
                 *              containing a correctly formatted Common Header
                 *                  containing HT field
                 *                      set to '2' (GEOUNICAST)
                 *              containing GUC Extended Header
                 *                  containing DEPV field
                 *                      indicating same position as the SOPV of the MESSAGE received from ItsNodeA
                 *      }
                 *  }
                 * </pre>
                 *
                 * @see         ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOT/BV/03
                 * @reference   EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.12.3, 9.3.9.3, 9.3.10.3, 9.3.7.3 and 9.3.8.2
filatov's avatar
filatov committed
                 */
                testcase TC_GEONW_PON_LOT_BV_03_01() runs on ItsGeoNetworking system ItsGeoNetworkingSystem {
                    
                    // Local variables
                    var LongPosVector v_longPosVectorNodeA := f_TP_GEONW_PON_LOT_BV_03_pre_1();
                    
                    f_TP_GEONW_PON_LOT_BV_03_pre_2(
                        m_geoNwBeaconPacket(
                            v_longPosVectorNodeA
                        )
                    );
                    
                    f_TP_GEONW_PON_LOT_BV_03_main(v_longPosVectorNodeA);
                    
                } // end TC_GEONW_PON_LOT_BV_03_01
                
                /**
                 * @desc    Test of adding new entries into location table from extended header processing
                 *          (e.g. Unicast header)
                 * <pre>
                 * Pics Selection: none
                 * Config Id: CF01
                 * Initial conditions:
                 *  with {
                 *      the IUT being in the "initial state" and
                 *      the IUT having received a MESSAGE from ItsNodeA
                 *  }
                 *  MESSAGE: GUC packet
                 *
                 * Expected behaviour:
                 *  ensure that {
                 *      when {
                 *          the IUT is requested to send a GeoUnicast packet to ItsNodeA
                 *      }
                 *      then {
                 *          the IUT does not send a GeoNetworking packet
                 *              containing a LS_REQUEST Extended Header
                 *                  containing Request field
                 *                      containing GN_ADDR
                 *                          containing M_ID
                 *                              indicating ItsNodeA
                 *          the IUT sends a GeoNetworking packet
                 *              containing a correctly formatted Common Header
                 *                  containing HT field
                 *                      set to '2' (GEOUNICAST)
                 *              containing GUC Extended Header
                 *                  containing DEPV field
                 *                      indicating same position as the SOPV of the MESSAGE received from ItsNodeA
                 *      }
                 *  }
                 * </pre>
                 *
                 * @see         ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOT/BV/03
                 * @reference   EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.12.3, 9.3.9.3, 9.3.10.3, 9.3.7.3 and 9.3.8.2
filatov's avatar
filatov committed
                 */
                testcase TC_GEONW_PON_LOT_BV_03_02() runs on ItsGeoNetworking system ItsGeoNetworkingSystem {
                    
                    // Local variables
                    var LongPosVector v_longPosVectorNodeA := f_TP_GEONW_PON_LOT_BV_03_pre_1();
                    
                    f_TP_GEONW_PON_LOT_BV_03_pre_2(
                        m_geoNwUnicastPacket(
                            v_longPosVectorNodeA,
                            f_getIutShortPosVector(),
                            vc_localSeqNumber
                        )
                    );
                    
                    f_TP_GEONW_PON_LOT_BV_03_main(v_longPosVectorNodeA);
                    
                } // end TC_GEONW_PON_LOT_BV_03_02
                
                /**
                 * @desc    Test of adding new entries into location table from extended header processing
                 *          (e.g. Unicast header)
                 * <pre>
                 * Pics Selection: none
                 * Config Id: CF01
                 * Initial conditions:
                 *  with {
                 *      the IUT being in the "initial state" and
                 *      the IUT having received a MESSAGE from ItsNodeA
                 *  }
                 *  MESSAGE: GAC packet
                 *
                 * Expected behaviour:
                 *  ensure that {
                 *      when {
                 *          the IUT is requested to send a GeoUnicast packet to ItsNodeA
                 *      }
                 *      then {
                 *          the IUT does not send a GeoNetworking packet
                 *              containing a LS_REQUEST Extended Header
                 *                  containing Request field
                 *                      containing GN_ADDR
                 *                          containing M_ID
                 *                              indicating ItsNodeA
                 *          the IUT sends a GeoNetworking packet
                 *              containing a correctly formatted Common Header
                 *                  containing HT field
                 *                      set to '2' (GEOUNICAST)
                 *              containing GUC Extended Header
                 *                  containing DEPV field
                 *                      indicating same position as the SOPV of the MESSAGE received from ItsNodeA
                 *      }
                 *  }
                 * </pre>
                 *
                 * @see         ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOT/BV/03
                 * @reference   EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.12.3, 9.3.9.3, 9.3.10.3, 9.3.7.3 and 9.3.8.2
filatov's avatar
filatov committed
                 */
                testcase TC_GEONW_PON_LOT_BV_03_03() runs on ItsGeoNetworking system ItsGeoNetworkingSystem {
                    
                    // Local variables
                    var LongPosVector v_longPosVectorNodeA := f_TP_GEONW_PON_LOT_BV_03_pre_1();
                    
                    f_TP_GEONW_PON_LOT_BV_03_pre_2(
                        m_geoNwAnycastPacket(
                            v_longPosVectorNodeA,
                            vc_localSeqNumber,
                            f_getGeoAnycastArea(c_area1)
                        )
                    );
                    
                    f_TP_GEONW_PON_LOT_BV_03_main(v_longPosVectorNodeA);
                    
                } // end TC_GEONW_PON_LOT_BV_03_03
                
                /**
                 * @desc    Test of adding new entries into location table from extended header processing
                 *          (e.g. Unicast header)
                 * <pre>
                 * Pics Selection: none
                 * Config Id: CF01
                 * Initial conditions:
                 *  with {
                 *      the IUT being in the "initial state" and
                 *      the IUT having received a MESSAGE from ItsNodeA
                 *  }
                 *  MESSAGE: GBC packet
                 *
                 * Expected behaviour:
                 *  ensure that {
                 *      when {
                 *          the IUT is requested to send a GeoUnicast packet to ItsNodeA
                 *      }
                 *      then {
                 *          the IUT does not send a GeoNetworking packet
                 *              containing a LS_REQUEST Extended Header
                 *                  containing Request field
                 *                      containing GN_ADDR
                 *                          containing M_ID
                 *                              indicating ItsNodeA
                 *          the IUT sends a GeoNetworking packet
                 *              containing a correctly formatted Common Header
                 *                  containing HT field
                 *                      set to '2' (GEOUNICAST)
                 *              containing GUC Extended Header
                 *                  containing DEPV field
                 *                      indicating same position as the SOPV of the MESSAGE received from ItsNodeA
                 *      }
                 *  }
                 * </pre>
                 *
                 * @see         ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOT/BV/03
                 * @reference   EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.12.3, 9.3.9.3, 9.3.10.3, 9.3.7.3 and 9.3.8.2
filatov's avatar
filatov committed
                 */
                testcase TC_GEONW_PON_LOT_BV_03_04() runs on ItsGeoNetworking system ItsGeoNetworkingSystem {
                    
                    // Local variables
                    var LongPosVector v_longPosVectorNodeA := f_TP_GEONW_PON_LOT_BV_03_pre_1();
                    
                    f_TP_GEONW_PON_LOT_BV_03_pre_2(
                        m_geoNwBroadcastPacket(
                            v_longPosVectorNodeA,
                            vc_localSeqNumber,
                            f_getGeoBroadcastArea(c_area1)
                        )
                    );
                    
                    f_TP_GEONW_PON_LOT_BV_03_main(v_longPosVectorNodeA);
                    
                } // end TC_GEONW_PON_LOT_BV_03_04
                
                /**
                 * @desc    Test of adding new entries into location table from extended header processing
                 *          (e.g. Unicast header)
                 * <pre>
                 * Pics Selection: none
                 * Config Id: CF01
                 * Initial conditions:
                 *  with {
                 *      the IUT being in the "initial state" and
                 *      the IUT having received a MESSAGE from ItsNodeA
                 *  }
                 *  MESSAGE: TSB packet
                 *
                 * Expected behaviour:
                 *  ensure that {
                 *      when {
                 *          the IUT is requested to send a GeoUnicast packet to ItsNodeA
                 *      }
                 *      then {
                 *          the IUT does not send a GeoNetworking packet
                 *              containing a LS_REQUEST Extended Header
                 *                  containing Request field
                 *                      containing GN_ADDR
                 *                          containing M_ID
                 *                              indicating ItsNodeA
                 *          the IUT sends a GeoNetworking packet
                 *              containing a correctly formatted Common Header
                 *                  containing HT field
                 *                      set to '2' (GEOUNICAST)
                 *              containing GUC Extended Header
                 *                  containing DEPV field
                 *                      indicating same position as the SOPV of the MESSAGE received from ItsNodeA
                 *      }
                 *  }
                 * </pre>
                 *
                 * @see         ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOT/BV/03
                 * @reference   EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.12.3, 9.3.9.3, 9.3.10.3, 9.3.7.3 and 9.3.8.2
filatov's avatar
filatov committed
                 */
                testcase TC_GEONW_PON_LOT_BV_03_05() runs on ItsGeoNetworking system ItsGeoNetworkingSystem {
                    
                    // Local variables
                    var LongPosVector v_longPosVectorNodeA := f_TP_GEONW_PON_LOT_BV_03_pre_1();
                    
                    f_TP_GEONW_PON_LOT_BV_03_pre_2(
                        m_geoNwTsbPacket(
                            vc_localSeqNumber,
                            v_longPosVectorNodeA
                        )
                    );
                    
                    f_TP_GEONW_PON_LOT_BV_03_main(v_longPosVectorNodeA);
                    
                } // end TC_GEONW_PON_LOT_BV_03_05
                
                /**
                 * @desc    Test of adding new entries into location table from extended header processing
                 *          (e.g. Unicast header)
                 * <pre>
                 * Pics Selection: none
                 * Config Id: CF01
                 * Initial conditions:
                 *  with {
                 *      the IUT being in the "initial state" and
                 *      the IUT having received a MESSAGE from ItsNodeA
                 *  }
                 *  MESSAGE: SHB packet
                 *
                 * Expected behaviour:
                 *  ensure that {
                 *      when {
                 *          the IUT is requested to send a GeoUnicast packet to ItsNodeA
                 *      }
                 *      then {
                 *          the IUT does not send a GeoNetworking packet
                 *              containing a LS_REQUEST Extended Header
                 *                  containing Request field
                 *                      containing GN_ADDR
                 *                          containing M_ID
                 *                              indicating ItsNodeA
                 *          the IUT sends a GeoNetworking packet
                 *              containing a correctly formatted Common Header
                 *                  containing HT field
                 *                      set to '2' (GEOUNICAST)
                 *              containing GUC Extended Header
                 *                  containing DEPV field
                 *                      indicating same position as the SOPV of the MESSAGE received from ItsNodeA
                 *      }
                 *  }
                 * </pre>
                 *
                 * @see         ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOT/BV/03
                 * @reference   EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.12.3, 9.3.9.3, 9.3.10.3, 9.3.7.3 and 9.3.8.2
filatov's avatar
filatov committed
                 */
                testcase TC_GEONW_PON_LOT_BV_03_06() runs on ItsGeoNetworking system ItsGeoNetworkingSystem {
                    
                    // Local variables
                    var LongPosVector v_longPosVectorNodeA := f_TP_GEONW_PON_LOT_BV_03_pre_1();
                    
                    f_TP_GEONW_PON_LOT_BV_03_pre_2(
                        m_geoNwShbPacket(
                            v_longPosVectorNodeA
                        )
                    );
                    
                    f_TP_GEONW_PON_LOT_BV_03_main(v_longPosVectorNodeA);
                    
                } // end TC_GEONW_PON_LOT_BV_03_06
                
                /**
                 * @desc    Test of adding new entries into location table from extended header processing
                 *          (e.g. Unicast header)
                 * <pre>
                 * Pics Selection: none
                 * Config Id: CF01
                 * Initial conditions:
                 *  with {
                 *      the IUT being in the "initial state" and
                 *      the IUT having received a MESSAGE from ItsNodeA
                 *  }
                 *  MESSAGE: LS Request packet
                 *
                 * Expected behaviour:
                 *  ensure that {
                 *      when {
                 *          the IUT is requested to send a GeoUnicast packet to ItsNodeA
                 *      }
                 *      then {
                 *          the IUT does not send a GeoNetworking packet
                 *              containing a LS_REQUEST Extended Header
                 *                  containing Request field
                 *                      containing GN_ADDR
                 *                          containing M_ID
                 *                              indicating ItsNodeA
                 *          the IUT sends a GeoNetworking packet
                 *              containing a correctly formatted Common Header
                 *                  containing HT field
                 *                      set to '2' (GEOUNICAST)
                 *              containing GUC Extended Header
                 *                  containing DEPV field
                 *                      indicating same position as the SOPV of the MESSAGE received from ItsNodeA
                 *      }
                 *  }
                 * </pre>
                 *
                 * @see         ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOT/BV/03
                 * @reference   EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.12.3, 9.3.9.3, 9.3.10.3, 9.3.7.3 and 9.3.8.2
filatov's avatar
filatov committed
                 */
                testcase TC_GEONW_PON_LOT_BV_03_07() runs on ItsGeoNetworking system ItsGeoNetworkingSystem {
                    
                    // Local variables
                    var LongPosVector v_longPosVectorNodeA := f_TP_GEONW_PON_LOT_BV_03_pre_1();
                    
                    activate(a_receiveAnyLsReply());
                    
                    f_TP_GEONW_PON_LOT_BV_03_pre_2(
                        m_geoNwLsRequestPacket(
                            v_longPosVectorNodeA,
                            vc_localSeqNumber,
                            f_getIutGnLocalAddress()
                        )
                    );
                    
                    f_TP_GEONW_PON_LOT_BV_03_main(v_longPosVectorNodeA);
                    
                } // end TC_GEONW_PON_LOT_BV_03_07
                
                /**
                 * @desc    Test of adding new entries into location table from extended header processing
                 *          (e.g. Unicast header)
                 * <pre>
                 * Pics Selection: none
                 * Config Id: CF01
                 * Initial conditions:
                 *  with {
                 *      the IUT being in the "initial state" and
                 *      the IUT having received a MESSAGE from ItsNodeA
                 *  }
                 *  MESSAGE: LS Reply packet
                 *
                 * Expected behaviour:
                 *  ensure that {
                 *      when {
                 *          the IUT is requested to send a GeoUnicast packet to ItsNodeA
                 *      }
                 *      then {
                 *          the IUT does not send a GeoNetworking packet
                 *              containing a LS_REQUEST Extended Header
                 *                  containing Request field
                 *                      containing GN_ADDR
                 *                          containing M_ID
                 *                              indicating ItsNodeA
                 *          the IUT sends a GeoNetworking packet
                 *              containing a correctly formatted Common Header
                 *                  containing HT field
                 *                      set to '2' (GEOUNICAST)
                 *              containing GUC Extended Header
                 *                  containing DEPV field
                 *                      indicating same position as the SOPV of the MESSAGE received from ItsNodeA
                 *      }
                 *  }
                 * </pre>
                 *
                 * @see         ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOT/BV/03
                 * @reference   EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.12.3, 9.3.9.3, 9.3.10.3, 9.3.7.3 and 9.3.8.2
filatov's avatar
filatov committed
                 */
                testcase TC_GEONW_PON_LOT_BV_03_08() runs on ItsGeoNetworking system ItsGeoNetworkingSystem {
                    
                    // Local variables
                    var LongPosVector v_longPosVectorNodeA := f_TP_GEONW_PON_LOT_BV_03_pre_1();
                    
                    f_TP_GEONW_PON_LOT_BV_03_pre_2(
                        m_geoNwLsReplyPacket(
                            v_longPosVectorNodeA,
                            f_getIutShortPosVector(),
                            vc_localSeqNumber
                        )
                    );
                    
                    f_TP_GEONW_PON_LOT_BV_03_main(v_longPosVectorNodeA);
                    
                } // end TC_GEONW_PON_LOT_BV_03_08
                
                /**
                 * @desc    Function including first preamble part (TC_GEONW_PON_LOT_BV_03)
                 */
                function f_TP_GEONW_PON_LOT_BV_03_pre_1() runs on ItsGeoNetworking return LongPosVector {
                    
                    // Local variables
                    var LongPosVector v_longPosVectorNodeA;
                    
                    // Test control
                    
                    // Test component configuration
                    f_cf01Up();
                    v_longPosVectorNodeA := f_getPosition(c_compNodeA);
                    
                    // Test adapter configuration
                    
                    // Preamble part I
                    f_prNeighbour();
                    
                    return v_longPosVectorNodeA;
                } // end f_TP_GEONW_PON_LOT_BV_03_pre_1
                
                /**
                 * @desc    Function including second preamble part (TC_GEONW_PON_LOT_BV_03)
                 */
                function f_TP_GEONW_PON_LOT_BV_03_pre_2(in template (value) GnNonSecuredPacket p_packet) runs on ItsGeoNetworking {
                    
                    //preamble part II
                    f_sendGeoNetMessage(
                        m_geoNwReq_linkLayerBroadcast(m_geoNwPdu(p_packet))
                    );
                    f_selfOrClientSyncAndVerdict(c_prDone, e_success);
filatov's avatar
filatov committed
                } // end f_TP_GEONW_PON_LOT_BV_03_pre_2
                
                /**
                 * @desc    Function including test body and postamble part (TC_GEONW_PON_LOT_BV_03)