ItsGeoNetworking_TpFunctions.ttcn 806 KB
Newer Older
                    }
                    [] tc_ac.timeout {
                        log("*** " & testcasename() & ": Expected message not received ***");
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
                    }
                }
                
                // Postamble
                f_poDefault();
                f_cf01Down();
                
            } // end f_GEONW_PON_GNA_BV_02
            
        } // end geoGeoNetworkingAddress
        
        // 6.2.2.7
        group geoBeaconing {
            
            /**
             * @desc    TP Function for TC_GEONW_PON_BEA_TI_01
             */
            function f_GEONW_PON_BEA_TI_01() runs on ItsGeoNetworking {
                
                // Local variables
                var LongPosVector v_longPosVectorIut;
                var boolean v_beaconReceived := false;
                timer t_minRetransTimer := f_getBsRetransmitTimer();
                timer t_maxRetransTimer := f_getBsRetransmitTimer() + f_getBsMaxJitter();
                
                // Test control
                if (not PICS_GN_BEACON_SRC) {
                    log("*** " & testcasename() & ": PICS_GN_BEACON_SRC required for executing the TC ***");
                    setverdict(inconc);
                    stop;
                }
                 
                // Test component configuration
                f_cf01Up();
                v_longPosVectorIut := f_getPosition(c_compIut);
                
                // Test adapter configuration
                
                // Preamble
                f_prDefault();
                f_selfOrClientSyncAndVerdict(c_prDone, e_success);
                
                // Test Body
                f_acTriggerEvent(m_startPassBeaconing(m_beaconHeader(v_longPosVectorIut).beaconHeader));
                
                t_maxRetransTimer.start;
                alt {
                    [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBeaconPacket(?)))) {
                        if (v_beaconReceived == false) {
                            v_beaconReceived := true;
                            t_minRetransTimer.start;
                            t_maxRetransTimer.start;
                            //after the first beacon received, check the retransmission
                            repeat;
                        }
                        if(t_minRetransTimer.running) {
                            log("*** " & testcasename() & ": Beacon not transmitted at prescribed periodicity (too early) ***");
                            f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
                        }
                        else {
                            log("*** " & testcasename() & ": Beacon transmitted at prescribed periodicity ***");
                            f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
                        }
                    }
                    [] t_minRetransTimer.timeout {
                        log("*** " & testcasename() & ": Ready for retransmission ***");
                        repeat;
                    }
                    [] t_maxRetransTimer.timeout {
                        log("*** " & testcasename() & ": Beacon not transmitted at prescribed periodicity (too late) ***");
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
                    }
                }
                f_acTriggerEvent(m_stopPassBeaconing);
                
                // Postamble
                f_poDefault();
                f_cf01Down();
                
            } // end f_GEONW_PON_BEA_TI_01
            
            /**
             * @desc    TP Function for TC_GEONW_PON_BEA_TI_02
             */
            function f_GEONW_PON_BEA_TI_02() runs on ItsGeoNetworking {
                
                // Local variables
                var LongPosVector v_longPosVectorNodeB;
                var LongPosVector v_longPosVectorIut;
                var boolean v_geoUnicastReceived := false;
                var boolean v_readyForRetransmission := false;
                timer t_minRetransTimer := f_getBsRetransmitTimer() - f_getDeltaTimer();
                timer t_maxRetransTimer := f_getBsRetransmitTimer() + f_getBsMaxJitter() + f_getDeltaTimer();
                
                // Test control
                if (not PICS_GN_BEACON_SRC) {
                    log("*** " & testcasename() & ": PICS_GN_BEACON_SRC required for executing the TC ***");
                    setverdict(inconc);
                    stop;
                }
                
                // Test component configuration
                f_cf01Up();
                v_longPosVectorNodeB := f_getPosition(c_compNodeB);
                v_longPosVectorIut := f_getPosition(c_compIut);
                
                // Test adapter configuration
                f_acTriggerEvent(m_startPassBeaconing(m_beaconHeader(v_longPosVectorIut).beaconHeader));
                
                // Preamble
                f_prNeighbour();
                f_selfOrClientSyncAndVerdict(c_prDone, e_success);
                
                // Test Body
                if ( not f_utTriggerEvent(m_generateShbMessage) ) {
                    log("*** " & testcasename() & ": INCONC: Trigger failed ***");
                    f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
                }
                tc_ac.start;
                alt {
                    [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwShbPacket))) {
                        tc_ac.stop;
                        t_minRetransTimer.start;
                        t_maxRetransTimer.start;
                        v_geoUnicastReceived := true;
                        repeat;
                    }
                    [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBeaconPacket))) {
                        if(not(v_geoUnicastReceived)) {
                            repeat;
                        }
                        if(not(v_readyForRetransmission)) {
                            log("*** " & testcasename() & ": Beacon not transmitted at prescribed periodicity (too early) ***");
                            f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
                        }
                        else {
                            log("*** " & testcasename() & ": Beacon transmitted at prescribed periodicity ***");
                            f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
                        }
                    }
                    [] t_minRetransTimer.timeout {
                        log("*** " & testcasename() & ": Ready for retransmission ***");
                        v_readyForRetransmission := true;
                        repeat;
                    }
                    [] t_maxRetransTimer.timeout {
                        log("*** " & testcasename() & ": Beacon not transmitted at prescribed periodicity (too late) ***");
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
                    }
                    [] tc_ac.timeout {
                        log("*** " & testcasename() & ": GUC not received ***");
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
                    }
                }
                f_acTriggerEvent(m_stopPassBeaconing);
                
                // Postamble
                f_poNeighbour();
                f_cf01Down();
                
            } // end f_GEONW_PON_BEA_TI_02
            
        } // end geoBeaconing
        
        // 6.2.2.8
        group geoGeoUnicast {
            
berge's avatar
berge committed
			group gucAllForwardingAlgorithm {
				
                group GEONW_PON_GUC_ALL_BV_03 {
                    
                    /**
                     * @desc    TP Function for TC_GEONW_PON_GUC_ALL_BV_03
                     */
                    function f_GEONW_PON_GUC_ALL_BV_03() runs on ItsMtc {
                        
                        // Local variables
                        var ItsGeoNetworking v_nodeB;
                        var ItsGeoNetworking v_nodeC;
                        
                        // Test control
                        if (not PICS_GN_GUC_FWD) {
                            log("*** " & testcasename() & ": PICS_GN_GUC_FWD required for executing the TC ***");
                            setverdict(inconc);
                            stop;
                        }
                        
                        // Test component configuration
                        f_cf03Up();
                        
                        // Preamble
                        
                        // Start components
                        v_nodeB := f_getComponent(c_compNodeB);
                        v_nodeC := f_getComponent(c_compNodeC);
                        v_nodeB.start(f_GEONW_PON_GUC_ALL_BV_03_nodeB());
                        v_nodeC.start(f_GEONW_PON_GUC_ALL_BV_03_nodeC());
                        
                        // Synchronization
                        f_serverSync2ClientsAndStop({c_prDone, c_tbDone});
                        
                        // Cleanup
                        f_cf03Down();
                        
                    } // end f_GEONW_PON_GUC_BV_03
                    
                    /**
                     * @desc    Behavior function for NodeB (TC_GEONW_PON_GUC_ALL_BV_03)
                     */
                    function f_GEONW_PON_GUC_ALL_BV_03_nodeB() runs on ItsGeoNetworking {
                        
                        // Local variables
                        var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA);
                        
                        // Preamble
                        f_prNeighbour();
                        
                        f_sendGeoNetMessage(
                            m_geoNwReq_withLinkLayerDestination(
                                m_geoNwPdu(
                                    m_geoNwUnicastPacket(
                                        v_longPosVectorNodeA,
                                        f_longPosVector2ShortPosVector(f_getPosition(c_compIut)),
                                        vc_localSeqNumber
                                    )
                                ),
                                -,
                                f_getIutMacAddress()
                            )
                        );
                        f_selfOrClientSyncAndVerdict(c_prDone, e_success);
                        
                        // Test Body
                        tc_ac.start;
                        alt {
                            [] geoNetworkingPort.receive(
                                mw_geoNwInd(
                                    mw_geoNwPdu(
                                        mw_geoNwUnicastPacketWithHl(
                                            mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)),
                                            ?,
                                            c_defaultHopLimit
                                        ),
                                        -,
                                        c_defaultHopLimit - 1
                                    )
                                )
                            ) {
                                tc_ac.stop;
                                log("*** " & testcasename() & ": PASS: Forwarded GUC received ***");
                                f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
                            }
                            [] geoNetworkingPort.receive(
                                mw_geoNwInd(
                                    mw_geoNwPdu(
                                        mw_geoNwUnicastPacket(
                                            ?,
                                            ?
                                        )
berge's avatar
berge committed
                            ) {
                                tc_ac.stop;
                                log("*** " & testcasename() & ": FAIL: Fields not correctly updated ***");
                                f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
                            }
                            [] tc_ac.timeout {
                                log("*** " & testcasename() & ": FAIL: GUC was not retransmitted ***");
                                f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
                            }
                        }
                        
                        // Postamble
                        f_poNeighbour();
                        
                    } // end f_GEONW_PON_GUC_ALL_BV_03_nodeB
                    
                    /**
                     * @desc    Behavior function for NodeC (TC_GEONW_PON_GUC_ALL_BV_03)
                     */
                    function f_GEONW_PON_GUC_ALL_BV_03_nodeC() runs on ItsGeoNetworking {
                        
                        // Local variables
                        var LongPosVector v_obsoleteLongPosVectorNodeA := f_getPosition(c_compNodeA);
                        
                        // Preamble
                        f_prNeighbour();
                        v_obsoleteLongPosVectorNodeA.timestamp_ := v_obsoleteLongPosVectorNodeA.timestamp_ - 1000;
                        v_obsoleteLongPosVectorNodeA.latitude := v_obsoleteLongPosVectorNodeA.latitude - 1;
                        f_selfOrClientSyncAndVerdict(c_prDone, e_success);
                        
                        // Test Body
                        f_sendGeoNetMessage(
                            m_geoNwReq_withLinkLayerDestination(
                                m_geoNwPdu(
                                    m_geoNwUnicastPacket(
                                        f_getPosition(c_compNodeC),
                                        f_longPosVector2ShortPosVector(v_obsoleteLongPosVectorNodeA),
                                        vc_localSeqNumber,
                                        c_defaultHopLimit
                                    ),
                                    -,
                                    c_defaultHopLimit
                                ),
                                -,
                                f_getIutMacAddress()
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
berge's avatar
berge committed
                        
                        // Postamble
                        f_poNeighbour();
                        
                    } // end f_GEONW_PON_GUC_ALL_BV_03_nodeC
                    
                } // end GEONW_PON_GUC_ALL_BV_03
                
                group GEONW_PON_GUC_ALL_BO_04 {
                    
                    /**
                     * @desc    TP Function for TC_GEONW_PON_GUC_ALL_BO_04
                     */
                    function f_GEONW_PON_GUC_ALL_BO_04() runs on ItsMtc {
                        
                        // Local variables
                        var ItsGeoNetworking v_nodeB;
                        var ItsGeoNetworking v_nodeC;
                        
                        // Test control
                        if (not PICS_GN_GUC_FWD) {
                            log("*** " & testcasename() & ": PICS_GN_GUC_FWD required for executing the TC ***");
                            setverdict(inconc);
                            stop;
                        }
                        
                        // Test component configuration
                        f_cf03Up();
                        
                        // Preamble
                        
                        // Start components
                        v_nodeB := f_getComponent(c_compNodeB);
                        v_nodeC := f_getComponent(c_compNodeC);
                        v_nodeB.start(f_GEONW_PON_GUC_ALL_BO_04_nodeB());
                        v_nodeC.start(f_GEONW_PON_GUC_ALL_BO_04_nodeC());
                        
                        // Synchronization
                        f_serverSync2ClientsAndStop({c_prDone, c_tbDone});
                        
                        // Cleanup
                        f_cf03Down();
                        
                    } // end f_GEONW_PON_GUC_BO_04
                    
                    /**
                     * @desc    Behavior function for NodeB (TC_GEONW_PON_GUC_ALL_BO_04)
                     */
                    function f_GEONW_PON_GUC_ALL_BO_04_nodeB() runs on ItsGeoNetworking {
                        
                        // Local variables
                        var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA);
                        
                        // Preamble
                        f_prNeighbour();
                        f_selfOrClientSyncAndVerdict(c_prDone, e_success);
                        
                        // Test Body
                        tc_noac.start;
                        alt {
                            [] geoNetworkingPort.receive(
                                mw_geoNwInd(
                                    mw_geoNwPdu(
                                        mw_geoNwUnicastPacket(
                                            mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)),
                                            ?
                                        ),
                                        -,
berge's avatar
berge committed
                            ) {
                                tc_noac.stop;
                                log("*** " & testcasename() & ": FAIL: Retransmitted GUC received ***");
                                f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
                            }
                            [] tc_noac.timeout {
                                log("*** " & testcasename() & ": PASS: GUC was not retransmitted ***");
                                f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
                            }
                        }
                        
                        // Postamble
                        f_poNeighbour();
                             
                    } // end f_GEONW_PON_GUC_ALL_BO_04_nodeB
                    
                    /**
                     * @desc    Behavior function for NodeC (TC_GEONW_PON_GUC_ALL_BO_04)
                     */
                    function f_GEONW_PON_GUC_ALL_BO_04_nodeC() runs on ItsGeoNetworking {
                        
                        // Local variables
                        var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA);
                        
                        // Preamble
                        f_prNeighbour();
                        f_selfOrClientSyncAndVerdict(c_prDone, e_success);
                        
                        // Test Body
                        f_sendGeoNetMessage(
                            m_geoNwReq_withLinkLayerDestination(
                                m_geoNwPdu(
                                    m_geoNwUnicastPacket(
                                        f_getPosition(c_compNodeC),
                                        f_longPosVector2ShortPosVector(v_longPosVectorNodeA),
                                        vc_localSeqNumber
                                    ),
                                    -,
                                    1
                                ),
                                -,
                                f_getIutMacAddress()
berge's avatar
berge committed
                        );
                        
						tc_noac.start;
						alt {
							[] geoNetworkingPort.receive(
								mw_geoNwInd(
									mw_geoNwPdu(
										mw_geoNwUnicastPacket(
											mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)),
											?
										),
										-,
										?
									)
								)
							) {
								tc_noac.stop;
								log("*** " & testcasename() & ": FAIL: Retransmitted GUC received ***");
								f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
							}
							[] tc_noac.timeout {
								log("*** " & testcasename() & ": PASS: GUC was not retransmitted ***");
								f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
							}
						}
                        
                        // Postamble
                        f_poNeighbour();
                        
                    } // end f_GEONW_PON_GUC_ALL_BO_04_nodeC
                    
                } // end GEONW_PON_GUC_ALL_BO_04
