Commit 0b84ebe2 authored by tepelmann's avatar tepelmann
Browse files

Propagate deterministic timestamp handling in position.

parent 821dec6c
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -869,6 +869,14 @@ module LibItsGeoNetworking_Functions {
            };
        }
        
        function @deterministic f_fillTimestamp(inout LongPosVector v_vector) 
        return LongPosVector {
            if (v_vector.timestamp == 0) {
                v_vector.timestamp := f_computeGnTimestamp();
            }
            return v_vector;
        }
        
        /**
         * @desc    Get the position vector corresponding to a key
         * @param   p_positionKey   Reference key of the searched position vector
@@ -884,13 +892,10 @@ module LibItsGeoNetworking_Functions {
            
            for (i:=0; i<lengthof(vc_positionTable); i:=i+1) {
                if (vc_positionTable[i].key == p_positionKey) {
                    v_return := vc_positionTable[i].position;
                    v_return := f_fillTimestamp(vc_positionTable[i].position);
                }
            }
            
            if (isbound(v_return) and (v_return.timestamp == 0)) {
                v_return.timestamp := f_computeGnTimestamp();
            }
            return v_return;
        }
        /**