ItsGeoNetworking_TpFunctions.ttcn 806 KB
Newer Older
berge's avatar
berge committed
                        
						// Test Body                        
						tc_ac.start;
						alt {
							[] geoNetworkingPort.receive(
								mw_geoNwInd(
									mw_geoNwPdu(
										mw_geoNwUnicastPacket(
											mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(p_longPosVectorNodeA)),
											?
										)
									)
								)
							) {
								tc_ac.stop;
								log("*** " & testcasename() & ": PASS: Re-broadcasted 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_CBF_BV_22_nodeB
berge's avatar
berge committed
					/**
					 * @desc    Behavior function for NodeC (TC_GEONW_PON_GUC_CBF_BV_22)
					 * @param   p_longPosVectorNodeA    Position vector of NodeA
					 */
					function f_GEONW_PON_GUC_CBF_BV_22_nodeC(in LongPosVector p_longPosVectorNodeA) runs on ItsGeoNetworking {
                        
						// Local variables
                        
						// 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(p_longPosVectorNodeA)),
											?
										)
									)
								)
							) {
								tc_ac.stop;
								log("*** " & testcasename() & ": PASS: Re-broadcasted 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_CBF_BV_22_nodeC

					/**
					 * @desc    Behavior function for NodeD (TC_GEONW_PON_GUC_CBF_BV_22)
					 * @param   p_longPosVectorNodeA    Position vector of NodeA
					 */
					function f_GEONW_PON_GUC_CBF_BV_22_nodeD(in LongPosVector p_longPosVectorNodeA) runs on ItsGeoNetworking {
                            
						// Local variables
						var LongPosVector v_longPosVectorNodeD := f_getPosition(c_compNodeD);
						timer t_toCbf := int2float(f_getCbfMaxTime()) * 0.95 / 1000.0;
                            
						// Preamble
						v_longPosVectorNodeD.pai := int2bit(0,1);
					    f_changePositon(c_compNodeD, v_longPosVectorNodeD); 
					    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(p_longPosVectorNodeA),
										vc_localSeqNumber
									),
									-,
									c_defaultHopLimit
								),
								-,
								f_getIutMacAddress()
							)
						);
                            
						t_toCbf.start;                    
						tc_ac.start;
						alt {
							[] geoNetworkingPort.receive(
								mw_geoNwInd(
									mw_geoNwPdu(
										mw_geoNwUnicastPacket(
											mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(p_longPosVectorNodeA)),
											?
										)
									)
								)
							) {
								tc_ac.stop;                           
                                    
								if(t_toCbf.running) {                               
									t_toCbf.stop;
									log("*** " & testcasename() & ": FAIL: GUC retransmitted before CBF timer expiration ***");
									f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
								}
								else {
									log("*** " & testcasename() & ": PASS: GUC message received ***");
									f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
								}
							}
							[] t_toCbf.timeout {
								log("*** " & testcasename() & ": INFO: GUC timer elapsed ***");
								repeat;
							}
							[] tc_ac.timeout {
								log("*** " & testcasename() & ": FAIL: GUC message not received ***");
								f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
							}
						}
                            
						// Postamble
						f_poDefault();
                            
					} // end f_GEONW_PON_GUC_CBF_BV_22_nodeD                        