berge's avatar
berge committed
                 * @desc    TP Function for TC_GEONW_PON_GUC_ALL_BV_05
berge's avatar
berge committed
                function f_GEONW_PON_GUC_ALL_BV_05() runs on ItsGeoNetworking {
berge's avatar
berge committed
                    var template (value) GeoNetworkingPdu v_gnPacket;
                    var integer i;
                    var GnRawPayload v_sentRawPayload;
berge's avatar
berge committed
                    if (not PICS_GN_GUC_DST) {
                        log("*** " & testcasename() & ": PICS_GN_GUC_DST required for executing the TC ***");
                        setverdict(inconc);
                        stop;
                    }
                    
                    // Test component configuration
berge's avatar
berge committed
                    f_cf01Up();
berge's avatar
berge committed
                    // Test adapter configuration
berge's avatar
berge committed
                    f_prDefault();
                    f_selfOrClientSyncAndVerdict(c_prDone, e_success);
                    
                    // Test Body
berge's avatar
berge committed
                    v_gnPacket := m_geoNwPdu(
                                      m_geoNwUnicastPacket(
                                          f_getPosition(c_compNodeB),
                                          f_getIutShortPosVector(),
                                          vc_localSeqNumber
                                      )
                                  );
                    f_sendGeoNetMessage(m_geoNwReq_withLinkLayerDestination(v_gnPacket, -, f_getIutMacAddress()));
berge's avatar
berge committed
                    f_sleep(PX_TAC);
berge's avatar
berge committed
                    v_sentRawPayload := f_adaptPayloadForUtInd_m(v_gnPacket.gnPacket.packet.payload);
                    for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_sentRawPayload); i:=i+1) {
                        // empty on purpose 
                    }
                    if(i < lengthof(vc_utInds)) {
                        log("*** " & testcasename() & ": PASS: GN was transmitted to upper layer ***");
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
                    }
                    else {
                        log("*** " & testcasename() & ": FAIL: GN was not transmitted to upper layer ***");
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
                    }
