Loading ttcn/GeoNetworking/LibItsGeoNetworking_Functions.ttcn +19 −1 Original line number Diff line number Diff line Loading @@ -476,6 +476,9 @@ module LibItsGeoNetworking_Functions { } } if(v_return.timestamp == 0) { v_return.timestamp := f_computeGnTimestamp(); } return v_return; } Loading @@ -497,6 +500,7 @@ module LibItsGeoNetworking_Functions { v_return.latitude := v_return.latitude + p_latitudeFactor * PX_DISTANCE_UNIT; v_return.longitude := v_return.longitude + p_longitudeFactor * PX_DISTANCE_UNIT; v_return.timestamp := 0; return v_return; } Loading Loading @@ -1216,6 +1220,14 @@ module LibItsGeoNetworking_Functions { return v_lifetime; } /** * @desc Computes GN timestamp based on current time * @return Unix-Epoch-Time mod 2^32 */ function f_computeGnTimestamp() return UInt32 { return fx_computeGnTimestamp(); } } // end commonFunctions group testerFunctions { Loading Loading @@ -1667,6 +1679,12 @@ module LibItsGeoNetworking_Functions { out UInt32 p_latitude, out UInt32 p_longitude ); /** * @desc External function to compute timestamp based on current time * @return Unix-Epoch-Time mod 2^32 */ external function fx_computeGnTimestamp() return UInt32; } } // end LibItsGeoNetworking_Functions No newline at end of file ttcn/GeoNetworking/LibItsGeoNetworking_Templates.ttcn +33 −8 Original line number Diff line number Diff line Loading @@ -14,6 +14,7 @@ module LibItsGeoNetworking_Templates { // LibIts import from LibIts_Interface all; import from LibItsGeoNetworking_TypesAndValues all; import from LibItsIpv6OverGeoNetworking_TypesAndValues {type MacAddress} import from LibItsGeoNetworking_Pixits all; import from LibItsCommon_TypesAndValues all; Loading @@ -27,7 +28,19 @@ module LibItsGeoNetworking_Templates { template (value) GeoNetworkingPacket p_geoNwMsg ) := { msgOut := p_geoNwMsg, macDestinationAddress := 'FFFFFFFFFFFF'O // TODO Use a pixit macDestinationAddress := c_llBroadcast } /** * @desc Send template for GeoNetworking packet (GeonetworkingPort Primitive) * @param p_geoNwMsg GeoNetworking packet to be sent * @param p_llDestinationAdress Link-layer destination address */ template (value) GeoNetworkingReq m_geoNwReq_withLinkLayerDestination( template (value) GeoNetworkingPacket p_geoNwMsg, template (value) MacAddress p_llDestinationAdress ) modifies m_geoNwReq := { macDestinationAddress := p_llDestinationAdress } /** Loading @@ -38,7 +51,19 @@ module LibItsGeoNetworking_Templates { template (present) GeoNetworkingPacket p_geoNwMsg ) := { msgIn := p_geoNwMsg, macDestinationAddress := 'FFFFFFFFFFFF'O // TODO Use a pixit macDestinationAddress := ? } /** * @desc Receive template for GeoNetworking packet (GeonetworkingPort Primitive) * @param p_geoNwMsg GeoNetworking packet to be received * @param p_llDestinationAdress Link-layer destination address */ template GeoNetworkingInd mw_geoNwInd_withLinkLayerDestination( template (present) GeoNetworkingPacket p_geoNwMsg, template (present) MacAddress p_llDestinationAdress ) modifies mw_geoNwInd := { macDestinationAddress := p_llDestinationAdress } group utPrimitives { Loading Loading @@ -808,7 +833,7 @@ module LibItsGeoNetworking_Templates { ) := { geoBroadcastHeader := { commonHeader := m_commonHeader( e_btp, e_btpA, m_geoBroadcastHeaderType(p_broadcastArea.geoBroadcastSubType), m_trafficClass, c_defaultHopLimit, Loading Loading @@ -845,7 +870,7 @@ module LibItsGeoNetworking_Templates { ) modifies m_geoBroadcastHeader := { geoBroadcastHeader := { commonHeader := m_commonHeader( e_btp, e_btpA, m_geoBroadcastHeaderType(p_broadcastArea.geoBroadcastSubType), m_trafficClass, p_hopLimit, Loading Loading @@ -1039,7 +1064,7 @@ module LibItsGeoNetworking_Templates { ) := { geoAnycastHeader := { commonHeader := m_commonHeader( e_btp, e_btpA, m_geoAnycastHeaderType(p_anycastArea.geoAnycastSubType), m_trafficClass, c_defaultHopLimit, Loading Loading @@ -1076,7 +1101,7 @@ module LibItsGeoNetworking_Templates { ) modifies m_geoAnycastHeader := { geoAnycastHeader := { commonHeader := m_commonHeader( e_btp, e_btpA, m_geoAnycastHeaderType(p_anycastArea.geoAnycastSubType), m_trafficClass, p_hopLimit, Loading ttcn/GeoNetworking/LibItsGeoNetworking_TypesAndValues.ttcn +10 −3 Original line number Diff line number Diff line Loading @@ -12,7 +12,13 @@ module LibItsGeoNetworking_TypesAndValues { import from LibCommon_DataStrings all; //LibIts import from LibItsIpv6OverGeoNetworking_TypesAndValues {type Ipv6Packet;} import from LibItsIpv6OverGeoNetworking_TypesAndValues {type Ipv6Packet; type MacAddress} group linkLayerConstants { const MacAddress c_llBroadcast := 'FFFFFFFFFFFF'O; } // end linkLayerConstants group geoConfigurationValues { Loading Loading @@ -625,8 +631,9 @@ module LibItsGeoNetworking_TypesAndValues { */ type enumerated NextHeader { e_any(0), e_btp(1), e_ipv6(2), e_btpA(1), e_btpB(2), e_ipv6(3), e_reserved } with { variant "4 bits" Loading Loading
ttcn/GeoNetworking/LibItsGeoNetworking_Functions.ttcn +19 −1 Original line number Diff line number Diff line Loading @@ -476,6 +476,9 @@ module LibItsGeoNetworking_Functions { } } if(v_return.timestamp == 0) { v_return.timestamp := f_computeGnTimestamp(); } return v_return; } Loading @@ -497,6 +500,7 @@ module LibItsGeoNetworking_Functions { v_return.latitude := v_return.latitude + p_latitudeFactor * PX_DISTANCE_UNIT; v_return.longitude := v_return.longitude + p_longitudeFactor * PX_DISTANCE_UNIT; v_return.timestamp := 0; return v_return; } Loading Loading @@ -1216,6 +1220,14 @@ module LibItsGeoNetworking_Functions { return v_lifetime; } /** * @desc Computes GN timestamp based on current time * @return Unix-Epoch-Time mod 2^32 */ function f_computeGnTimestamp() return UInt32 { return fx_computeGnTimestamp(); } } // end commonFunctions group testerFunctions { Loading Loading @@ -1667,6 +1679,12 @@ module LibItsGeoNetworking_Functions { out UInt32 p_latitude, out UInt32 p_longitude ); /** * @desc External function to compute timestamp based on current time * @return Unix-Epoch-Time mod 2^32 */ external function fx_computeGnTimestamp() return UInt32; } } // end LibItsGeoNetworking_Functions No newline at end of file
ttcn/GeoNetworking/LibItsGeoNetworking_Templates.ttcn +33 −8 Original line number Diff line number Diff line Loading @@ -14,6 +14,7 @@ module LibItsGeoNetworking_Templates { // LibIts import from LibIts_Interface all; import from LibItsGeoNetworking_TypesAndValues all; import from LibItsIpv6OverGeoNetworking_TypesAndValues {type MacAddress} import from LibItsGeoNetworking_Pixits all; import from LibItsCommon_TypesAndValues all; Loading @@ -27,7 +28,19 @@ module LibItsGeoNetworking_Templates { template (value) GeoNetworkingPacket p_geoNwMsg ) := { msgOut := p_geoNwMsg, macDestinationAddress := 'FFFFFFFFFFFF'O // TODO Use a pixit macDestinationAddress := c_llBroadcast } /** * @desc Send template for GeoNetworking packet (GeonetworkingPort Primitive) * @param p_geoNwMsg GeoNetworking packet to be sent * @param p_llDestinationAdress Link-layer destination address */ template (value) GeoNetworkingReq m_geoNwReq_withLinkLayerDestination( template (value) GeoNetworkingPacket p_geoNwMsg, template (value) MacAddress p_llDestinationAdress ) modifies m_geoNwReq := { macDestinationAddress := p_llDestinationAdress } /** Loading @@ -38,7 +51,19 @@ module LibItsGeoNetworking_Templates { template (present) GeoNetworkingPacket p_geoNwMsg ) := { msgIn := p_geoNwMsg, macDestinationAddress := 'FFFFFFFFFFFF'O // TODO Use a pixit macDestinationAddress := ? } /** * @desc Receive template for GeoNetworking packet (GeonetworkingPort Primitive) * @param p_geoNwMsg GeoNetworking packet to be received * @param p_llDestinationAdress Link-layer destination address */ template GeoNetworkingInd mw_geoNwInd_withLinkLayerDestination( template (present) GeoNetworkingPacket p_geoNwMsg, template (present) MacAddress p_llDestinationAdress ) modifies mw_geoNwInd := { macDestinationAddress := p_llDestinationAdress } group utPrimitives { Loading Loading @@ -808,7 +833,7 @@ module LibItsGeoNetworking_Templates { ) := { geoBroadcastHeader := { commonHeader := m_commonHeader( e_btp, e_btpA, m_geoBroadcastHeaderType(p_broadcastArea.geoBroadcastSubType), m_trafficClass, c_defaultHopLimit, Loading Loading @@ -845,7 +870,7 @@ module LibItsGeoNetworking_Templates { ) modifies m_geoBroadcastHeader := { geoBroadcastHeader := { commonHeader := m_commonHeader( e_btp, e_btpA, m_geoBroadcastHeaderType(p_broadcastArea.geoBroadcastSubType), m_trafficClass, p_hopLimit, Loading Loading @@ -1039,7 +1064,7 @@ module LibItsGeoNetworking_Templates { ) := { geoAnycastHeader := { commonHeader := m_commonHeader( e_btp, e_btpA, m_geoAnycastHeaderType(p_anycastArea.geoAnycastSubType), m_trafficClass, c_defaultHopLimit, Loading Loading @@ -1076,7 +1101,7 @@ module LibItsGeoNetworking_Templates { ) modifies m_geoAnycastHeader := { geoAnycastHeader := { commonHeader := m_commonHeader( e_btp, e_btpA, m_geoAnycastHeaderType(p_anycastArea.geoAnycastSubType), m_trafficClass, p_hopLimit, Loading
ttcn/GeoNetworking/LibItsGeoNetworking_TypesAndValues.ttcn +10 −3 Original line number Diff line number Diff line Loading @@ -12,7 +12,13 @@ module LibItsGeoNetworking_TypesAndValues { import from LibCommon_DataStrings all; //LibIts import from LibItsIpv6OverGeoNetworking_TypesAndValues {type Ipv6Packet;} import from LibItsIpv6OverGeoNetworking_TypesAndValues {type Ipv6Packet; type MacAddress} group linkLayerConstants { const MacAddress c_llBroadcast := 'FFFFFFFFFFFF'O; } // end linkLayerConstants group geoConfigurationValues { Loading Loading @@ -625,8 +631,9 @@ module LibItsGeoNetworking_TypesAndValues { */ type enumerated NextHeader { e_any(0), e_btp(1), e_ipv6(2), e_btpA(1), e_btpB(2), e_ipv6(3), e_reserved } with { variant "4 bits" Loading