berge's avatar
berge committed
				} // end GEONW_PON_GUC_CBF_BV_22

            } // end gucContentionBasedForwarding
                        
        } // end geoGeoUnicast
        
        // 6.2.2.9
        group geoGeoBroadcast {
berge's avatar
berge committed
			group gbcNonAreaForwarding {
            
				group gbcNonAreaAllForwardingAlgorithm {
					
					group GEONW_PON_GBC_NONAREA_ALL_BV_03 {
                        
						/**
						 * @desc    TP Function for TC_GEONW_PON_GBC_NONAREA_ALL_BV_03
						 */
						function f_GEONW_PON_GBC_NONAREA_ALL_BV_03() runs on ItsMtc {
                            
							// Local variables
							var ItsGeoNetworking v_nodeB;
							var ItsGeoNetworking v_nodeC;
                            
							// Test control
							if (not PICS_GN_GBC_FWD) {
								log("*** " & testcasename() & ": PICS_GN_GBC_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_GBC_NONAREA_ALL_BV_03_nodeB());
							v_nodeC.start(f_GEONW_PON_GBC_NONAREA_ALL_BV_03_nodeC());
                            
							// Synchronization
							f_serverSync2ClientsAndStop({c_prDone, c_tbDone});
                            
							// Cleanup
							f_cf03Down();
                            
						} // end f_GEONW_PON_GBC_NONAREA_ALL_BV_03
                        
						/**
						 * @desc    Behavior function for NodeB (TC_GEONW_PON_GBC_NONAREA_ALL_BV_03)
						 */
						function f_GEONW_PON_GBC_NONAREA_ALL_BV_03_nodeB() runs on ItsGeoNetworking {
                            
							// Local variables
							var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC);
                            
							// Preamble
							f_prNeighbour();
							f_selfOrClientSyncAndVerdict(c_prDone, e_success);
                            
							// Test Body
							tc_ac.start;
							alt {
								[] a_receiveGeoBroadcastWithAreaWithHopLimit(
									mw_longPosVectorPosition(v_longPosVectorNodeC),
									?,
									f_getGeoBroadcastArea(c_area2),
									c_defaultHopLimit - 1,
									c_defaultHopLimit) {
									tc_ac.stop;
									log("*** " & testcasename() & ": PASS: GBC message correctly retransmitted ***");
									f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
								}
								[] a_receiveGeoBroadcastWithAreaWithHopLimit(
									mw_longPosVectorPosition(v_longPosVectorNodeC),
									?,
									f_getGeoBroadcastArea(c_area2),
									?,
									?) {
									tc_ac.stop;
									log("*** " & testcasename() & ": FAIL: GBC message fields not updated ***");
									f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
								}
								[] tc_ac.timeout {
									log("*** " & testcasename() & ": INCONC: GBC message not retransmitted ***");
									f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
								}
							}
                            
							// Postamble
							f_poNeighbour();
                            
						} // end f_GEONW_PON_GBC_NONAREA_ALL_BV_03_nodeB
                        
						/**
						 * @desc    Behavior function for NodeC (TC_GEONW_PON_GBC_NONAREA_ALL_BV_03)
						 */
						function f_GEONW_PON_GBC_NONAREA_ALL_BV_03_nodeC() runs on ItsGeoNetworking {
                            
							// Local variables
							var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC);
							var GeoNetworkingInd v_msgInd;
                            
							// Preamble
							f_prNeighbour();
							f_selfOrClientSyncAndVerdict(c_prDone, e_success);
                            
							// Test Body
							f_sendGeoNetMessage(
								m_geoNwReq_linkLayerBroadcast(
									m_geoNwPdu(
										m_geoNwBroadcastPacket(
											v_longPosVectorNodeC,
											vc_localSeqNumber,
											f_getGeoBroadcastArea(c_area2),
											c_defaultHopLimit
										),
										-,
										c_defaultHopLimit
									)
								)
							);
							f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
                            
							// Postamble
							f_poNeighbour();
                            
						} // end f_GEONW_PON_GBC_NONAREA_ALL_BV_03_nodeC
                        
					} // end GEONW_PON_GBC_NONAREA_ALL_BV_03
            
					group GEONW_PON_GBC_NONAREA_ALL_BV_04 {
                        
						/**
						 * @desc    TP Function for TC_GEONW_PON_GBC_NONAREA_ALL_BV_04
						 */
						function f_GEONW_PON_GBC_NONAREA_ALL_BV_04() runs on ItsMtc {
                            
							// Local variables
							var ItsGeoNetworking v_nodeB;
							var ItsGeoNetworking v_nodeC;
                            
							// Test control
							if (not PICS_GN_GBC_FWD) {
								log("*** " & testcasename() & ": PICS_GN_GBC_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_GBC_NONAREA_ALL_BV_04_nodeB());
							v_nodeC.start(f_GEONW_PON_GBC_NONAREA_ALL_BV_04_nodeC());
                            
							// Synchronization
							f_serverSync2ClientsAndStop({c_prDone, c_tbDone});
                            
							// Cleanup
							f_cf03Down();
                            
						} // end f_GEONW_PON_GBC_NONAREA_ALL_BV_04
                        
						/**
						 * @desc    Behavior function for NodeB (TC_GEONW_PON_GBC_NONAREA_ALL_BV_04)
						 */
						function f_GEONW_PON_GBC_NONAREA_ALL_BV_04_nodeB() runs on ItsGeoNetworking {
                            
							// Local variables
							var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC);
                            
							// Preamble
							f_prNeighbour();
							f_selfOrClientSyncAndVerdict(c_prDone, e_success);
                            
							// Test Body
							tc_noac.start;
							alt {
								[] a_receiveGeoBroadcastWithArea(
									mw_longPosVectorPosition(v_longPosVectorNodeC),
									?,
									f_getGeoBroadcastArea(c_area2)) {
									tc_noac.stop;
									log("*** " & testcasename() & ": FAIL: GBC message retransmitted ***");
									f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
								}
								[] tc_noac.timeout {
									log("*** " & testcasename() & ": PASS: GBC message not retransmitted ***");
									f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
								}
							}
                            
							// Postamble
							f_poNeighbour();
                            
						} // end f_GEONW_PON_GBC_NONAREA_ALL_BV_04_nodeB
                        
						/**
						 * @desc    Behavior function for NodeC (TC_GEONW_PON_GBC_NONAREA_ALL_BV_04)
						 */
						function f_GEONW_PON_GBC_NONAREA_ALL_BV_04_nodeC() runs on ItsGeoNetworking {
                            
							// Local variables
							var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC);
                            
							// Preamble
							f_prNeighbour();
							f_selfOrClientSyncAndVerdict(c_prDone, e_success);
                            
							// Test Body
							f_sendGeoNetMessage(
								m_geoNwReq_linkLayerBroadcast(
									m_geoNwPdu(
										m_geoNwBroadcastPacket(
											v_longPosVectorNodeC,
											vc_localSeqNumber,
											f_getGeoBroadcastArea(c_area2)
										),
										-,
										c_hopLimit1
									)
								)
							);
                            
							tc_noac.start;
							alt {
								[] a_receiveGeoBroadcastWithArea(
									mw_longPosVectorPosition(v_longPosVectorNodeC),
									?,
									f_getGeoBroadcastArea(c_area2)) {
									tc_noac.stop;
									log("*** " & testcasename() & ": FAIL: GBC message retransmitted ***");
									f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
								}
								[] tc_noac.timeout {
									log("*** " & testcasename() & ": PASS: GBC message not retransmitted ***");
									f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
								}
							}
                            
							// Postamble
							f_poNeighbour();
                            
						} // end f_GEONW_PON_GBC_NONAREA_ALL_BV_04_nodeC
                        
					} // end GEONW_PON_GBC_NONAREA_ALL_BV_04

                    /**
                     * @desc    TP Function for TC_GEONW_PON_GBC_NONAREA_ALL_BV_06
                     */
                    function f_GEONW_PON_GBC_NONAREA_ALL_BV_06() runs on ItsGeoNetworking {
                        
                        // Local variables
                        var LongPosVector v_longPosVectorNodeB;
                        var template (value) GeoNetworkingPdu v_gnPacket;
                        var integer i;
                        var GnRawPayload v_sentRawPayload;
                        
                        // Test control
                        if (not PICS_GN_GBC_FWD) {
                            log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***");
                            setverdict(inconc);
                            stop;
berge's avatar
berge committed
                        // Test component configuration
                        f_cf01Up();
                        v_longPosVectorNodeB := f_getPosition(c_compNodeB);
                        
                        // Test adapter configuration
                        
                        // Preamble
                        f_prNeighbour();
                        f_selfOrClientSyncAndVerdict(c_prDone, e_success);
                        
                        // Test Body
                        v_gnPacket := m_geoNwPdu(m_geoNwBroadcastPacket(
                                                    v_longPosVectorNodeB,
                                                    vc_localSeqNumber,
                                                    f_getGeoBroadcastArea(c_area2)
                                                )
                                            );
                        f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_gnPacket));
                        
                        f_sleep(PX_TAC);
                        
                        if(0 != lengthof(vc_utInds)) {
                            log("*** " & testcasename() & ": FAIL: GN was transmitted to upper layer ***");
                            f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
                        }
berge's avatar
berge committed
                        else {
                            log("*** " & testcasename() & ": PASS: GN was NOT transmitted to upper layer ***");
                            f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
                        }
                        
                        // Postamble
                        f_poNeighbour();
                        f_cf01Down();
                        
                    } // end f_GEONW_PON_GBC_NONAREA_ALL_BV_06

                    group GEONW_PON_GBC_NONAREA_ALL_BO_09 {
                        
                        /**
                         * @desc    TP Function for TC_GEONW_PON_GBC_NONAREA_ALL_BO_09
                         */
                        function f_GEONW_PON_GBC_NONAREA_ALL_BO_09() runs on ItsMtc {
                            
                            // Local variables
                            var ItsGeoNetworking v_nodeB;
                            var ItsGeoNetworking v_nodeC;
                            var ItsGeoNetworking v_nodeD;
                            var UInt16 v_distanceTooBig;
                            
                            // Test control
                            if (not PICS_GN_GBC_FWD) {
                                log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***");
                                setverdict(inconc);
                                stop;
                            }
                            
                            // Test component configuration
                            f_cf04Up();
                            v_distanceTooBig := float2int(1.1 * f_radiusFromCircularArea(f_getGnMaxAreaSize()*c_squareKm));
                            
                            // 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_GBC_NONAREA_ALL_BO_09_nodeB(v_distanceTooBig));
                            v_nodeC.start(f_GEONW_PON_GBC_NONAREA_ALL_BO_09_nodeC(v_distanceTooBig));
                            v_nodeD.start(f_GEONW_PON_GBC_NONAREA_ALL_BO_09_nodeD(v_distanceTooBig));
                            
                            // Synchronization
                            f_serverSync3ClientsAndStop({c_prDone, c_tbDone});
                            
                            // Cleanup
                            f_cf04Down();
                            
                        } // end f_GEONW_PON_GBC_NONAREA_ALL_BO_09
                        
                        /**
                         * @desc    Behavior function for NodeB (TC_GEONW_PON_GBC_BO_19)
                         */
                        function f_GEONW_PON_GBC_NONAREA_ALL_BO_09_nodeB(in UInt16 p_distanceTooBig) runs on ItsGeoNetworking {
                            
                            // Local variables
                            var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC);
                            var GeoArea v_areaTooBig;
                            
                            // Preamble
                            f_prNeighbour();
                            v_areaTooBig := f_computeCircularArea(
                                f_getPosition(c_compNodeB), 
                                p_distanceTooBig
                            );
                            f_selfOrClientSyncAndVerdict(c_prDone, e_success);
                            
                            // Test Body
                            tc_noac.start;
                            alt {
                                [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea(
                                        mw_longPosVectorPosition(v_longPosVectorNodeC),
                                        ?,
                                        f_geoArea2GeoBroadcastArea(v_areaTooBig)
                                    )))) {
                                    tc_noac.stop;
                                    log("*** " & testcasename() & ": FAIL: GBC message retransmitted ***");
                                    f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
                                }
                                [] tc_noac.timeout {
                                    log("*** " & testcasename() & ": PASS: GBC message not retransmitted ***");
                                    f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
                                }
                            }
                            
                            // Postamble
                            f_poNeighbour();
                            
                        } // end f_GEONW_PON_GBC_NONAREA_ALL_BO_09_nodeB
                        
                        /**
                         * @desc    Behavior function for NodeC (TC_GEONW_PON_GBC_NONAREA_ALL_BO_09)
                         */
                        function f_GEONW_PON_GBC_NONAREA_ALL_BO_09_nodeC(in UInt16 p_distanceTooBig) runs on ItsGeoNetworking {
                            
                            // Local variables
                            var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC);
                            var GeoArea v_areaTooBig;
                            
                            // Preamble
                            f_prNeighbour();
                            v_areaTooBig := f_computeCircularArea(
                                f_getPosition(c_compNodeB), 
                                p_distanceTooBig
                            );
                            f_sendGeoNetMessage(
                                m_geoNwReq_linkLayerBroadcast(
                                    m_geoNwPdu(
                                        m_geoNwBroadcastPacket(
                                            v_longPosVectorNodeC,
                                            vc_localSeqNumber,
                                            f_geoArea2GeoBroadcastArea(v_areaTooBig)
                                        )
berge's avatar
berge committed
                            );
                            f_selfOrClientSyncAndVerdict(c_prDone, e_success);
                            
                            // Test Body
                            f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
berge's avatar
berge committed
                            
                            // Postamble
                            f_poNeighbour();
                            
                        } // end f_GEONW_PON_GBC_NONAREA_ALL_BO_09_nodeC
                        
                        /**
                         * @desc    Behavior function for NodeD (TC_GEONW_PON_GBC_NONAREA_ALL_BO_09)
                         */
                        function f_GEONW_PON_GBC_NONAREA_ALL_BO_09_nodeD(in UInt16 p_distanceTooBig) runs on ItsGeoNetworking {
                            
                            // Local variables
                            var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC);
                            var GeoArea v_areaTooBig;
                            
                            // Preamble
                            f_prNeighbour();
                            v_areaTooBig := f_computeCircularArea(
                                f_getPosition(c_compNodeB), 
                                p_distanceTooBig
                            );
                            f_selfOrClientSyncAndVerdict(c_prDone, e_success);
                            
                            // Test Body
                            tc_noac.start;
                            alt {
                                [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea(
                                        mw_longPosVectorPosition(v_longPosVectorNodeC),
                                        ?,
                                        f_geoArea2GeoBroadcastArea(v_areaTooBig)
                                    )))) {
                                    tc_noac.stop;
                                    log("*** " & testcasename() & ": FAIL: GBC message forwarded ***");
                                    f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
                                }
                                [] tc_noac.timeout {
                                    log("*** " & testcasename() & ": PASS: GBC message not forwarded ***");
                                    f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
                                }
                            }
                            
                            // Postamble
                            f_poNeighbour();
                            
                        } // end f_GEONW_PON_GBC_NONAREA_ALL_BO_09_nodeD
                        
                    } // end GEONW_PON_GBC_NONAREA_ALL_BO_09
