Newer
Older
* @version $Url: https://oldforge.etsi.org/svn/LibIts/tags/20170222_STF527_Final/ttcn/GeoNetworking/LibItsGeoNetworking_Templates.ttcn $
* $Id: LibItsGeoNetworking_Templates.ttcn,v 1.5 2018/05/31 15:57:10 dte Exp $
* @copyright ETSI Copyright Notification
* No part may be reproduced except as authorized by written permission.
* The copyright and the foregoing restriction extend to reproduction in all media.
* All rights reserved.
module LibItsGeoNetworking_Templates {
// Libcommon
import from LibCommon_BasicTypesAndValues all;
import from LibCommon_DataStrings all;
// LibIts
import from EtsiTs103097Module language "ASN.1:1997" all;
import from LibItsCommon_TypesAndValues all;
import from LibItsExternal_TypesAndValues all;
// LibItsBtp
// import from LibItsBtp_Templates all;
// LibItsSecurity
import from LibItsSecurity_TypesAndValues all;
//import from LibItsIpv6OverGeoNetworking_TypesAndValues all;
//import from LibItsIpv6OverGeoNetworking_Templates all;
// import from LibItsGeoNetworking_EncdecDeclarations all;
group geoNwPrimitivesTemplates {
/**
* @desc Send template for GeoNetworking packet (GeonetworkingPort Primitive)
* @param p_geoNwMsg GeoNetworking packet to be sent
* @param p_its_aid ITS-AID used in secured mode. Default: 0, means unused
template (value) GeoNetworkingReq m_geoNwReq_linkLayerBroadcast(
in template (value) GeoNetworkingPdu p_geoNwMsg,
in template (value) UInt32 p_its_aid := 0
msgOut := p_geoNwMsg,
macDestinationAddress := c_llBroadcast,
/**
* @desc Send template for GeoNetworking packet (GeonetworkingPort Primitive)
* @param p_geoNwMsg GeoNetworking packet to be sent
* @param p_its_aid ITS-AID used in secured mode. Default: 0, means unused
* @param p_llDestinationAdress Link-layer destination address
template (value) GeoNetworkingReq m_geoNwReq_withLinkLayerDestination(
in template (value) GeoNetworkingPdu p_geoNwMsg,
in template (value) UInt32 p_its_aid := 0,
in 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(present) GeoNetworkingInd mw_geoNwInd(
template (present) GeoNetworkingPdu p_geoNwMsg := ?
msgIn := p_geoNwMsg,
macDestinationAddress := ?,
ssp := *,
its_aid := *
/**
* @desc Receive template for GeoNetworking packet (GeonetworkingPort Primitive)
* @param p_geoNwMsg GeoNetworking packet to be received
* @param p_llDestinationAdress Link-layer destination address
template (present) GeoNetworkingInd mw_geoNwInd_withLinkLayerDestination(
template (present) GeoNetworkingPdu p_geoNwMsg := ?,
template (present) MacAddress p_llDestinationAdress := ?
/**
* @desc Request IUT to send a GeoUnicast message to a specific destination
* @param p_destinationGnAddr Destination of the GeoUnicast message
template (value) UtGnTrigger m_generateGeoUnicastMessage(GN_Address p_destinationGnAddr) := {
tepelmann
committed
gnAddress := p_destinationGnAddr,
trafficClass := valueof(m_trafficClass),
/**
* @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_trafficClass TrafficClass of the GeoUnicast message
* @see m_generateGeoUnicastMessage
*/
template (value) UtGnTrigger m_generateGeoUnicastMessageWithTrafficClass(
GN_Address p_destinationGnAddr,
TrafficClass p_trafficClass
) modifies m_generateGeoUnicastMessage := {
geoUnicast := {
trafficClass := p_trafficClass
}
}
/**
* @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 (value) UtGnTrigger m_generateGeoUnicastMessageWithLifetime(
GN_Address p_destinationGnAddr,
) modifies m_generateGeoUnicastMessage := {
tepelmann
committed
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 (value) UtGnTrigger m_generateGeoUnicastMessageWithPayload(
GN_Address p_destinationGnAddr,
tepelmann
committed
) modifies m_generateGeoUnicastMessage := {
geoUnicast := {
tepelmann
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 (value) UtGnTrigger m_generateGeoUnicastMessageWithLifetimeWithPayload(
octetstring p_payload
) modifies m_generateGeoUnicastMessageWithLifetime := {
tepelmann
committed
geoUnicast := {
tepelmann
committed
}
reinaortega
committed
/**
* @desc Request IUT to send a GeoBroadcast message to a specific area
* @param p_geoArea Destination area of the message
GeoArea p_geoArea
tepelmann
committed
geoBroadcast := {
trafficClass := valueof(m_trafficClass),
reserved := c_uInt24Zero,
area := p_geoArea.area,
tepelmann
committed
}
}
/**
* @desc Request IUT to send a GeoBroadcast message to a specific area
* @param p_geoArea Destination area of the message
* @param p_trafficClass TrafficClass of the GeoUnicast message
*/
template (value) UtGnTrigger m_generateGeoBroadcastMessageWithTrafficClass(
GeoArea p_geoArea,
TrafficClass p_trafficClass
) modifies m_generateGeoBroadcastMessage := {
geoBroadcast := {
trafficClass := p_trafficClass
}
}
/**
* @desc Request IUT to send a GeoBroadcast message to a specific area
* @param p_geoArea Destination area of the message
template (value) UtGnTrigger m_generateGeoBroadcastMessageWithLifetime(
GeoArea p_geoArea,
tepelmann
committed
geoBroadcast := {
lifetime := p_lifetime
}
/**
* @desc Request IUT to send a GeoBroadcast message to a specific area with a payload
* @param p_geoArea Destination area of the message
* @param p_payload Payload of the GeoBroadcast message
template (value) UtGnTrigger m_generateGeoBroadcastMessageWithPayload(
GeoArea p_geoArea,
) modifies m_generateGeoBroadcastMessage := {
tepelmann
committed
geoBroadcast := {
tepelmann
committed
}
/**
* @desc Request IUT to send a GeoAnycast message to a specific area
* @param p_geoArea Destination area of the message
GeoArea p_geoArea
tepelmann
committed
geoAnycast := {
trafficClass := valueof(m_trafficClass),
reserved := c_uInt24Zero,
area := p_geoArea.area,
tepelmann
committed
}
/**
* @desc Request IUT to send a GeoAnycast message to a specific area with a payload
* @param p_geoArea Destination area of the message
* @param p_trafficClass TrafficClass of the GeoUnicast message
* @see m_generateGeoAnycastMessage
*/
template (value) UtGnTrigger m_generateGeoAnycastMessageWithTrafficClass(
GeoArea p_geoArea,
TrafficClass p_trafficClass
) modifies m_generateGeoAnycastMessage := {
geoAnycast := {
trafficClass := p_trafficClass
}
}
/**
* @desc Request IUT to send a GeoAnycast message to a specific area with a payload
* @param p_geoArea Destination area of the message
* @param p_payload Payload of the GeoAnycast message
template (value) UtGnTrigger m_generateGeoAnycastMessageWithPayload(
GeoArea p_geoArea,
) modifies m_generateGeoAnycastMessage := {
tepelmann
committed
geoAnycast := {
tepelmann
committed
}
/**
* @desc Request IUT to send a SHB message
tepelmann
committed
shb := {
trafficClass := valueof(m_trafficClass),
tepelmann
committed
}
/**
* @desc Request IUT to send a SHB message with a payload
* @param p_trafficClass TrafficClass of the GeoUnicast message
* @see m_generateShbMessage
*/
template (value) UtGnTrigger m_generateShbMessageWithTrafficClass(
TrafficClass p_trafficClass
) modifies m_generateShbMessage := {
shb := {
trafficClass := p_trafficClass
}
}
/**
* @desc Request IUT to send a SHB message with a payload
tepelmann
committed
shb := {
tepelmann
committed
}
/**
* @desc Request IUT to send a TSB message
tepelmann
committed
tsb := {
lifetime := c_lifetime,
trafficClass := valueof(m_trafficClass),
tepelmann
committed
}
}
/**
* @desc Request IUT to send a TSB message
* @param p_lifetime Packet's lifetime
*/
template (value) UtGnTrigger m_generateTsbMessageWithLifetime(
UInt16 p_lifetime
) modifies m_generateTsbMessage := {
tsb := {
lifetime := p_lifetime
}
}
/**
* @desc Request IUT to send a TSB message
* @param p_trafficClass TrafficClass of the GeoUnicast message
*/
template (value) UtGnTrigger m_generateTsbMessageWithTrafficClass(
TrafficClass p_trafficClass
) modifies m_generateTsbMessage := {
tsb := {
trafficClass := p_trafficClass
}
}
/**
* @desc Request IUT to change its position
*/
template (value) UtGnChangePosition m_changePosition := {
latitude := 1000,
longitude := 0,
elevation := 0
/**
* @desc Testsystem will start beaconing for the given neighbor
* @param p_beaconHeader The neighbor information
template (value) AcGnPrimitive m_startBeaconing(
template (value) BeaconHeader p_beaconHeader
) := {
beaconPacket := m_geoNwPdu(valueof(m_geoNwBeaconPacket(valueof(p_beaconHeader.srcPosVector))), -, c_hopLimit1)
/**
* @desc Testsystem will stop beaconing for the given neighbor
* @param p_compName The neighbor
stopBeaconing:= {
}
}
/**
* @desc Testsystem will pass received to the TTCN-3
* @param p_beaconHeader The neighbor information
*/
template (value) AcGnPrimitive m_startPassBeaconing(
in template (value) BeaconHeader p_beaconHeader
startPassBeaconing := {
beaconHeader := p_beaconHeader
}
}
/**
* @desc Testsystem will stop passing beacon information to the TTCN-3
*/
stopPassBeaconing := {
}
}
* @desc Testsystem will start beaconing for multiple neighbors
* @param p_beaconHeader The neighbor information
* @param p_numberOfNeighbour The number of ITS stations for which TS will send beacons
template (value) AcGnPrimitive m_startBeaconingMultipleNeighbour(
template (value) BeaconHeader p_beaconHeader,
integer p_numberOfNeighbour
) := {
startBeaconingMultipleNeighbour := {
beaconPacket := m_geoNwPdu(valueof(m_geoNwBeaconPacket(valueof(p_beaconHeader.srcPosVector))), -, c_hopLimit1),
numberOfNeighbour := p_numberOfNeighbour
}
}
/**
* @desc Testsystem will stop beaconing for multiple neighbors
* @param p_compName The neighbor
*/
template (value) AcGnPrimitive m_stopBeaconingMultipleNeighbour := {
stopBeaconingMultipleNeighbour:= {
}
* @desc Testsystem will reply the LongPosVector including the requested GN address
* found in received beacon information to the TTCN-3
* @param p_gnAddress The GN address included in the LongPosVector
template (value) AcGnPrimitive m_getLongPosVector(GN_Address p_gnAddress) := {
getLongPosVector := {
gnAddress := p_gnAddress
}
}
/**
* @desc Receive template adapter control result for long position vector with specific GN_Address
* @param p_gnAddress GN_Address to be contained in the long position vector
*/
template AcGnResponse mw_getLongPosVectorAny(template (present) GN_Address p_gnAddress) := {
getLongPosVector := mw_longPosVectorAny(p_gnAddress)
}
} // geoNwPrimitivesTemplates
group geoNwPduTemplates {
* @desc Send template for GeoNetworking PDU
* @param p_packet GnNonSecuredPacket of GeoNetworking message
* @param p_lifeTime Lifetime of GeoNetworking message (Default: m_defaultLifetime)
* @param p_hopLimit Router Hop limit of GeoNetworking message (Default: c_defaultHopLimit)
*/
template (value) GeoNetworkingPdu m_geoNwPdu(
in template (value) GnNonSecuredPacket p_packet,
in template (value) Lifetime p_lifeTime := m_defaultLifetime,
in template (value) UInt8 p_hopLimit := c_defaultHopLimit
) := {
basicHeader := m_basicHeader(p_lifeTime, p_hopLimit),
gnPacket := {
packet := p_packet,
securedMsg := omit
}
}
/**
* @desc Receive template for GeoNetworking PDU
* @param p_packet GnNonSecuredPacket of GeoNetworking message
* @param p_lifeTime Lifetime of GeoNetworking message (Default: ?)
* @param p_hopLimit Router Hop limit of GeoNetworking message (Default: ?)
*/
template (present) GeoNetworkingPdu mw_geoNwPdu(
template (present) GnNonSecuredPacket p_packet,
template (present) Lifetime p_lifeTime := ?,
template (present) UInt8 p_hopLimit := ?
) := {
basicHeader := mw_basicHeader(p_lifeTime, p_hopLimit),
gnPacket := {
packet := p_packet,
securedMsg := *
/**
* @desc Receive template for secured GeoNetworking PDU
* @param p_secMsg Secured message
* @param p_packet Clear-text version of the packet
*/
template (present) GeoNetworkingPdu mw_geoNwSecPdu(
template (present) EtsiTs103097Data p_secMsg,
template (present) GnNonSecuredPacket p_packet := ?
gnPacket := {
packet := p_packet,
securedMsg := p_secMsg
}
}
/**
* @desc Send template for secured GeoNetworking PDU
* @param p_packet Clear-text version of the packet
* @param p_secMsg Secured message
*/
template (value) GeoNetworkingPdu m_geoNwSecPdu(
garciay
committed
in template (value) GnNonSecuredPacket p_packet,
in template (value) EtsiTs103097Data p_secMsg
gnPacket := {
packet := p_packet,
securedMsg := p_secMsg
}
}
} // end geoNwPduTemplates
group geoNwPacketTemplates {
/**
* @desc Send template for GeoNetworking Packet
* @param p_basicHeader Common header of GeoNetworking packet
* @param p_extHeader Extended header of GeoNetworking packet
template (value) GeoNetworkingPacket m_geoNwPacket(
in template (value) CommonHeader p_commonHeader,
in template (value) ExtendedHeader p_extHeader
packet := {
commonHeader := valueof(p_commonHeader),
extendedHeader := valueof(p_extHeader),
payload := char2oct("DEFAULT_PAYLOAD")
}
/**
* @desc Send template for GeoNetworking Packet with no payload
* @param p_basicHeader Common header of GeoNetworking packet
* @param p_extHeader Extended header of GeoNetworking packet
template (value) GeoNetworkingPacket m_geoNwPacketNoPayload(
in template (value) CommonHeader p_commonHeader,
in template (value) ExtendedHeader p_extHeader
) modifies m_geoNwPacket := {
packet := {
payload := omit
}
* @desc Send template for GeoNetworking Packet with payload
* @param p_basicHeader Common header of GeoNetworking packet
* @param p_extHeader Extended header of GeoNetworking packet
* @param p_payload Payload
template (value) GeoNetworkingPacket m_geoNwPacketWithPayload(
in template (value) CommonHeader p_commonHeader,
in template (value) ExtendedHeader p_extHeader,
in template (value) GnRawPayload p_payload
) modifies m_geoNwPacket := {
packet := {
payload := p_payload
}
* @desc Receive template for GeoNetworking Packet
* @param p_basicHeader Common header of GeoNetworking packet
* @param p_extHeader Extended header of GeoNetworking packet
template (present) GeoNetworkingPacket mw_geoNwPacket(
template (present) CommonHeader p_commonHeader := ?,
template (present) ExtendedHeader p_extHeader := ?
packet := {
commonHeader := p_commonHeader,
extendedHeader := p_extHeader,
payload := *
},
securedMsg := *
* @desc Receive template for GeoNetworking Packet with any payload
* @param p_basicHeader Common header of GeoNetworking packet
* @param p_extHeader Extended header of GeoNetworking packet
template(present) GeoNetworkingPacket mw_geoNwPduAnyPayload(
template (present) CommonHeader p_commonHeader := ?,
template (present) ExtendedHeader p_extHeader := ?
) modifies mw_geoNwPacket := {
packet := {
payload := ?
}
}
* @desc Receive template for GeoNetworking PDU with octetstring payload
* @param p_basicHeader Common header of GeoNetworking packet
* @param p_extHeader Extended header of GeoNetworking packet
* @param p_payload Octetstring payload
template(present) GeoNetworkingPacket mw_geoNwPduWithOctetstringPayload(
template (present) CommonHeader p_commonHeader := ?,
template (present) ExtendedHeader p_extHeader := ?,
template (present) octetstring p_payload := ?
/**
* @desc Receive template for GeoNetworking PDU with payload
* @param p_basicHeader Common header of GeoNetworking packet
* @param p_extHeader Extended header of GeoNetworking packet
* @param p_payload Payload
template(present) GeoNetworkingPacket mw_geoNwPduWithPayload(
template (present) CommonHeader p_commonHeader := ?,
template (present) ExtendedHeader p_extHeader := ?,
template (present) GnRawPayload p_payload := ?
) modifies mw_geoNwPacket := {
packet := {
payload := p_payload
}
}
group geoNwPacketTemplates_ {
/**
* @desc Receive template for any GeoNetworking Packet
*/
template (present) GnNonSecuredPacket mw_geoNwAnyPacket := {
commonHeader := mw_commonHeader(
?,
?
),
extendedHeader := *,
payload := *
}
/**
* @desc Receive template for any GeoNetworking Packet with Payload
* @param payload Expected GN payload
*/
template (present) GnNonSecuredPacket mw_geoNwAnyPacket_withPayload(
) := {
commonHeader := mw_commonHeader(
?,
?
),
extendedHeader := *,
payload := p_payload
}
} // end group geoNwPacketTemplates_
group geoNwPacketUnicastTemplates {
/**
* @desc Send template for GeoNetworking Unicast Packet
* @param p_sourceLongPosVec Long position vector of source
* @param p_destinationShortPosVec Short position vector of destination
* @param p_seqNumber Sequence number of GeoUnicast packet
tepelmann
committed
* @param p_hopLimit Maximum number of hops (Default: c_defaultHopLimit)
* @param p_trafficClass Traffic Class
*/
template (value) GnNonSecuredPacket m_geoNwUnicastPacket(
in template (value) LongPosVector p_sourceLongPosVec,
in template (value) ShortPosVector p_destinationShortPosVec,
tepelmann
committed
in template (value) UInt16 p_seqNumber,
in template (value) UInt8 p_hopLimit := c_defaultHopLimit,
in template (value) TrafficClass p_trafficClass := m_trafficClass
commonHeader := valueof(m_commonHeader(
tepelmann
committed
p_hopLimit
)),
extendedHeader := valueof(m_geoUnicastHeader(
p_sourceLongPosVec,
p_destinationShortPosVec,
p_seqNumber
payload := valueof(char2oct("DEFAULT_PAYLOAD"))
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
/**
* @desc Send template for GeoNetworking Unicast Packet
* @param p_sourceLongPosVec Long position vector of source
* @param p_destinationShortPosVec Short position vector of destination
* @param p_seqNumber Sequence number of GeoUnicast packet
* @param p_hopLimit Maximum number of hops (Default: c_defaultHopLimit)
* @param p_trafficClass Traffic Class
*/
template (value) GnNonSecuredPacket m_geoNwUnicastPacket_with_payload(
in template (value) LongPosVector p_sourceLongPosVec,
in template (value) ShortPosVector p_destinationShortPosVec,
in template (value) UInt16 p_seqNumber,
in template (value) UInt8 p_hopLimit := c_defaultHopLimit,
in template (value) TrafficClass p_trafficClass := m_trafficClass,
in template (value) GnRawPayload p_payload
) := {
commonHeader := valueof(m_commonHeader(
PX_GN_UPPER_LAYER,
m_geoUnicastHeaderType,
p_trafficClass,
p_hopLimit
)),
extendedHeader := valueof(m_geoUnicastHeader(
p_sourceLongPosVec,
p_destinationShortPosVec,
p_seqNumber
)),
payload := valueof(p_payload)
}
/**
* @desc Receive template for GeoNetworking Unicast Packet
* @param p_destinationShortPosVec Short position vector of destination
* @param p_seqNumber Sequence number of GeoUnicast packet
*/
template (present) GnNonSecuredPacket mw_geoNwUnicastPacket(
template (present) ShortPosVector p_destinationShortPosVec,
template (present) UInt16 p_seqNumber
) := {
commonHeader := mw_commonHeader(
PX_GN_UPPER_LAYER,
mw_geoUnicastHeaderType
),
extendedHeader := mw_geoUnicastHeader(
p_destinationShortPosVec,
p_seqNumber
),
/**
* @desc Receive template for GeoNetworking Unicast Packet
* @param p_destinationShortPosVec Short position vector of destination
* @param p_seqNumber Sequence number of GeoUnicast packet
* @param p_hopLimit Maximum number of hops (Default: ?)
* @see mw_geoNwUnicastPacket
*/
template (present) GnNonSecuredPacket mw_geoNwUnicastPacketWithHl(
template (present) ShortPosVector p_destinationShortPosVec,
template (present) UInt16 p_seqNumber,
template (present) UInt8 p_hopLimit := ?
) modifies mw_geoNwUnicastPacket := {
commonHeader := mw_commonHeaderWithHopLimit(
PX_GN_UPPER_LAYER,
mw_geoUnicastHeaderType,
p_hopLimit
),
extendedHeader := mw_geoUnicastHeader(
p_destinationShortPosVec,
p_seqNumber
),
payload := ?
}
/**
* @desc Receive template for GeoNetworking Unicast Packet
* @param p_destinationShortPosVec Short position vector of destination
* @param p_seqNumber Sequence number of GeoUnicast packet
* @param p_srcLongPosVec Long position vector of source
*/
template (present) GnNonSecuredPacket mw_geoNwUnicastPacketWithSourcePv(
template (present) ShortPosVector p_destinationShortPosVec,
template (present) UInt16 p_seqNumber,
template (present) LongPosVector p_srcLongPosVec
) modifies mw_geoNwUnicastPacket := {
extendedHeader := mw_geoUnicastHeaderWithSourcePv(
p_destinationShortPosVec,
p_seqNumber,
p_srcLongPosVec
)
}
/**
* @desc Receive template for GeoNetworking Unicast Packet
* @param p_destinationShortPosVec Short position vector of destination
* @param p_seqNumber Sequence number of GeoUnicast packet
* @param p_nextHeader Id of next header
*/
template (present) GnNonSecuredPacket mw_geoNwUnicastPacketWithNextHeader(
template (present) ShortPosVector p_destinationShortPosVec,
template (present) UInt16 p_seqNumber,
template (present) NextHeader p_nextHeader
) modifies mw_geoNwUnicastPacket := {
commonHeader := {
nextHeader := p_nextHeader
}
}
} // end group geoNwPacketUnicastTemplates
group geoNwPacketAnycastTemplates {
/**
* @desc Send template for GeoNetworking Anycast Packet
* @param p_sourceLongPosVec Long position vector of source
* @param p_seqNumber Sequence number of GeoAnycast packet
* @param p_anycastArea Destination GeoArea
tepelmann
committed
* @param p_hopLimit Maximum number of hops (Default: c_defaultHopLimit)
* @param p_trafficClass Traffic Class
*/
template (value) GnNonSecuredPacket m_geoNwAnycastPacket(
in template (value) LongPosVector p_sourceLongPosVec,
in template (value) UInt16 p_seqNumber,
tepelmann
committed
in template (value) GeoAnycastArea p_anycastArea,
in template (value) UInt8 p_hopLimit := c_defaultHopLimit,
in template (value) TrafficClass p_trafficClass := m_trafficClass
commonHeader := valueof(m_commonHeader(
m_geoAnycastHeaderType(valueof(p_anycastArea.geoAnycastSubType)),
tepelmann
committed
p_hopLimit
)),
extendedHeader := valueof(m_geoAnycastHeader(
p_sourceLongPosVec,
p_seqNumber,
p_anycastArea
payload := valueof(char2oct("DEFAULT_PAYLOAD"))
}
/**
* @desc Receive template for GeoNetworking Anycast Packet
* @param p_seqNumber Sequence number of GeoAnycast packet
*/
template (present) GnNonSecuredPacket mw_geoNwAnycastPacket(
template (present) LongPosVector p_sourceLongPosVec := ?,
template (present) UInt16 p_seqNumber := ?
) := {
commonHeader := mw_commonHeader(
PX_GN_UPPER_LAYER,
mw_geoAnycastHeaderType
),
extendedHeader := mw_geoAnycastHeader(
p_sourceLongPosVec,
p_seqNumber
),
payload := ?
}
/**
* @desc Receive template for GeoNetworking Anycast Packet
* @param p_seqNumber Sequence number of GeoAnycast packet
* @param p_anycastArea Destination GeoArea
*/
template (present) GnNonSecuredPacket mw_geoNwAnycastPacketWithArea(
template (present) LongPosVector p_sourceLongPosVec := ?,
template (present) UInt16 p_seqNumber := ?,
template (present) GeoAnycastArea p_anycastArea := ?
) := {
commonHeader := mw_commonHeader(
PX_GN_UPPER_LAYER,
mw_geoAnycastHeaderTypeWithSubType(p_anycastArea.geoAnycastSubType)
),
extendedHeader := mw_geoAnycastHeaderWithArea(
p_sourceLongPosVec,
p_seqNumber,
p_anycastArea
),
payload := ?
}
tepelmann
committed
/**
* @desc Receive template for GeoNetworking Anycast Packet
tepelmann
committed
* @param p_seqNumber Sequence number of GeoAnycast packet
* @param p_anycastArea Destination GeoArea
* @param p_maxHopLimit Maximum number of hops (Default := ?)
*/
template (present) GnNonSecuredPacket mw_geoNwAnycastPacketWithAreaAndHl(
template (present) LongPosVector p_sourceLongPosVec,
template (present) UInt16 p_seqNumber,
template (present) GeoAnycastArea p_anycastArea,
template (present) UInt8 p_maxHopLimit := ?
tepelmann
committed
) modifies mw_geoNwAnycastPacketWithArea := {
commonHeader := mw_commonHeaderWithHopLimit(
PX_GN_UPPER_LAYER,
mw_geoAnycastHeaderTypeWithSubType(p_anycastArea.geoAnycastSubType),
p_maxHopLimit
)
}
/**
* @desc Receive template for GeoNetworking Anycast Packet
* @param p_seqNumber Sequence number of GeoAnycast packet
* @param p_anycastArea Destination GeoArea
* @param p_nextHeader Id of next header
*/
template (present) GnNonSecuredPacket mw_geoNwAnycastPacketWithAreaWithNextHeader(
template (present) LongPosVector p_sourceLongPosVec,
template (present) UInt16 p_seqNumber,
template (present) GeoAnycastArea p_anycastArea,
template (present) NextHeader p_nextHeader
) modifies mw_geoNwAnycastPacketWithArea := {
commonHeader := {
nextHeader := p_nextHeader
}
}
} // end group geoNwPacketAnycastTemplates
group geoNwPacketBroadcastTemplates {
/**
* @desc Send template for GeoNetworking Broadcast Packet
* @param p_sourceLongPosVec Long position vector of source
* @param p_seqNumber Sequence number of GeoBroadcast packet
* @param p_broadcastArea Destination GeoArea
* @param p_hopLimit Maximum number of hops (Default: c_defaultHopLimit)
* @param p_trafficClass Traffic Class
*/
template (value) GnNonSecuredPacket m_geoNwBroadcastPacket(
in template (value) LongPosVector p_sourceLongPosVec,
in template (value) UInt16 p_seqNumber,
tepelmann
committed
in template (value) GeoBroadcastArea p_broadcastArea,
in template (value) UInt8 p_hopLimit := c_defaultHopLimit,
in template (value) TrafficClass p_trafficClass := m_trafficClass
commonHeader := valueof(m_commonHeader(
m_geoBroadcastHeaderType(valueof(p_broadcastArea.geoBroadcastSubType)),
tepelmann
committed
p_hopLimit
)),
extendedHeader := valueof(m_geoBroadcastHeader(
p_sourceLongPosVec,
p_seqNumber,
p_broadcastArea
payload := valueof(char2oct("DEFAULT_PAYLOAD"))
}
/**
* @desc Receive template for GeoNetworking Broadcast Packet
* @param p_seqNumber Sequence number of GeoBroadcast packet
*/
template (present) GnNonSecuredPacket mw_geoNwBroadcastPacket(
template (present) LongPosVector p_sourceLongPosVec := ?,
template (present) UInt16 p_seqNumber := ?
) := {
commonHeader := mw_commonHeader(
PX_GN_UPPER_LAYER,
mw_geoBroadcastHeaderType
),
extendedHeader := mw_geoBroadcastHeader(
p_sourceLongPosVec,
p_seqNumber
),
}
/**
* @desc Receive template for GeoNetworking Broadcast Packet
* @param p_seqNumber Sequence number of GeoBroadcast packet
* @param p_nextHeader Id of next header
*/
template (present) GnNonSecuredPacket mw_geoNwBroadcastPacketWithNextHeader(
template (present) LongPosVector p_sourceLongPosVec,
template (present) UInt16 p_seqNumber,
template (present) NextHeader p_nextHeader
) modifies mw_geoNwBroadcastPacket := {
commonHeader := mw_commonHeader(
p_nextHeader,
mw_geoBroadcastHeaderType
)
}
/**
* @desc Receive template for GeoNetworking Broadcast Packet
* @param p_sourceLongPosVec Long position vector of source
* @param p_seqNumber Sequence number of GeoBroadcast packet
* @param p_nextHeader Id of next header
* @param p_payload payload
*/
template (present) GnNonSecuredPacket mw_geoNwBroadcastPacketWithNextHeaderAndPayload(
template (present) LongPosVector p_sourceLongPosVec,
template (present) UInt16 p_seqNumber,
template (present) NextHeader p_nextHeader,
template (present) GnRawPayload p_payload
) modifies mw_geoNwBroadcastPacketWithNextHeader := {
payload := p_payload
}
/**
* @desc Receive template for GeoNetworking Broadcast Packet
* @param p_sourceLongPosVec Long position vector of source
* @param p_seqNumber Sequence number of GeoBroadcast packet
* @param p_broadcastArea Destination GeoArea
*/
template (present) GnNonSecuredPacket mw_geoNwBroadcastPacketWithArea(
template (present) LongPosVector p_sourceLongPosVec,
template (present) UInt16 p_seqNumber,
template (present) GeoBroadcastArea p_broadcastArea
) modifies mw_geoNwBroadcastPacket := {
commonHeader := mw_commonHeader(
PX_GN_UPPER_LAYER,
mw_geoBroadcastHeaderTypeWithSubType(p_broadcastArea.geoBroadcastSubType)
),
extendedHeader := mw_geoBroadcastHeaderWithArea(
p_sourceLongPosVec,
p_seqNumber,
p_broadcastArea
)
}
tepelmann
committed
/**
* @desc Receive template for GeoNetworking Broadcast Packet
* @param p_sourceLongPosVec Long position vector of source
tepelmann
committed
* @param p_seqNumber Sequence number of GeoBroadcast packet
* @param p_broadcastArea Destination GeoArea
* @param p_maxHopLimit Maximum number of hops (Default := ?)
*/
template (present) GnNonSecuredPacket mw_geoNwBroadcastPacketWithAreaAndHl(
template (present) LongPosVector p_sourceLongPosVec,
template (present) UInt16 p_seqNumber,
template (present) GeoBroadcastArea p_broadcastArea,
template (present) UInt8 p_maxHopLimit := ?
tepelmann
committed
) modifies mw_geoNwBroadcastPacketWithArea := {
commonHeader := mw_commonHeaderWithHopLimit(
PX_GN_UPPER_LAYER,
mw_geoBroadcastHeaderTypeWithSubType(p_broadcastArea.geoBroadcastSubType),
p_maxHopLimit
)
}
/**
* @desc Receive template for GeoNetworking Broadcast Packet
* @param p_sourceLongPosVec Long position vector of source
* @param p_seqNumber Sequence number of GeoBroadcast packet (Default: ?)
* @param p_hopLimit Maximum number of hops (Default: ?)
* @param p_flags Flags in the common header (Default: ?)
*/
template (present) GnNonSecuredPacket mw_geoNwBroadcastPacketWithHlAndFlags(
template (present) LongPosVector p_sourceLongPosVec,
template (present) UInt16 p_seqNumber := ?,
template (present) UInt8 p_hopLimit := ?,
template (present) Bit8 p_flags := ?
) modifies mw_geoNwBroadcastPacket := {
commonHeader := mw_commonHeaderWithHopLimitAndFlags(
PX_GN_UPPER_LAYER,
mw_geoBroadcastHeaderType,
p_hopLimit,
p_flags
)
}
/**
* @desc Receive template for GeoNetworking Broadcast Packet
* @param p_sourceLongPosVec Long position vector of source
* @param p_seqNumber Sequence number of GeoBroadcast packet
* @param p_broadcastArea Destination GeoArea
*/
template (present) GnNonSecuredPacket mw_geoNwBroadcastPacketWithAreaWithNextHeader(
template (present) LongPosVector p_sourceLongPosVec,
template (present) UInt16 p_seqNumber,
template (present) GeoBroadcastArea p_broadcastArea,
template (present) NextHeader p_nextHeader
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
) modifies mw_geoNwBroadcastPacketWithArea := {
commonHeader := {
nextHeader := p_nextHeader
}
}
} // end group geoNwPacketBroadcastTemplates
group geoNwPacketLsTemplates {
/**
* @desc Send template for GeoNetworking LS Request Packet
* @param p_sourceLongPosVec Long position vector of source
* @param p_seqNumber Sequence number of LS Request packet
* @param p_gnAddress Searched GN_Address
*/
template (value) GnNonSecuredPacket m_geoNwLsRequestPacket(
in template (value) LongPosVector p_sourceLongPosVec,
in template (value) UInt16 p_seqNumber,
in template (value) GN_Address p_gnAddress
) := {
commonHeader := m_commonHeader(
m_lsRequestHeaderType,
m_trafficClass,
c_defaultHopLimit
),
extendedHeader := m_lsRequestHeader(
p_sourceLongPosVec, p_seqNumber, p_gnAddress
),
payload := omit
}
/**
* @desc Receive template for GeoNetworking LS Request Packet
* @param p_seqNumber Sequence number of LS Request packet
* @param p_mid Searched GN_Address MID
*/
template (present) GnNonSecuredPacket mw_geoNwLsRequestPacket(
template (present) UInt16 p_seqNumber := ?,
template (present) GN_Address.mid p_mid := ?
m_lsRequestHeaderType
),
extendedHeader := mw_lsRequestHeader(
p_seqNumber,
p_mid
),
}
/**
* @desc Send template for GeoNetworking LS Reply Packet
* @param p_sourceLongPosVec Long position vector of source
* @param p_destinationLongPosVec Long position vector of destination
* @param p_seqNumber Sequence number of LS Reply packet
*/
template (value) GnNonSecuredPacket m_geoNwLsReplyPacket(
in template (value) LongPosVector p_sourceLongPosVec,
in template (value) ShortPosVector p_destinationLongPosVec,
in template (value) UInt16 p_seqNumber
) := {
commonHeader := m_commonHeader(
m_lsReplyHeaderType,
m_trafficClass,
c_defaultHopLimit
),
extendedHeader := m_lsReplyHeader(
p_sourceLongPosVec, p_destinationLongPosVec, p_seqNumber
),
payload := omit
}
/**
* @desc Receive template for GeoNetworking LS Reply Packet
* @param p_sourceLongPosVec Long position vector of source
* @param p_destinationLongPosVec Short position vector of destination
*/
template (present) GnNonSecuredPacket mw_geoNwLsReplyPacket(
template (present) LongPosVector p_sourceLongPosVec := ?,
template (present) ShortPosVector p_destinationLongPosVec := ?
m_lsReplyHeaderType
),
extendedHeader := mw_lsReplyHeader(
p_sourceLongPosVec, p_destinationLongPosVec
),
}
} // end group geoNwPacketLsTemplates
group geoNwPacketBeaconTemplates {
/**
* @desc Send template for GeoNetworking Beacon Packet
* @param p_sourceLongPosVec Long position vector of source
*/
template (value) GnNonSecuredPacket m_geoNwBeaconPacket(
in template (value) LongPosVector p_sourceLongPosVec
) := {
commonHeader := m_commonHeader(
),
extendedHeader := m_beaconHeader(
p_sourceLongPosVec
),
payload := omit
}
/**
* @desc Receive template for GeoNetworking Beacon Packet
* @param p_sourceLongPosVec Long position vector of source (Default: ?)
* @param p_nextHeader Next header (Default: e_any)
*/
template (present) GnNonSecuredPacket mw_geoNwBeaconPacket(
template (present) LongPosVector p_sourceLongPosVec := ?,
template (present) NextHeader p_nextHeader := e_any
commonHeader := mw_commonHeader_noPayload(
p_nextHeader,
m_beaconHeaderType
),
extendedHeader := mw_beaconHeader(p_sourceLongPosVec),
payload := '00000000000000000000'O ifpresent //(*, '00000000000000000000'O)
}
} // end group geoNwPacketBeaconTemplates
group geoNwPacketShbTemplates {
/**
* @desc Send template for GeoNetworking SHB Packet
* @param p_sourceLongPosVec Long position vector of source
*/
template (value) GnNonSecuredPacket m_geoNwShbPacket(
in template (value) LongPosVector p_sourceLongPosVec
) := {
commonHeader := valueof(m_commonHeader(
PX_GN_UPPER_LAYER,
m_shbHeaderType,
m_trafficClass,
c_defaultHopLimit
)),
extendedHeader := valueof(m_shbHeader(
payload := valueof(char2oct("DEFAULT_PAYLOAD"))
}
/**
* @desc Receive template for GeoNetworking SHB Packet
* @param p_sourceLongPosVec Long position vector of source (Default: ?)
* @param p_hopLimit Maximum number of hops (Default: ?)
*/
template (present) GnNonSecuredPacket mw_geoNwShbPacket(
template (present) LongPosVector p_sourceLongPosVec := ?,
template (present) UInt8 p_hopLimit := ?
commonHeader := mw_commonHeaderWithHopLimit(
m_shbHeaderType,
p_hopLimit
),
extendedHeader := mw_shbHeader(p_sourceLongPosVec),
}
} // end group geoNwPacketShbTemplates
group geoNwPacketTsbTemplates {
/**
* @desc Send template for GeoNetworking TSB Packet
* @param p_seqNumber Sequence number of TSB packet
* @param p_sourceLongPosVec Long position vector of source
* @param p_hopLimit The maximum number of hops (Default: c_defaultHopLimit)
*/
template (value) GnNonSecuredPacket m_geoNwTsbPacket(
in template (value) UInt16 p_seqNumber,
in template (value) LongPosVector p_sourceLongPosVec,
in template (value) UInt8 p_hopLimit := c_defaultHopLimit,
in template (value) TrafficClass p_trafficClass := m_trafficClass
commonHeader := valueof(m_commonHeader(
p_hopLimit
)),
extendedHeader := valueof(m_tsbHeader(
payload := valueof(char2oct("DEFAULT_PAYLOAD"))
}
/**
* @desc Receive template for GeoNetworking TSB Packet
* @param p_seqNumber Sequence number of TSB packet (Default: ?)
* @param p_sourceLongPosVec Long position vector of source (Default: ?)
*/
template (present) GnNonSecuredPacket mw_geoNwTsbPacket(
template (present) UInt16 p_seqNumber := ?,
template (present) LongPosVector p_sourceLongPosVec := ?
) := {
commonHeader := mw_commonHeader(
PX_GN_UPPER_LAYER,
m_tsbHeaderType
),
extendedHeader := mw_tsbHeader(p_seqNumber, p_sourceLongPosVec),
tepelmann
committed
/**
* @desc Receive template for GeoNetworking TSB Packet
* @param p_seqNumber Sequence number of TSB packet (Default: ?)
* @param p_sourceLongPosVec Long position vector of source (Default: ?)
* @param p_hopLimit The maximum number of hops (Default: ?)
*/
template (present) GnNonSecuredPacket mw_geoNwTsbPacketWithHl(
template (present) UInt16 p_seqNumber := ?,
template (present) LongPosVector p_sourceLongPosVec := ?,
template (present) UInt8 p_hopLimit := ?
tepelmann
committed
) modifies mw_geoNwTsbPacket := {
commonHeader := mw_commonHeaderWithHopLimit(
PX_GN_UPPER_LAYER,
m_tsbHeaderType,
p_hopLimit
)
}
/**
* @desc Receive template for GeoNetworking TSB Packet
* @param p_seqNumber Sequence number of TSB packet (Default: ?)
* @param p_sourceLongPosVec Long position vector of source (Default: ?)
* @param p_nextHeader Id of next header
*/
template (present) GnNonSecuredPacket mw_geoNwTsbPacketWithNextHeader(
template (present) UInt16 p_seqNumber := ?,
template (present) LongPosVector p_sourceLongPosVec := ?,
in template (value) NextHeader p_nextHeader
) modifies mw_geoNwTsbPacket := {
commonHeader := {
nextHeader := p_nextHeader
}
}
} // end group geoNwPacketTsbTemplates
} // end group geoNwPacketTemplates
group geoNwHeadersTemplates {
* @param p_lifeTime Lifetime of GeoNetworking message
* @param p_hopLimit Router Hop limit of GeoNetworking message
*/
template (value) BasicHeader m_basicHeader(
in template (value) Lifetime p_lifeTime := m_defaultLifetime,
in template (value) UInt8 p_hopLimit := c_defaultHopLimit
) := {
reserved := 0,
lifeTime := p_lifeTime,
routerHopLimit := p_hopLimit
}
/**
* @param p_lifeTime Lifetime of GeoNetworking message
* @param p_hopLimit Router Hop limit of GeoNetworking message
*/
template (present) BasicHeader mw_basicHeader(
template (present) Lifetime p_lifeTime := ?,
template (present) UInt8 p_hopLimit := ?
nextHeader := ?,
reserved := ?,
lifeTime := p_lifeTime,
routerHopLimit := p_hopLimit
}
/**
* @desc Send template for Secured Basic header
*
* @param p_lifeTime Lifetime of GeoNetworking message
* @param p_hopLimit Router Hop limit of GeoNetworking message
*/
template (value) BasicHeader m_securedBasicHeader(
in template (value) Lifetime p_lifeTime := {
multiplier := c_defaultLifetime,
ltBase := e_100s
}/*FIXME Bug TITAN ? m_defaultLifetime*/,
in template (value) UInt8 p_hopLimit := c_defaultHopLimit
) := {
version := c_geoNwProtocolVersion,
nextHeader := e_securedPacket,
reserved := 0,
lifeTime := p_lifeTime,
routerHopLimit := p_hopLimit
} // End of template m_securedBasicHeader
/**
* @desc Receive template for Secured Basic header
*
* @param p_lifeTime Lifetime of GeoNetworking message
* @param p_hopLimit Router Hop limit of GeoNetworking message
*/
template (present) BasicHeader mw_securedBasicHeader(
template (present) Lifetime p_lifeTime := ?,
template (present) UInt8 p_hopLimit := ?
) := {
version := c_geoNwProtocolVersion,
nextHeader := e_securedPacket,
reserved := ?,
lifeTime := p_lifeTime,
routerHopLimit := p_hopLimit
} // End of template mw_securedBasicHeader
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
/**
* @desc Default send template for Lifetime field
*/
template (value) Lifetime m_defaultLifetime := {
multiplier := c_defaultLifetime,
ltBase := e_100s
}
/**
* @desc Send template for Lifetime field (Base = 1s)
*/
template (value) Lifetime m_lifetimeBase1s(
in template (value) UInt6 p_multiplier
) := {
multiplier := p_multiplier,
ltBase := e_1s
}
/**
* @desc Receive template for lifetime 0
*/
template (present) Lifetime mw_lifetime0 := {
multiplier := 0,
ltBase := ?
}
} //end group geoNwBasicHeaderTemplates
* @param p_nextHeader Id of next header
* @param p_trafficClass Packet's traffic class
* @param p_headerTypeSubType Header's type and sub-type
* @param p_hopLimit Maximum number of hops
* @remark plLength field is set to 0 and has to be computed by codec
template (value) CommonHeader m_commonHeader (
in template (value) HeaderTST p_headerTypeSubType,
) := {
nextHeader := p_nextHeader,
reserved := c_uInt8Zero,
headerTST := p_headerTypeSubType,
trafficClass := p_trafficClass,
plLength := 0, // will be computed by Codec
/**
* @desc Receive template for Common header
* @param p_nextHeader Id of next header
* @param p_headerTypeSubType Header's type and sub-type
template (present) CommonHeader mw_commonHeader (
template (present) NextHeader p_nextHeader := ?,
template (present) HeaderTST p_headerTypeSubType := ?
) := {
nextHeader := p_nextHeader,
headerTST := p_headerTypeSubType,
trafficClass := ?,
/**
* @desc Receive template for Common header with no payload
* @param p_nextHeader Id of next header
* @param p_headerTypeSubType Header's type and sub-type
*/
template (present) CommonHeader mw_commonHeader_noPayload (
template (present) NextHeader p_nextHeader := ?,
template (present) HeaderTST p_headerTypeSubType := ?
) modifies mw_commonHeader := {
plLength := 0
}
/**
* @desc Receive template for Common header with specific Hop limit
* @param p_headerTypeSubType Header's type and sub-type
template (present) CommonHeader mw_commonHeaderWithHopLimit (
template (present) NextHeader p_nextHeader := ?,
template (present) HeaderTST p_headerTypeSubType := ?,
template (present) UInt8 p_hopLimit := ?
) modifies mw_commonHeader := {
/**
* @desc Receive template for Common header with specific Hop limit
* @param p_senderLongPosVec Long position vector of sender
* @param p_nextHeader Id of next header
* @param p_headerTypeSubType Header's type and sub-type
* @param p_hopLimit Maximum number of hops
* @param p_flags Flags in the common header
* @see mw_commonHeaderWithHopLimit
*/
template (present) CommonHeader mw_commonHeaderWithHopLimitAndFlags (
template (present) NextHeader p_nextHeader := ?,
template (present) HeaderTST p_headerTypeSubType := ?,
template (present) UInt8 p_hopLimit := ?,
template (present) Bit8 p_flags := ?
) modifies mw_commonHeaderWithHopLimit := {
flags := p_flags
}
* @desc Receive template for Common header with specific Traffic Class
* @param p_senderLongPosVec Long position vector of sender
* @param p_headerTypeSubType Header's type and sub-type
* @param p_trafficClass Packet's traffic class
template (present) CommonHeader mw_commonHeaderWithTrafficClass (
template (present) NextHeader p_nextHeader := ?,
template (present) HeaderTST p_headerTypeSubType := ?,
template (present) TrafficClass p_trafficClass := ?
) modifies mw_commonHeader := {
trafficClass := p_trafficClass
}
/**
* @desc Default send template for traffic class
template (value) TrafficClass m_trafficClass ( in SCF p_scf := e_scfEnabled, in ChannelOffload p_ChOff := e_choffDisabled ) := {
/**
* @desc Receive template for traffic class
template TrafficClass mw_trafficClass ( in template(present) SCF p_scf := ?, in template(present) ChannelOffload p_ChOff := ? ) := {
scf := p_scf,
channelOffload := p_ChOff,
tcId := ?
}
/**
* @desc Receive template for any GN_Address
template GN_Address mw_gnAddressAny := {
typeOfAddress := ?,
stationType := ?,
stationCountryCode := ?,
mid := ?
}
/**
* @desc Receive template for GN_Address
* @param p_stationType Station's type
* @param p_stationCountryCode Station's country code
template (present) StationType p_stationType,
template (present) UInt10 p_stationCountryCode
) := {
typeOfAddress := ?,
stationType := p_stationType,
stationCountryCode := p_stationCountryCode,
mid := ?
}
/**
* @desc Receive template for long position vector with specific GN_Address
* @param p_gnAddress GN_Address to be contained in the long position vector
timestamp_ := ?,
* @desc Receive template for long position vector with strict position check
* @param p_longPosVector The base long position vector
*/
template (present) LongPosVector mw_longPosVectorPosition(
template (present) LongPosVector p_longPosVector := ?
tepelmann
committed
gnAddr := p_longPosVector.gnAddr,
timestamp_ := ?,
latitude := f_getDelta32(valueof(p_longPosVector.latitude), PX_POS_DELTA),
longitude := f_getDelta32(valueof(p_longPosVector.longitude), PX_POS_DELTA),
//FIXME May the delta factor should be based on the actual speed value -> low speed=lower delta, high speed=higher delta
speed := f_getDelta15(valueof(p_longPosVector.speed), float2int(int2float(valueof(p_longPosVector.speed)) * 0.03)),
* @desc Receive template for short position vector with strict position check
* @param p_shortPosVector The base short position vector
*/
template (present) ShortPosVector mw_shortPosVectorPosition(
template (present) ShortPosVector p_shortPosVector := ?
gnAddr := p_shortPosVector.gnAddr,
timestamp_ := ?,
latitude := f_getDelta32(valueof(p_shortPosVector.latitude), PX_POS_DELTA),
longitude := f_getDelta32(valueof(p_shortPosVector.longitude), PX_POS_DELTA)
* @desc Receive template for short position vector without position check
* @param p_shortPosVector The base short position vector
*/
template (present) ShortPosVector mw_shortPosVectorPosition_anyPos(
template (present) ShortPosVector p_shortPosVector := ?
) modifies mw_shortPosVectorPosition := {
latitude := ?,
longitude := ?
}
function f_getDelta32(Int32 p_value, integer p_delta) return template (present) Int32 {
if (p_value == c_int32Min) {
return (p_value .. p_value+p_delta);
}
if (p_value == c_int32Max) {
return (p_value-p_delta .. p_value);
}
return (p_value-p_delta .. p_value+p_delta);
}
function f_getDelta15(Int32 p_value, integer p_delta) return template (present) Int15 {
log(">>> f_getDelta15: ", p_value, ", ", p_delta);
if (p_value == c_int15Min) {
return (p_value .. p_value+p_delta);
}
if (p_value == c_int15Max) {
return (p_value-p_delta .. p_value);
}
return (p_value-p_delta .. p_value+p_delta);
}
} // end geoNwCommonHeaderTemplates
/**
* @desc Send template for GeoUnicast header
* @param p_sourceLongPosVec Long position vector of source
* @param p_destinationLongPosVec Long position vector of destination
* @param p_seqNumber Sequence number of GeoUnicast packet
template (value) ExtendedHeader m_geoUnicastHeader(
in template (value) LongPosVector p_sourceLongPosVec,
in template (value) ShortPosVector p_destinationLongPosVec,
in template (value) UInt16 p_seqNumber
) := {
geoUnicastHeader := {
seqNumber := p_seqNumber,
reserved := c_uInt8Zero,
/**
* @desc Receive template for GeoUnicast header
* @param p_senderLongPosVec Long position vector of sender
* @param p_destinationShortPosVec Long position vector of destination
* @param p_seqNumber Sequence number of GeoUnicast packet
template (present) ExtendedHeader mw_geoUnicastHeader(
template (present) ShortPosVector p_destinationShortPosVec := ?,
template (present) UInt16 p_seqNumber := ?
geoUnicastHeader := {
seqNumber := p_seqNumber,
* @desc Receive template for GeoUnicast header with source long position vector
* @param p_destinationShortPosVec Long position vector of destination
* @param p_seqNumber Sequence number of GeoUnicast packet
* @param p_srcLongPosVec Long position vector of source
template (present) ExtendedHeader mw_geoUnicastHeaderWithSourcePv(
template (present) ShortPosVector p_destinationShortPosVec := ?,
template (present) UInt16 p_seqNumber := ?,
template (present) LongPosVector p_srcLongPosVec := ?
/**
* @desc Send template for GeoUnicast header type
*/
template (value) HeaderTST m_geoUnicastHeaderType := {
/**
* @desc Receive template for GeoUnicast header type
template HeaderTST mw_geoUnicastHeaderType := {
geoUnicastHdr := {
group geoBroadcastHeaderTemplates {
/**
* @desc Send template for GeoBroadcast header
* @param p_sourceLongPosVec Long position vector of source
* @param p_seqNumber Sequence number of GeoBroadcast packet
* @param p_broadcastArea Destination GeoArea
template (value) ExtendedHeader m_geoBroadcastHeader(
in template (value) LongPosVector p_sourceLongPosVec,
in template (value) UInt16 p_seqNumber,
in template (value) GeoBroadcastArea p_broadcastArea
geoBroadcastHeader := {
seqNumber := valueof(p_seqNumber),
srcPosVector := valueof(p_sourceLongPosVec),
geoAreaPosLatitude := valueof(p_broadcastArea.geoBroadcastArea.geoAreaPosLatitude),
geoAreaPosLongitude := valueof(p_broadcastArea.geoBroadcastArea.geoAreaPosLongitude),
distanceA := valueof(p_broadcastArea.geoBroadcastArea.distanceA),
distanceB := valueof(p_broadcastArea.geoBroadcastArea.distanceB),
angle := valueof(p_broadcastArea.geoBroadcastArea.angle),
/**
* @desc Receive template for GeoBroadcast header for any GeoArea
* @param p_sourceLongPosVec Long position vector of source
* @param p_senderLongPosVec Long position vector of sender
* @param p_seqNumber Sequence number of GeoBroadcast packet
template (present) ExtendedHeader mw_geoBroadcastHeader(
template (present) LongPosVector p_sourceLongPosVec := ?,
template (present) UInt16 p_seqNumber := ?
) := {
geoBroadcastHeader := {
srcPosVector := p_sourceLongPosVec,
geoAreaPosLatitude := ?,
geoAreaPosLongitude := ?,
distanceA := ?,
distanceB := ?,
angle := ?,
* @desc Receive template for GeoBroadcast header
* @param p_sourceLongPosVec Long position vector of source
* @param p_senderLongPosVec Long position vector of sender
* @param p_seqNumber Sequence number of GeoBroadcast packet
template (present) ExtendedHeader mw_geoBroadcastHeaderWithArea (
template (present) LongPosVector p_sourceLongPosVec := ?,
template (present) UInt16 p_seqNumber := ?,
template (present) GeoBroadcastArea p_broadcastArea := ?
) modifies mw_geoBroadcastHeader := {
geoBroadcastHeader := {
geoAreaPosLatitude := p_broadcastArea.geoBroadcastArea.geoAreaPosLatitude,
geoAreaPosLongitude := p_broadcastArea.geoBroadcastArea.geoAreaPosLongitude,
distanceA := p_broadcastArea.geoBroadcastArea.distanceA,
distanceB := p_broadcastArea.geoBroadcastArea.distanceB,
angle := p_broadcastArea.geoBroadcastArea.angle
/**
* @desc Send template for GeoBroadcast header type
* @param p_headerSubType Packet's subtype
template (value) HeaderTST m_geoBroadcastHeaderType(
in template (value) HeaderSubTypeGeoBroadcast p_headerSubType
) := {
geoBroadcastHdr := {
headerType := e_geoBroadcast,
headerSubType := p_headerSubType
template (present) HeaderTST mw_geoBroadcastHeaderType := {
headerType := e_geoBroadcast,
headerSubType := ?
/**
* @desc Receive template for GeoBroadcast header type with sub-type
template (present) HeaderTST mw_geoBroadcastHeaderTypeWithSubType(
template (present) HeaderSubTypeGeoBroadcast p_headerSubType := ?
) modifies mw_geoBroadcastHeaderType := {
geoBroadcastHdr := {
} // end geoBroadcastHeaderTemplates
/**
* @desc Send template for GeoAnycast header
* @param p_sourceLongPosVec Long position vector of source
* @param p_seqNumber Sequence number of GeoAnycast packet
* @param p_anycastArea Destination GeoArea
template (value) ExtendedHeader m_geoAnycastHeader(
in template (value) LongPosVector p_sourceLongPosVec,
in template (value) UInt16 p_seqNumber,
in template (value) GeoAnycastArea p_anycastArea
geoAnycastHeader := {
seqNumber := valueof(p_seqNumber),
srcPosVector := valueof(p_sourceLongPosVec),
geoAreaPosLatitude := valueof(p_anycastArea.geoAnycastArea.geoAreaPosLatitude),
geoAreaPosLongitude := valueof(p_anycastArea.geoAnycastArea.geoAreaPosLongitude),
distanceA := valueof(p_anycastArea.geoAnycastArea.distanceA),
distanceB := valueof(p_anycastArea.geoAnycastArea.distanceB),
angle := valueof(p_anycastArea.geoAnycastArea.angle),
/**
* @desc Receive template for GeoAnycast header for any GeoArea
* @param p_sourceLongPosVec Long position vector of source
* @param p_senderLongPosVec Long position vector of sender
* @param p_seqNumber Sequence number of GeoAnycast packet
template (present) ExtendedHeader mw_geoAnycastHeader(
template (present) LongPosVector p_sourceLongPosVec := ?,
template (present) UInt16 p_seqNumber := ?
) := {
geoAnycastHeader := {
seqNumber := p_seqNumber,
srcPosVector := p_sourceLongPosVec,
geoAreaPosLatitude := ?,
geoAreaPosLongitude := ?,
distanceA := ?,
distanceB := ?,
angle := ?,
* @desc Receive template for GeoAnycast header
* @param p_sourceLongPosVec Long position vector of source
* @param p_senderLongPosVec Long position vector of sender
* @param p_seqNumber Sequence number of GeoAnycast packet
template (present) ExtendedHeader mw_geoAnycastHeaderWithArea (
template (present) LongPosVector p_sourceLongPosVec := ?,
template (present) UInt16 p_seqNumber := ?,
template (present) GeoAnycastArea p_anycastArea := ?
) modifies mw_geoAnycastHeader := {
geoAnycastHeader := {
geoAreaPosLatitude := p_anycastArea.geoAnycastArea.geoAreaPosLatitude,
geoAreaPosLongitude := p_anycastArea.geoAnycastArea.geoAreaPosLongitude,
distanceA := p_anycastArea.geoAnycastArea.distanceA,
distanceB := p_anycastArea.geoAnycastArea.distanceB,
angle := p_anycastArea.geoAnycastArea.angle
}
}
/**
* @desc Send template for GeoBroadcast header type with sub-type
* @param p_headerSubType Packet's subtype
template (value) HeaderTST m_geoAnycastHeaderType(
in template (value) HeaderSubTypeGeoAnycast p_headerSubType
) := {
geoAnycastHdr := {
headerType := e_geoAnycast,
headerSubType := p_headerSubType
}
* @desc Receive template for GeoAnycast header type with any sub-type
template (present)HeaderTST mw_geoAnycastHeaderType := {
geoAnycastHdr := {
headerType := e_geoAnycast,
headerSubType := ?
}
* @desc Receive template for GeoAnycast header type with sub-type
template (present) HeaderTST mw_geoAnycastHeaderTypeWithSubType(
template (present) HeaderSubTypeGeoAnycast p_headerSubType := ?
) modifies mw_geoAnycastHeaderType := {
geoAnycastHdr := {
headerSubType := p_headerSubType
}
/**
* @desc Send template for LS Request header
* @param p_sourceLongPosVec Long position vector of source
* @param p_seqNumber Sequence number of LS Request packet
* @param p_gnAddress Searched GN_Address
template (value) ExtendedHeader m_lsRequestHeader(
in template (value) LongPosVector p_sourceLongPosVec,
in template (value) UInt16 p_seqNumber,
seqNumber := p_seqNumber,
reserved := c_uInt8Zero,
srcPosVector := p_sourceLongPosVec,
gnAddress := p_gnAddress
/**
* @desc Receive template for LS Request header
* @param p_seqNumber Sequence number of LS Request packet
template (present) UInt16 p_seqNumber := ?,
template (present) GN_Address.mid p_mid := ?
) := {
lsRequestHeader := {
seqNumber := p_seqNumber,
berge
committed
gnAddress := mw_gnAddressMid(p_mid)
/**
* @desc Send template for LS Request header type
template (value) HeaderTST m_lsRequestHeaderType := {
lsHdr := {
headerType := e_locationService,
headerSubType := e_lsRequest
/**
* @desc Receive template for LS Request header type
template HeaderTST mw_lsRequestHeaderType := {
lsHdr := {
headerType := e_locationService,
headerSubType := e_lsRequest
group lsReplyHeaderTemplates {
/**
* @desc Send template for LS Reply header
* @param p_sourceLongPosVec Long position vector of source
* @param p_destinationLongPosVec Long position vector of destination
* @param p_seqNumber Sequence number of LS Reply packet
in template (value) LongPosVector p_sourceLongPosVec,
in template (value) ShortPosVector p_destinationLongPosVec,
in template (value) UInt16 p_seqNumber
) := {
lsReplyHeader := {
seqNumber := p_seqNumber,
reserved := c_uInt8Zero,
srcPosVector := p_sourceLongPosVec,
dstPosVector := p_destinationLongPosVec
}
}
template (present) ExtendedHeader mw_lsReplyHeaderAny := {
lsReplyHeader := {
reserved := ?,
srcPosVector := ?,
dstPosVector := ?
}
}
* @param p_sourceLongPosVec Long position vector of source
* @param p_destinationLongPosVec Short position vector of destination
template (present) ExtendedHeader mw_lsReplyHeader(
template (present) LongPosVector p_sourceLongPosVec := ?,
template (present) ShortPosVector p_destinationLongPosVec := ?
) modifies mw_lsReplyHeaderAny := {
lsReplyHeader := {
srcPosVector := p_sourceLongPosVec,
dstPosVector := p_destinationLongPosVec
}
/**
* @desc Send template for LS Reply header type
template (value) HeaderTST m_lsReplyHeaderType := {
lsHdr := {
headerType := e_locationService,
headerSubType := e_lsReply
}
/**
* @desc Send template for Beacon header
* @param p_sourceLongPosVec Long position vector of source
template (value) ExtendedHeader m_beaconHeader(
in template (value) LongPosVector p_sourceLongPosVec
/**
* @desc Receive template for Beacon header
* @param p_sourceLongPosVec Long position vector of source
template (present) ExtendedHeader mw_beaconHeader(
template (present) LongPosVector p_sourceLongPosVec := ?
/**
* @desc Send template for Beacon header type
template (value) HeaderTST m_beaconHeaderType := {
beaconHdr := {
/**
* @desc Receive template for Beacon header type
template HeaderTST mw_beaconHeaderType := {
beaconHdr := {
group shbHeaderTemplates {
* @param p_sourceLongPosVec Long position vector of sender
template (value) ExtendedHeader m_shbHeader(
in template (value) LongPosVector p_sourceLongPosVec
) := {
shbHeader := {
srcPosVector := p_sourceLongPosVec,
reserved := 0
}
}
/**
* @desc Receive template for SHB header
* @param p_sourceLongPosVec Long position vector of sender
shbHeader := {
srcPosVector:= p_sourceLongPosVec,
reserved := ?
}
}
/**
* @desc Send template for SHB header type
template (value) HeaderTST m_shbHeaderType := {
tsbHdr := {
headerType := e_topologicallyScopedBroadcast,
headerSubType := e_singleHop
}
} // end shbHeaderTemplates
/**
* @desc Send template for TSB header
* @param p_seqNumber Sequence number of TSB packet
* @param p_srcPosVector Long position vector of source
in template (value) UInt16 p_seqNumber,
in template (value) LongPosVector p_srcPosVector
) := {
tsbHeader := {
seqNumber := p_seqNumber,
reserved := c_uInt8Zero,
srcPosVector := p_srcPosVector
}
}
/**
* @desc Receive template for TSB header
* @param p_seqNumber Sequence number of TSB packet
* @param p_sourceLongPosVec Long position vector of source
template (present) UInt16 p_seqNumber,
template (present) LongPosVector p_sourceLongPosVec
) := {
tsbHeader := {
seqNumber := p_seqNumber,
reserved := ?,
srcPosVector := p_sourceLongPosVec
}
}
template (value) HeaderTST m_tsbHeaderType := {
tsbHdr := {
headerType := e_topologicallyScopedBroadcast,
headerSubType := e_multiHop
template (present) HeaderTST mw_tsbHeaderType := {
tsbHdr := {
headerType := e_topologicallyScopedBroadcast,
headerSubType := e_multiHop
}
} // end geoNwHeadersTemplates
* @desc Receive template for GN_Address. Only M_ID field is discriminent
template (present) GN_Address mw_gnAddressMid(
template (present) GN_Address.mid p_mid := ?
) := {
typeOfAddress := ?,
stationType := ?,
stationCountryCode := ?,
mid := p_mid
}
template (value) GN_Address m_dummyGnAddr := {
typeOfAddress := e_manual,
mid := c_6ZeroBytes
/**
* @desc Dummy template for long position vector
template (value) LongPosVector m_dummyLongPosVector := {
timestamp_ := c_uInt32Zero,
/**
* @desc Dummy template for Area
template (value) Area m_dummyArea := {
geoAreaPosLatitude := c_uInt32Zero,
geoAreaPosLongitude := c_uInt32Zero,
distanceA := c_uInt16Zero,
distanceB := c_uInt16Zero,
/**
* @desc Dummy template for GeoBroadcastArea
template (value) GeoBroadcastArea m_dummyGeoBroadcastArea := {
geoBroadcastSubType := e_geoBroadcastRect,
geoBroadcastArea := m_dummyArea
}
} // end geoDummyTemplates
} // end geoMiscTemplates