Newer
Older
* @author ETSI / STF405
* @version $URL$
* $Id$
* @desc GeoNetworking Templates
module LibItsGeoNetworking_Templates {
// Libcommon
import from LibCommon_BasicTypesAndValues all;
import from LibCommon_DataStrings all;
import from LibItsGeoNetworking_TestSystem all;
import from LibItsGeoNetworking_TypesAndValues all;
import from LibItsGeoNetworking_Pixits all;
import from LibItsIpv6OverGeoNetworking_TypesAndValues all;
import from LibItsIpv6OverGeoNetworking_Templates all;
import from LibItsBtp_Templates all;
import from LibItsExternal_TypesAndValues all;
group geoNwPrimitivesTemplates {
/**
* @desc Send template for GeoNetworking packet (GeonetworkingPort Primitive)
* @param p_geoNwMsg GeoNetworking packet to be sent
*/
template (value) GeoNetworkingReq m_geoNwReq_linkLayerBroadcast(
template (value) GeoNetworkingPacket p_geoNwMsg
msgOut := p_geoNwMsg,
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
macDestinationAddress := p_llDestinationAdress
/**
* @desc Receive template for GeoNetworking packet (GeonetworkingPort Primitive)
* @param p_geoNwMsg GeoNetworking packet to be received
*/
template GeoNetworkingInd mw_geoNwInd(
template (present) GeoNetworkingPacket p_geoNwMsg
msgIn := p_geoNwMsg,
/**
* @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
}
/**
* @desc Initializes the GN IUT.
*/
template (value) UtInitialize m_gnInitialize := {
utGNInitialize := {
}
}
/**
* @desc Request IUT to send a GeoUnicast message to a specific destination
* @param p_destinationGnAddr Destination of the GeoUnicast message
template UtEvent m_generateGeoUnicastMessage(GN_Address p_destinationGnAddr) := {
utGnEvent := {
geoUnicast := {
gnAddress := p_destinationGnAddr,
lifetime := omit,
payload := omit
}
/**
* @desc Request IUT to send a GeoUnicast message to a specific destination with specific lifetime
* @param p_destinationGnAddr Destination of the GeoUnicast message
* @param p_lifetime Lifetime of the GeoUnicast message
template UtEvent m_generateGeoUnicastMessageWithLifetime(
GN_Address p_destinationGnAddr,
integer p_lifetime
) modifies m_generateGeoUnicastMessage := {
utGnEvent := {
geoUnicast := {
lifetime := p_lifetime
}
/**
* @desc Request IUT to send a GeoUnicast message to a specific destination with a payload
* @param p_destinationGnAddr Destination of the GeoUnicast message
* @param p_payload Payload of the GeoUnicast message
template UtEvent m_generateGeoUnicastMessageWithPayload(
GN_Address p_destinationGnAddr,
) modifies m_generateGeoUnicastMessage := {
payload := { decodedPayload := omit, rawPayload := p_payload} // do not use f_adaptPayload_m here
reinaortega
committed
/**
* @desc Request IUT to send a GeoUnicast message to a specific destination with specific lifetime with specific payload
* @param p_destinationGnAddr Destination of the GeoUnicast message
* @param p_lifetime Lifetime of the GeoUnicast message
* @param p_payload Payload of the GeoUnicast message
* @see m_generateGeoUnicastMessage
*/
template UtEvent m_generateGeoUnicastMessageWithLifetimeWithPayload(
GN_Address p_destinationGnAddr,
integer p_lifetime,
octetstring p_payload
) modifies m_generateGeoUnicastMessageWithLifetime := {
utGnEvent := {
geoUnicast := {
payload := { decodedPayload := omit, rawPayload := p_payload} // do not use f_adaptPayload_m here
reinaortega
committed
}
}
}
/**
* @desc Request IUT to send a GeoBroadcast message to a specific area
* @param p_area Destination area of the message
template UtEvent m_generateGeoBroadcastMessage(
utGnEvent := {
geoBroadcast := {
area := p_area,
}
}
}
/**
* @desc Request IUT to send a GeoBroadcast message to a specific area
* @param p_area Destination area of the message
* @param p_lifetime Packet's lifetime
*/
template UtEvent m_generateGeoBroadcastMessageWithLifetime(
GeoArea p_area,
integer p_lifetime
) modifies m_generateGeoBroadcastMessage := {
utGnEvent := {
geoBroadcast := {
lifetime := p_lifetime
/**
* @desc Request IUT to send a GeoBroadcast message to a specific area with a payload
* @param p_area Destination area of the message
* @param p_payload Payload of the GeoBroadcast message
template UtEvent m_generateGeoBroadcastMessageWithPayload(
) modifies m_generateGeoBroadcastMessage := {
payload := { decodedPayload := omit, rawPayload := p_payload} // do not use f_adaptPayload_m here
/**
* @desc Request IUT to send a GeoAnycast message to a specific area
* @param p_area Destination area of the message
Loading full blame...