berge's avatar
berge committed
                    group GEONW_PON_GBC_NONAREA_ALL_BO_10 {
                        
                        /**
                         * @desc    TP Function for TC_GEONW_PON_GBC_NONAREA_ALL_BO_10
                         */
                        function f_GEONW_PON_GBC_NONAREA_ALL_BO_10() runs on ItsMtc {
                            
                            // Local variables
                            var ItsGeoNetworking v_nodeB;
                            var ItsGeoNetworking v_nodeC;
                            var ItsGeoNetworking v_nodeD;
                            
                            // Test control
                            if (not PICS_GN_GBC_FWD) {
                                log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***");
                                setverdict(inconc);
                                stop;
                            }
                            
        //                    if (f_getCbfMinTime() < 300) {
        //                        log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_CBF_MIN_TIME >= 300 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_GBC_NONAREA_ALL_BO_10_nodeB());
                            v_nodeC.start(f_GEONW_PON_GBC_NONAREA_ALL_BO_10_nodeC());
                            v_nodeD.start(f_GEONW_PON_GBC_NONAREA_ALL_BO_10_nodeD());
                            
                            // Synchronization
                            f_serverSync3ClientsAndStop({c_prDone, c_tbDone});
                            
                            // Cleanup
                            f_cf04Down();
                            
                        } // end f_GEONW_PON_GBC_NONAREA_ALL_BO_10
                        
                        /**
                         * @desc    Behavior function for NodeB (TC_GEONW_PON_GBC_NONAREA_ALL_BO_10)
                         */
                        function f_GEONW_PON_GBC_NONAREA_ALL_BO_10_nodeB() runs on ItsGeoNetworking {
                            
                            // Local variables
                            
                            // Preamble
                            f_prNeighbour();
                            f_selfOrClientSyncAndVerdict(c_prDone, e_success);
                            
                            // Test Body                    
                            tc_noac.start;
                            alt {
                                [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(?))) {
                                    tc_noac.stop;
                                    log("*** " & testcasename() & ": FAIL: GBC received and not discarded ***");
                                    f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
                                }
                                [] tc_noac.timeout {
                                    log("*** " & testcasename() & ": PASS: GBC message discarded ***");
                                    f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
                                }
                            }
                            
                            // Postamble
                            f_poNeighbour();
                            
                        } // end f_GEONW_PON_GBC_NONAREA_ALL_BO_10_nodeB
                        
                        /**
                         * @desc    Behavior function for NodeC (TC_GEONW_PON_GBC_NONAREA_ALL_BO_10)
                         */
                        function f_GEONW_PON_GBC_NONAREA_ALL_BO_10_nodeC() runs on ItsGeoNetworking {
                            
                            // Local variables
                            
                            // Preamble
                            f_prNeighbour();
                            f_selfOrClientSyncAndVerdict(c_prDone, e_success);
                            
                            // Test Body
                            tc_noac.start;
                            alt {
                                [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(?))) {
                                    tc_noac.stop;
                                    log("*** " & testcasename() & ": FAIL: GBC received and not discarded ***");
                                    f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
                                }
                                [] tc_noac.timeout {
                                    log("*** " & testcasename() & ": PASS: GBC message discarded ***");
                                    f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
                                }
                            }
                            
                            // Postamble
                            f_poNeighbour();
                            
                        } // end f_GEONW_PON_GBC_NONAREA_ALL_BO_10_nodeC
                        
                        /**
                         * @desc    Behavior function for NodeD (TC_GEONW_PON_GBC_NONAREA_ALL_BO_10)
                         */
                        function f_GEONW_PON_GBC_NONAREA_ALL_BO_10_nodeD() runs on ItsGeoNetworking {
                            
                            // Local variables
                            var LongPosVector v_longPosVectorNodeD := f_getPosition(c_compNodeD);
                            
                            // Preamble
                            f_prNeighbour();
                            f_selfOrClientSyncAndVerdict(c_prDone, e_success);
                            
                            // Test Body
                            f_sendGeoNetMessage(
                                m_geoNwReq_linkLayerBroadcast(
                                    m_geoNwPdu(
                                        m_geoNwBroadcastPacket(
                                            v_longPosVectorNodeD,
                                            vc_localSeqNumber,
                                            f_getGeoBroadcastArea(c_area2)
                                        )
berge's avatar
berge committed
                            );
                            
                            tc_noac.start;
                            alt {
                                [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(?))) {
                                    tc_noac.stop;
                                    log("*** " & testcasename() & ": FAIL: GBC received and not discarded ***");
                                    f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
                                }
                                [] tc_noac.timeout {
                                    log("*** " & testcasename() & ": PASS: GBC message discarded ***");
                                    f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
                                }
                            }
                            
                            // Postamble
                            f_poNeighbour();
                            
                        } // end f_GEONW_PON_GBC_NONAREA_ALL_BO_10_nodeD
                        
                    } // end GEONW_PON_GBC_NONAREA_ALL_BO_10
            
				} // end gbcNonAreaAllForwardingAlgorithm
            
				group gbcNonAreaGreedyForwarding {
					
                    group GEONW_PON_GBC_NONAREA_GRD_BV_01 {
                        
                        /**
                         * @desc    TP Function for TC_GEONW_PON_GBC_NONAREA_GRD_BV_01
                         */
                        function f_GEONW_PON_GBC_NONAREA_GRD_BV_01() runs on ItsMtc {
                            
                            // Local variables
                            var ItsGeoNetworking v_nodeB;
                            var ItsGeoNetworking v_nodeD;
                            
                            // Test control
                            if (not PICS_GN_GBC_SRC) {
                                log("*** " & testcasename() & ": PICS_GN_GBC_SRC 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_cf02Up();
                            
                            // Preamble
                            
                            // Start components
                            v_nodeB := f_getComponent(c_compNodeB);
                            v_nodeD := f_getComponent(c_compNodeD);
                            v_nodeB.start(f_GEONW_PON_GBC_NONAREA_GRD_BV_02_nodeB());
                            v_nodeD.start(f_GEONW_PON_GBC_NONAREA_GRD_BV_02_nodeD());
                            
                            // Synchronization
                            f_serverSync2ClientsAndStop({c_prDone, c_tbDone});
                            
                            // Cleanup
                            f_cf02Down();
                            
                        } // end f_GEONW_PON_GBC_NONAREA_GRD_BV_01
                        
                        /**
                         * @desc    Behavior function for NodeB (TC_GEONW_PON_GBC_NONAREA_GRD_BV_01)
                         */
                        function f_GEONW_PON_GBC_NONAREA_GRD_BV_01_nodeB() runs on ItsGeoNetworking {
                            
                            // Local variables
                            var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut);
                            
                            // Preamble
                            f_prNeighbour();
                            f_selfOrClientSyncAndVerdict(c_prDone, e_success);
                            
                            // Test Body
                            if ( not f_utTriggerEvent(m_generateGeoBroadcastMessage(f_getArea(c_area2))) ) {
                                log("*** " & testcasename() & ": INCONC: Trigger failed ***");
                                f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
                            }
                            
                            tc_ac.start;
                            alt {
                                [] a_receiveGeoBroadcastWithArea(
                                        mw_longPosVectorPosition(v_longPosVectorIut),
                                        ?,
                                        f_getGeoBroadcastArea(c_area2)) {
                                    tc_ac.stop;
                                    log("*** " & testcasename() & ": PASS: GBC message received correctly ***");
                                    f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
                                }
                                [] tc_ac.timeout {
                                    log("*** " & testcasename() & ": FAIL: GBC message not received ***");
                                    f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
                                }
                            }
                            
                            // Postamble
                            f_poNeighbour();
                            
                        } // end f_GEONW_PON_GBC_NONAREA_GRD_BV_01_nodeB
                        
                        /**
                         * @desc    Behavior function for NodeD (TC_GEONW_PON_GBC_NONAREA_GRD_BV_01)
                         */
                        function f_GEONW_PON_GBC_NONAREA_GRD_BV_01_nodeD() runs on ItsGeoNetworking {
                            
                            // Local variables
                            var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut);
                            
                            // Preamble
                            f_prNeighbour();
                            f_selfOrClientSyncAndVerdict(c_prDone, e_success);
                            
                            // Test Body
                            tc_noac.start;
                            alt {
                                [] a_receiveGeoBroadcastWithArea(
                                        mw_longPosVectorPosition(v_longPosVectorIut),
                                        ?,
                                        f_getGeoBroadcastArea(c_area2)) {
                                    tc_noac.stop;
                                    log("*** " & testcasename() & ": FAIL: received GBC message ***");
                                    f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
                                }
                                [] tc_noac.timeout {
                                    log("*** " & testcasename() & ": PASS: GBC message not received ***");
                                    f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
                                }
                            }
                            
                            // Postamble
                            f_poNeighbour();
                            
                        } // end f_GEONW_PON_GBC_NONAREA_GRD_BV_01_nodeD
                        
                    } // end GEONW_PON_GBC_NONAREA_GRD_BV_01
berge's avatar
berge committed
                    group GEONW_PON_GBC_NONAREA_GRD_BV_02 {
                        
                        /**
                         * @desc    TP Function for TC_GEONW_PON_GBC_NONAREA_GRD_BV_02
                         */
                        function f_GEONW_PON_GBC_NONAREA_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_GBC_FWD) {
                                log("*** " & testcasename() & ": PICS_GN_GBC_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_GBC_NONAREA_GRD_BV_02_nodeB());
                            v_nodeC.start(f_GEONW_PON_GBC_NONAREA_GRD_BV_02_nodeC());
                            v_nodeD.start(f_GEONW_PON_GBC_NONAREA_GRD_BV_02_nodeD());
                            
                            // Synchronization
                            f_serverSync3ClientsAndStop({c_prDone, c_tbDone});
                            
                            // Cleanup
                            f_cf04Down();
                            
                        } // end f_GEONW_PON_GBC_NONAREA_GRD_BV_02
                        
                        /**
                         * @desc    Behavior function for NodeB (TC_GEONW_PON_GBC_NONAREA_GRD_BV_02)
                         */
                        function f_GEONW_PON_GBC_NONAREA_GRD_BV_02_nodeB() runs on ItsGeoNetworking {
                            
                            // Local variables
                            var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC);
                            
                            // Preamble
                            f_prNeighbour();
                            f_selfOrClientSyncAndVerdict(c_prDone, e_success);
                            
                            // Test Body
                            tc_ac.start;
                            alt {
                                [] a_receiveGeoBroadcastWithArea(
                                        mw_longPosVectorPosition(v_longPosVectorNodeC),
                                        ?,
                                        f_getGeoBroadcastArea(c_area2)) {
                                    tc_ac.stop;
                                    log("*** " & testcasename() & ": PASS: GBC message correctly forwarded to area center ***");
                                    f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
                                }
                                [] tc_ac.timeout {
                                    log("*** " & testcasename() & ": FAIL: GBC message not received ***");
                                    f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
                                }
                            }
                            
                            // Postamble
                            f_poNeighbour();
                            
                        } // end f_GEONW_PON_GBC_NONAREA_GRD_BV_02_nodeB
                        
                        /**
                         * @desc    Behavior function for NodeC (TC_GEONW_PON_GBC_NONAREA_GRD_BV_02)
                         */
                        function f_GEONW_PON_GBC_NONAREA_GRD_BV_02_nodeC() runs on ItsGeoNetworking {
                            
                            // Local variables
                            var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC);
                            var GeoNetworkingInd v_msgInd;
                            
                            // Preamble
                            f_prNeighbour();
                            f_selfOrClientSyncAndVerdict(c_prDone, e_success);
                            
                            // Test Body
                            f_sendGeoNetMessage(
                                m_geoNwReq_linkLayerBroadcast(
                                    m_geoNwPdu(
                                        m_geoNwBroadcastPacket(
                                            v_longPosVectorNodeC,
                                            vc_localSeqNumber,
                                            f_getGeoBroadcastArea(c_area2)
                                        )
berge's avatar
berge committed
                            );
                            f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
                            
                            // Postamble
                            f_poNeighbour();
                            
                        } // end f_GEONW_PON_GBC_NONAREA_GRD_BV_02_nodeC
                        
                        /**
                         * @desc    Behavior function for NodeD (TC_GEONW_PON_GBC_NONAREA_GRD_BV_02)
                         */
                        function f_GEONW_PON_GBC_NONAREA_GRD_BV_02_nodeD() runs on ItsGeoNetworking {
                            
                            // Local variables