berge's avatar
berge committed
                    // Postamble
                    f_poDefault();
                    f_cf01Down();
berge's avatar
berge committed
                } // end f_GEONW_PON_GUC_ALL_BV_05
                
				/**
				 * @desc    TP Function for TC_GEONW_PON_GUC_ALL_BV_06
				 */
				function f_GEONW_PON_GUC_ALL_BV_06() runs on ItsGeoNetworking {
                    
					// Local variables
					var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA);
					var template (value) GeoNetworkingPdu v_gnPacket;
					var integer i;
					var GnRawPayload v_sentRawPayload;
                    
					// Test control
					if (not PICS_GN_GUC_FWD) {
						log("*** " & testcasename() & ": PICS_GN_GUC_FWD required for executing the TC ***");
						setverdict(inconc);
						stop;
					}
                    
					// Test component configuration
					f_cf01Up();
                    
					// Test adapter configuration
                    
					// Preamble
					f_prDefault();
					f_selfOrClientSyncAndVerdict(c_prDone, e_success);
                    
					// Test Body
					v_gnPacket := m_geoNwPdu(
									  m_geoNwUnicastPacket(
										  f_getPosition(c_compNodeB),
					                      f_longPosVector2ShortPosVector(v_longPosVectorNodeA),
										  vc_localSeqNumber
									  )
								  );
					f_sendGeoNetMessage(m_geoNwReq_withLinkLayerDestination(v_gnPacket, -, f_getIutMacAddress()));
                    
					f_sleep(PX_TAC);
                    
					if(0 != lengthof(vc_utInds)) {
					    log("*** " & testcasename() & ": FAIL: GN was transmitted to upper layer ***");
					    f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
				    }
				    else {
					    log("*** " & testcasename() & ": PASS: GN was not transmitted to upper layer ***");
					    f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
				    }
                    
					// Postamble
					f_poDefault();
					f_cf01Down();
                    
				} // end f_GEONW_PON_GUC_ALL_BV_06
                
                group GEONW_PON_GUC_ALL_BO_08 {
                    
                    /**
                     * @desc    TP Function for TC_GEONW_PON_GUC_ALL_BO_08
                     */
                    function f_GEONW_PON_GUC_ALL_BO_08() runs on ItsMtc {
                        
                        // Local variables
                        var ItsGeoNetworking v_nodeB;
                        var ItsGeoNetworking v_nodeC;
                        
                        // Test control
                        if (not PICS_GN_GUC_DST) {
                            log("*** " & testcasename() & ": PICS_GN_GUC_DST required for executing the TC ***");
                            setverdict(inconc);
                            stop;
                        }
                        
                        // Test component configuration
                        f_cf03Up(c_compNodeB);
                        
                        // Preamble
                        
                        // Start components
                        v_nodeB := f_getComponent(c_compNodeB);
                        v_nodeC := f_getComponent(c_compNodeC);
                        v_nodeB.start(f_GEONW_PON_GUC_ALL_BO_08_nodeB());
                        v_nodeC.start(f_GEONW_PON_GUC_ALL_BO_08_nodeC());
                        
                        // Synchronization
                        f_serverSync2ClientsAndStop({c_prDone, c_tbDone});
                        
                        // Cleanup
                        f_cf03Down();
                        
                    } // end f_GEONW_PON_GUC_ALL_BO_08
berge's avatar
berge committed
                    /**
                     * @desc    Behavior function for NodeB (TC_GEONW_PON_GUC_ALL_BO_08)
                     */
                    function f_GEONW_PON_GUC_ALL_BO_08_nodeB() runs on ItsGeoNetworking {
                        
                        // Local variables
                        var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut);
                        var integer i;
                        var template (present) GeoNetworkingPdu v_gnPacket := m_geoNwPdu(
                            m_geoNwUnicastPacket(
                                f_getPosition(c_compNodeC),
                                f_longPosVector2ShortPosVector(v_longPosVectorIut),
                                vc_localSeqNumber
berge's avatar
berge committed
                            c_defaultHopLimit - 1
                        );
                        var GnRawPayload v_sentRawPayload;
                        
                        // Preamble
                        f_prNeighbour();
                        f_sleep(PX_TAC);
                        v_sentRawPayload := f_adaptPayloadForUtInd_m(valueof(v_gnPacket.gnPacket.packet.payload));
                        for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_sentRawPayload); i:=i+1) {
                            // empty on purpose 
                        }
                        if(i < lengthof(vc_utInds)) {
                            log("*** " & testcasename() & ": PASS: GN was transmitted to upper layer ***");
                            //flush received upper indications 
                            vc_utInds := {};
                            f_selfOrClientSyncAndVerdict(c_prDone, e_success);
                        }
                        else {
                            log("*** " & testcasename() & ": INCONC: GN was not transmitted to upper layer ***");
                            f_selfOrClientSyncAndVerdict(c_prDone, e_error);
                        }
                        
                        // Test Body
                        f_sendGeoNetMessage(m_geoNwReq_withLinkLayerDestination(valueof(v_gnPacket), -, f_getIutMacAddress()));
                       
                        f_sleep(PX_TAC);
                        
                        if(0 != lengthof(vc_utInds)) {
                            log("*** " & testcasename() & ": FAIL: GN was transmitted to upper layer ***");
                            f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
                        }
                        else {
                            log("*** " & testcasename() & ": PASS: GN was not transmitted to upper layer ***");
                            f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
                        }
                        
                        // Postamble
                        f_poNeighbour();
                        
                    } // end f_GEONW_PON_GUC_ALL_BO_08_nodeB
