Commit edd1050d authored by tepelmann's avatar tepelmann
Browse files

Added Beacon, GeoUnicast, SHB (including TODOs and some TC are only templates)

parent 053a7ff3
Loading
Loading
Loading
Loading
+55 −3
Original line number Diff line number Diff line
@@ -284,7 +284,19 @@ module LibItsGeoNetworking_Functions {
    group upperTester {
        
        function f_utGenerateIpv6Message() runs on ItsNt {
            //TODO
        }
        
        function f_utGenerateSHBMessage() runs on ItsNt {
            //TODO
        }
        
        function f_utCheckEvent(/*FIXME*/) runs on ItsNt return FncRetCode {
            var FncRetCode v_ret := e_error;
            
            //TODO
            
            return v_ret;
        }
        
    } // end upperTester
@@ -303,6 +315,18 @@ module LibItsGeoNetworking_Functions {
            
        }
        
        function f_taStartPassBeaconing(in template (value) Header p_beaconHeader) {
            
            //TODO
            
        }
        
        function f_taStopPassBeaconing() {
            
            //TODO
            
        }
        
    } // end testAdapter
    
    group commonFunctions {
@@ -427,6 +451,30 @@ module LibItsGeoNetworking_Functions {
            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;
        }
        
        /**
         * @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;
        }
        
    } // end iutFunctions
    
    group neighborFunctions {
@@ -456,12 +504,16 @@ module LibItsGeoNetworking_Functions {
            return v_shortPosVector; 
        }
        
        function f_getIutShortPosVector() return ShortPosVector {
            var ShortPosVector v_shortPosVector;
        function f_getIutLongPosVector() return LongPosVector {
            var LongPosVector v_longPosVector;
            
            //TODO
            
            return v_shortPosVector; 
            return v_longPosVector; 
        }
        
        function f_getIutShortPosVector() return ShortPosVector {
            return f_longPosVector2ShortPosVector(f_getIutLongPosVector()); 
        }
        
    } // end posVectorFunctions
+39 −0
Original line number Diff line number Diff line
@@ -462,6 +462,45 @@ module LibItsGeoNetworking_Templates {
		    
		} // end beaconHeaderTemplates                    
                    
        group shbHeaderTemplates {
            
            template (value) Header m_shbHeader(
                in template (value) LongPosVector p_senderLongPosVec,
                in template (value) StationTypeIdentifier p_stationType
            ) := {
                shbHeader := {
                    commonHeader := m_commonHeader(
                        e_any,
                        m_shbHeaderType,
                        m_trafficClass,
                        c_defaultHopLimit,
                        p_senderLongPosVec,
                        p_stationType
                    )
                }
            }
            
            template Header mw_shbHeader(
                in template (value) StationTypeIdentifier p_stationType
            ) := {
                shbHeader := {
                    commonHeader := mw_commonHeader(
                      e_any,
                      m_shbHeaderType,
                      p_stationType
                    )
                }
            }
            
            template (value) HeaderTST m_shbHeaderType := {
                tsbHdr := {
                  headerType := e_topologicallyScopedBroadcast,
                  headerSubType := e_singleHop
                }
            }      
            
        } // end shbHeaderTemplates
        
    } // end geoNwHeadersTemplates
    
} // end ItsGeoNetworking_Templates
 No newline at end of file