Skip to content
LibItsGeoNetworking_Functions.ttcn 41.9 KiB
Newer Older
            
            //TODO get the value from PIXIT or MIB
            
            return v_itsGnLocationServiceMaxRetrans;
        }
        
tepelmann's avatar
tepelmann committed
        /**
         * @desc Gets the Location Service packet buffer size.
         * @return 
         */        
        function f_getLSPacketBufferSize() return integer {
            var integer v_itsGnLocationServicePacketBufferSize := 1024;
            
            //TODO get the value from PIXIT or MIB
            
            return v_itsGnLocationServicePacketBufferSize;
        } // end f_getLSPacketBufferSize
        
berge's avatar
berge committed
        /**
         * @desc Gets the UC forwarding packet buffer size.
         * @return 
         */        
        function f_getUcForwardingPacketBufferSize() return integer {
            var integer v_itsGnUcForwardingPacketBufferSize := 1024;
            
            //TODO get the value from PIXIT or MIB
            
            return v_itsGnUcForwardingPacketBufferSize;
        } // end f_getUcForwardingPacketBufferSize
        
berge's avatar
berge committed
        /**
         * @desc Gets the BC forwarding packet buffer size.
         * @return 
         */        
        function f_getBcForwardingPacketBufferSize() return integer {
            var integer v_itsGnBcForwardingPacketBufferSize := 1024;
            
            //TODO get the value from PIXIT or MIB
            
            return v_itsGnBcForwardingPacketBufferSize;
        } // end f_getBcForwardingPacketBufferSize        
        
        /**
         * @desc Gets the upper limit of the maximum lifetime.
         * @return 
         */
        function f_getMaxPacketLifeTime() return float {
            var float v_itsGnMaxPacketLifetime := 600.0;
            
            //TODO get the value from PIXIT or MIB
            
            return v_itsGnMaxPacketLifetime;
        }
        
        /**
         * @desc Gets delta for timers.
         * @return 
         */
        function f_getDeltaTimer() return float {
            var float v_deltaTimer := 0.1;
            
            //TODO get the value from PIXIT
            
            return v_deltaTimer;
        }
        
        /**
         * @desc Gets the beacon service retransmit timer.
         * @return 
         */
        function f_getBSRetransmitTimer() return float {
            var float v_itsGnBeaconServiceRetransmitTimer := 3.0;
            
            //TODO get the value from PIXIT
            
            return v_itsGnBeaconServiceRetransmitTimer;
        }
        
fischer's avatar
fischer committed
        /**
        /**
         * @desc Gets the beacon service retransmit timer for NetBeaconInterval = medium (cong. ctrl).
         * @return 
         */
        function f_getBSRetransmitTimerMedium() return float {
            var float v_itsGnBeaconServiceRetransmitTimer := 5.0; // timer value increased (medium)
            
            //TODO get the value from PIXIT
            
            return v_itsGnBeaconServiceRetransmitTimer;
        }
        
        /**
         * @desc Gets the beacon service retransmit timer for NetBeaconInterval = maximum (cong. ctrl).
         * @return 
         */
        function f_getBSRetransmitTimerMaximum() return float {
            var float v_itsGnBeaconServiceRetransmitTimer := 8.0; // timer value increased (maximum)
            
            //TODO get the value from PIXIT
            
            return v_itsGnBeaconServiceRetransmitTimer;
        }
        
        /**
         * @desc Gets the maximum beacon service jitter.
         * @return 
         */
        function f_getBSMaxJitter() return float {
            var float v_itsGnBeaconServiceMaxJitter := f_getMaxPacketLifeTime()/4.0;
            
            //TODO get the value from PIXIT or from the above calculation
            
            return v_itsGnBeaconServiceMaxJitter;
        }

        /**
         * @desc Gets the Lifetime of a Location Table Entry.
         * @return 
         */        
        function f_getLifetimeLocTE() return float {
            var float v_itsGnLifetimeLocTE := 20.0;
            
            //TODO get the value from PIXIT or from the above calculation
            
            return v_itsGnLifetimeLocTE;
        } // end f_getLifetimeLocTE
        /**
         * @desc Set the number of neighbour in the Location Table.
         * @return 
         */        
fischer's avatar
fischer committed
        function f_setNrNeighbourLocTableDefault() {
            var integer v_nrNeighbour := f_random (0, PX_MIN_NR_NEIGHBOUR);
            //TODO set the number of Neighbour in the IUT Location Table to v_nrNeighbour
            
        } // end f_setNrNeighbourLT
        
berge's avatar
berge committed
    group posVectorFunctions {
        
berge's avatar
berge committed
        function f_longPosVector2ShortPosVector(in LongPosVector p_longPosVector) return ShortPosVector {
            var ShortPosVector v_shortPosVector;
            
            v_shortPosVector := {
                gnAddr := p_longPosVector.gnAddr, 
                timestamp := p_longPosVector.timestamp, 
                latitute := p_longPosVector.latitute, 
                longitude := p_longPosVector.longitude
            };
            
berge's avatar
berge committed
            return v_shortPosVector; 
        }
        
        function f_getIutLongPosVector() return LongPosVector {
berge's avatar
berge committed
            var LongPosVector v_longPosVector := valueof(m_dummyLongPosVector);
            return v_longPosVector; 
        }
        
        function f_getIutShortPosVector() return ShortPosVector {
            return f_longPosVector2ShortPosVector(f_getIutLongPosVector()); 
berge's avatar
berge committed
    } // end posVectorFunctions
    
berge's avatar
berge committed
} // end LibItsGeoNetworking_Functions