berge's avatar
berge committed
                    /**
                     * @desc    Behavior function for NodeC (TC_GEONW_PON_GUC_ALL_BO_08)
                     */
                    function f_GEONW_PON_GUC_ALL_BO_08_nodeC() runs on ItsGeoNetworking {
                        
                        // Local variables
                        var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut);
                        
                        // Preamble
                        f_prNeighbour();
                        f_sendGeoNetMessage(
                            m_geoNwReq_withLinkLayerDestination(
                                m_geoNwPdu(
                                    m_geoNwUnicastPacket(
                                        f_getPosition(c_compNodeC),
                                        f_longPosVector2ShortPosVector(v_longPosVectorIut),
                                        vc_localSeqNumber
                                    ),
                                    -,
                                    c_defaultHopLimit
                                ),
                                -,
                                f_getIutMacAddress()
                            )
                        );
                        f_selfOrClientSyncAndVerdict(c_prDone, e_success);
                        
                        // Test Body
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
                        
                        // Postamble
                        f_poNeighbour();
                        
                    } // end f_GEONW_PON_GUC_ALL_BO_08_nodeC
berge's avatar
berge committed
                } // end GEONW_PON_GUC_ALL_BO_08
berge's avatar
berge committed
			} // end gucAllForwardingAlgorithm

			group gucGreedyForwarding {

berge's avatar
berge committed
                 * @desc    TP Function for TC_GEONW_PON_GUC_GRD_BV_01
berge's avatar
berge committed
                function f_GEONW_PON_GUC_GRD_BV_01() runs on ItsGeoNetworking {
berge's avatar
berge committed
                    var LongPosVector v_longPosVectorNodeB;
berge's avatar
berge committed
                    if (not PICS_GN_GUC_SRC) {
                        log("*** " & testcasename() & ": PICS_GN_GUC_SRC required for executing the TC ***");
berge's avatar
berge committed
                    if ((f_getNonAreaForwardingAlgorithm() != e_greedy) and (f_getNonAreaForwardingAlgorithm() != e_unspecified)) {
                        log("*** " & testcasename() & ": PICS_GN_NON_AREA_FORWARDING_ALGORITHM == (e_greedy  or e_unspecified) required for executing the TC ***");
                        setverdict(inconc);
                        stop;
                    }
                                    
                    // Test component configuration
berge's avatar
berge committed
                    f_cf01Up();
                    v_longPosVectorNodeB := f_getPosition(c_compNodeB);
berge's avatar
berge committed
                    // Test adapter configuration
                    
                    // Preamble
                    f_prNeighbour();
                    f_selfOrClientSyncAndVerdict(c_prDone, e_success);
                    
                    // Test Body
berge's avatar
berge committed
                    if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeB.gnAddr)) ) {
                        log("*** " & testcasename() & ": INCONC: Trigger failed ***");
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
                    }
                    tc_ac.start;
                    alt {
                        [] geoNetworkingPort.receive(
berge's avatar
berge committed
                                mw_geoNwInd(
                                    mw_geoNwPdu(
                                        mw_geoNwUnicastPacket(
                                            mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeB)),
                                            ?
                                        )
                                    )
berge's avatar
berge committed
                            log("*** " & testcasename() & ": DEPV of the received GUC message correctly set ***");
                            f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
                        }
                        [] geoNetworkingPort.receive(
berge's avatar
berge committed
                                mw_geoNwInd(
                                    mw_geoNwPdu(
                                        mw_geoNwUnicastPacket(
                                            ?,
                                            ?
                                        )
berge's avatar
berge committed
                            log("*** " & testcasename() & ": DEPV of the received GUC message incorrectly set ***");
                            f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
                        }
                        [] tc_ac.timeout {
berge's avatar
berge committed
                            log("*** " & testcasename() & ": Expected message not received ***");
                            f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
berge's avatar
berge committed
                    f_cf01Down();
berge's avatar
berge committed
                } // end f_GEONW_PON_GUC_GRD_BV_01

                group GEONW_PON_GUC_GRD_BV_02 {
berge's avatar
berge committed
                    /**
                     * @desc    TP Function for TC_GEONW_PON_GUC_GRD_BV_02
                     */
                    function f_GEONW_PON_GUC_GRD_BV_02() runs on ItsMtc {
                        
                        // Local variables
                        var ItsGeoNetworking v_nodeB;
                        var ItsGeoNetworking v_nodeC;
                        var ItsGeoNetworking v_nodeD;
                        
                        // Test control
                        if (not PICS_GN_GUC_FWD) {
                            log("*** " & testcasename() & ": PICS_GN_GUC_FWD required for executing the TC ***");
                            setverdict(inconc);
                            stop;
                        }
                        if ((f_getNonAreaForwardingAlgorithm() != e_greedy) and (f_getNonAreaForwardingAlgorithm() != e_unspecified)) {
                            log("*** " & testcasename() & ": PICS_GN_NON_AREA_FORWARDING_ALGORITHM == (e_greedy  or e_unspecified) required for executing the TC ***");
                            setverdict(inconc);
                            stop;
                        }
                        
                        // Test component configuration
                        f_cf04Up();
                        
                        // Preamble
                        
                        // Start components
                        v_nodeB := f_getComponent(c_compNodeB);
                        v_nodeC := f_getComponent(c_compNodeC);
                        v_nodeD := f_getComponent(c_compNodeD);
                        v_nodeB.start(f_GEONW_PON_GUC_GRD_BV_02_nodeB());
                        v_nodeC.start(f_GEONW_PON_GUC_GRD_BV_02_nodeC());
                        v_nodeD.start(f_GEONW_PON_GUC_GRD_BV_02_nodeD());
                        
                        // Synchronization
                        f_serverSync3ClientsAndStop({c_prDone, c_tbDone});
                        
                        // Cleanup
                        f_cf04Down();
                        
                    } // end f_GEONW_PON_GUC_GRD_BV_02
berge's avatar
berge committed
                    /**
                     * @desc    Behavior function for NodeB (TC_GEONW_PON_GUC_GRD_BV_02)
                     */
                    function f_GEONW_PON_GUC_GRD_BV_02_nodeB() runs on ItsGeoNetworking {
                        
                        // Local variables
                        var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA);
                        
                        // Preamble
                        f_prNeighbour();
                        f_selfOrClientSyncAndVerdict(c_prDone, e_success);
                        
                        // Test Body
                        tc_ac.start;
                        alt {
                            [] geoNetworkingPort.receive(
                                mw_geoNwInd(
                                    mw_geoNwPdu(
                                        mw_geoNwUnicastPacket(
                                            mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)),
                                            ?
                                        )
                                    )
                                )
                            ) {
                                tc_ac.stop;
                                log("*** " & testcasename() & ": PASS: Forwarded GUC received ***");
                                f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
                            }
                            [] tc_ac.timeout {
                                log("*** " & testcasename() & ": FAIL: GUC was not forwarded ***");
                                f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
                            }
                        }
                        
                        // Postamble
                        f_poNeighbour();
                        
                    } // end f_GEONW_PON_GUC_GRD_BV_02_nodeB
berge's avatar
berge committed
                    /**
                     * @desc    Behavior function for NodeC (TC_GEONW_PON_GUC_GRD_BV_02)
                     */
                    function f_GEONW_PON_GUC_GRD_BV_02_nodeC() runs on ItsGeoNetworking {
                        
                        // Local variables
                        
                        // Preamble
                        f_prNeighbour();
                        f_selfOrClientSyncAndVerdict(c_prDone, e_success);
                        
                        // Test Body
                        f_sendGeoNetMessage(
                            m_geoNwReq_withLinkLayerDestination(
                                m_geoNwPdu(
                                    m_geoNwUnicastPacket(
                                        f_getPosition(c_compNodeC),
                                        f_longPosVector2ShortPosVector(f_getPosition(c_compNodeA)),
                                        vc_localSeqNumber
                                    ),
                                    -,
berge's avatar
berge committed
                                f_getIutMacAddress()
                            )
                        );
                        
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
                        
                        // Postamble
                        f_poNeighbour();
                        
                    } // end f_GEONW_PON_GUC_GRD_BV_02_nodeC
berge's avatar
berge committed
                    /**
                     * @desc    Behavior function for NodeD (TC_GEONW_PON_GUC_GRD_BV_02)
                     */
                    function f_GEONW_PON_GUC_GRD_BV_02_nodeD() runs on ItsGeoNetworking {
                        
                        // Local variables
                        
                        // Preamble
                        f_prNeighbour();
                        f_selfOrClientSyncAndVerdict(c_prDone, e_success);
                        
                        // Test Body
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
                        
                        // Postamble
                        f_poNeighbour();
                        
                    } // end f_GEONW_PON_GUC_GRD_BV_02_nodeD
berge's avatar
berge committed
                } // end GEONW_PON_GUC_GRD_BV_02

                group GEONW_PON_GUC_GRD_BO_07 {
berge's avatar
berge committed
                    /**
                     * @desc    TP Function for TC_GEONW_PON_GUC_GRD_BO_07
                     */
                    function f_GEONW_PON_GUC_GRD_BO_07() runs on ItsMtc {
                        
                        // Local variables
                        var ItsGeoNetworking v_nodeB;
                        var ItsGeoNetworking v_nodeC;
                        
                        // Test control
                        if (not PICS_GN_GUC_FWD) {
                            log("*** " & testcasename() & ": PICS_GN_GUC_FWD required for executing the TC ***");
                            setverdict(inconc);
                            stop;
                        }
                        if ((f_getNonAreaForwardingAlgorithm() != e_greedy) and (f_getNonAreaForwardingAlgorithm() != e_unspecified)) {
                            log("*** " & testcasename() & ": PICS_GN_NON_AREA_FORWARDING_ALGORITHM == (e_greedy  or e_unspecified) required for executing the TC ***");
                            setverdict(inconc);
                            stop;
                        }
                        
                        // Test component configuration
                        f_cf03Up();
                        
                        // Preamble
                        
                        // Start components
                        v_nodeB := f_getComponent(c_compNodeB);
                        v_nodeC := f_getComponent(c_compNodeC);
                        v_nodeB.start(f_GEONW_PON_GUC_GRD_BO_07_nodeB());
                        v_nodeC.start(f_GEONW_PON_GUC_GRD_BO_07_nodeC());
                        
                        // Synchronization
                        f_serverSync2ClientsAndStop({c_prDone, c_tbDone});
                        
                        // Cleanup
                        f_cf03Down();
                        
                    } // end f_GEONW_PON_GUC_GRD_BO_07
berge's avatar
berge committed
                    /**
                     * @desc    Behavior function for NodeB (TC_GEONW_PON_GUC_GRD_BO_07)
                     */
                    function f_GEONW_PON_GUC_GRD_BO_07_nodeB() runs on ItsGeoNetworking {
                        
                        // Local variables
                        var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA);
                        
                        // Preamble
                        f_prNeighbour();
                        tc_ac.start;
                        alt {
                            [] geoNetworkingPort.receive(
                                mw_geoNwInd(
                                    mw_geoNwPdu(
                                        mw_geoNwUnicastPacket(
                                            mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)),
                                            ?
                                        )
                                    )
                                )
                            ) {
                                tc_ac.stop;
                                log("*** " & testcasename() & ": INFO: First GUC forwarded ***");
                                f_selfOrClientSyncAndVerdict(c_prDone, e_success);
                            }
                            [] tc_ac.timeout {
                                log("*** " & testcasename() & ": INCONC: First GUC was not forwarded ***");
                                f_selfOrClientSyncAndVerdict(c_prDone, e_timeout);
                            }
                        }
                        
                        // Test Body
                        f_sendGeoNetMessage(