Loading ttcn/GeoNetworking/LibItsGeoNetworking_Functions.ttcn +270 −77 File changed.Preview size limit exceeded, changes collapsed. Show changes ttcn/GeoNetworking/LibItsGeoNetworking_Templates.ttcn +17 −18 Original line number Original line Diff line number Diff line Loading @@ -263,8 +263,9 @@ module LibItsGeoNetworking_Templates { } } /** /** * @desc Testsystem will start beaconing for the given neighbor * @desc Testsystem will start beaconing for multiple neighbors * @param p_beaconHeader The neighbor information * @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) AcGnPrimitive m_startBeaconingMultipleNeighbour( template (value) BeaconHeader p_beaconHeader, template (value) BeaconHeader p_beaconHeader, Loading @@ -277,7 +278,7 @@ module LibItsGeoNetworking_Templates { } } /** /** * @desc Testsystem will stop beaconing for the given neighbor * @desc Testsystem will stop beaconing for multiple neighbors * @param p_compName The neighbor * @param p_compName The neighbor */ */ template AcGnPrimitive m_stopBeaconingMultipleNeighbour := { template AcGnPrimitive m_stopBeaconingMultipleNeighbour := { Loading Loading @@ -427,7 +428,7 @@ module LibItsGeoNetworking_Templates { } } /** /** * @desc Receive template for Beacon header * @desc Receive template for Beacon common header * @param p_trafficClass Packet's traffic class * @param p_trafficClass Packet's traffic class * @param p_hopLimit Maximum number of hops * @param p_hopLimit Maximum number of hops * @param p_senderLongPosVec Long position vector of sender * @param p_senderLongPosVec Long position vector of sender Loading @@ -438,10 +439,10 @@ module LibItsGeoNetworking_Templates { in template (present) LongPosVector p_senderLongPosVec in template (present) LongPosVector p_senderLongPosVec ) := { ) := { version := c_geoNwProtocolVersion, version := c_geoNwProtocolVersion, nextHeader := e_any, // 0 nextHeader := e_any, headerTST := { headerTST := { beaconHdr := { beaconHdr := { headerType := e_beacon, // 1 headerType := e_beacon, headerSubType := 0 headerSubType := 0 } } }, }, Loading Loading @@ -471,7 +472,7 @@ module LibItsGeoNetworking_Templates { } } /** /** * @desc Receive template for Common header with specific Hop limit * @desc Receive template for Common header with specific Traffic Class * @param p_senderLongPosVec Long position vector of sender * @param p_senderLongPosVec Long position vector of sender * @param p_nextHeader Id of next header * @param p_nextHeader Id of next header * @param p_headerTypeSubType Header's type and sub-type * @param p_headerTypeSubType Header's type and sub-type Loading Loading @@ -697,7 +698,7 @@ module LibItsGeoNetworking_Templates { } } /** /** * @desc Receive template for GeoUnicast header with source long position vector * @desc Receive template for GeoUnicast header with specific hop limit * @param p_senderLongPosVec Long position vector of sender * @param p_senderLongPosVec Long position vector of sender * @param p_destinationShortPosVec Long position vector of destination * @param p_destinationShortPosVec Long position vector of destination * @param p_seqNumber Sequence number of GeoUnicast packet * @param p_seqNumber Sequence number of GeoUnicast packet Loading @@ -719,9 +720,8 @@ module LibItsGeoNetworking_Templates { /** /** * @desc Receive template for GeoUnicast header with common header and lifetime * @desc Receive template for GeoUnicast header with common header and lifetime * @param p_senderLongPosVec Long position vector of sender * @param p_sourceLongPosVec Long position vector of source * @param p_destinationShortPosVec Long position vector of destination * @param p_destinationLongPosVec Long position vector of destination * @param p_stationType Station type of sender * @param p_seqNumber Sequence number of GeoUnicast packet * @param p_seqNumber Sequence number of GeoUnicast packet * @param p_commonHeader Common header * @param p_commonHeader Common header * @param p_lifetime lifetime of the packet * @param p_lifetime lifetime of the packet Loading Loading @@ -805,7 +805,6 @@ module LibItsGeoNetworking_Templates { * @desc Send template for GeoBroadcast header with hop limit * @desc Send template for GeoBroadcast header with hop limit * @param p_sourceLongPosVec Long position vector of source * @param p_sourceLongPosVec Long position vector of source * @param p_senderLongPosVec Long position vector of sender * @param p_senderLongPosVec Long position vector of sender * @param p_stationType Station type of sender * @param p_seqNumber Sequence number of GeoBroadcast packet * @param p_seqNumber Sequence number of GeoBroadcast packet * @param p_broadcastArea Destination GeoArea * @param p_broadcastArea Destination GeoArea * @param p_hopLimit Maximum number of hops * @param p_hopLimit Maximum number of hops Loading Loading @@ -1188,7 +1187,7 @@ module LibItsGeoNetworking_Templates { } } /** /** * @desc Receive template for GeoBroadcast header * @desc Receive template for GeoAnycast header type with any sub-type */ */ template HeaderTST mw_geoAnycastHeaderType := { template HeaderTST mw_geoAnycastHeaderType := { geoAnycastHdr := { geoAnycastHdr := { Loading @@ -1198,7 +1197,7 @@ module LibItsGeoNetworking_Templates { } } /** /** * @desc Receive template for GeoBroadcast header type with sub-type * @desc Receive template for GeoAnycast header type with sub-type * @param p_headerSubType Packet's subtype * @param p_headerSubType Packet's subtype * @see mw_geoAnycastHeaderType * @see mw_geoAnycastHeaderType */ */ Loading ttcn/GeoNetworking/LibItsGeoNetworking_TypesAndValues.ttcn +121 −0 Original line number Original line Diff line number Diff line Loading @@ -51,13 +51,29 @@ module LibItsGeoNetworking_TypesAndValues { group geoConfigurationTypes { group geoConfigurationTypes { /** * @desc Entry of position table * @member key Reference key of the entry * @member position Position vector stored in the entry */ type record PositionEntry { type record PositionEntry { charstring key, charstring key, LongPosVector position LongPosVector position } } /** * @desc Table containing node positions */ type record of PositionEntry PositionTable; type record of PositionEntry PositionTable; /** * @desc Parameters of a geometric area * @member geoAreaPosLatitude Latitude of area's center * @member geoAreaPosLongitude Longitude of area's center * @member distanceA Distance A * @member distanceB Distance B * @member angle Angle */ type record Area { type record Area { UInt32 geoAreaPosLatitude, UInt32 geoAreaPosLatitude, UInt32 geoAreaPosLongitude, UInt32 geoAreaPosLongitude, Loading @@ -66,21 +82,39 @@ module LibItsGeoNetworking_TypesAndValues { UInt8 angle UInt8 angle } } /** * @desc Compact definition of GeoBroadcastArea * @member geoBroadcastSubType Type of GeoBroadcastArea (=shape) * @member geoBroadcastArea Parameters of the geometric area */ type record GeoBroadcastArea { type record GeoBroadcastArea { HeaderSubTypeGeoBroadcast geoBroadcastSubType, HeaderSubTypeGeoBroadcast geoBroadcastSubType, Area geoBroadcastArea Area geoBroadcastArea } } /** * @desc Compact definition of GeoAnycastArea * @member geoAnycastSubType Type of GeoAnycastArea (=shape) * @member geoAnycastArea Parameters of the geometric area */ type record GeoAnycastArea { type record GeoAnycastArea { HeaderSubTypeGeoAnycast geoAnycastSubType, HeaderSubTypeGeoAnycast geoAnycastSubType, Area geoAnycastArea Area geoAnycastArea } } /** * @desc Compact definition of a GeoArea (either GeoBroadcastArea or GeoAnycastArea) * @member shape Shape of the GeoArea * @member area Parameters of the geometric area */ type record GeoArea { type record GeoArea { GeoShape shape, GeoShape shape, Area area Area area } } /** * @desc Geometric shapes used to define GeoAreas */ type enumerated GeoShape { type enumerated GeoShape { e_geoCircle(0), e_geoCircle(0), e_geoRect(1), e_geoRect(1), Loading @@ -88,11 +122,19 @@ module LibItsGeoNetworking_TypesAndValues { e_reserved e_reserved } } /** * @desc Entry of GeoArea table * @member key Reference key of the entry * @member geoArea GeoArea stored in the entry */ type record GeoAreaEntry { type record GeoAreaEntry { charstring key, charstring key, GeoArea geoArea GeoArea geoArea } } /** * @desc Table containing geoArea definitions */ type record of GeoAreaEntry GeoAreaTable; type record of GeoAreaEntry GeoAreaTable; } // end geoConfigurationTypes } // end geoConfigurationTypes Loading @@ -100,10 +142,12 @@ module LibItsGeoNetworking_TypesAndValues { group geoNwValues { group geoNwValues { group geoNwHeaderConstants { group geoNwHeaderConstants { const UInt4 c_geoNwProtocolVersion := 0; const UInt4 c_geoNwProtocolVersion := 0; const UInt8 c_hopLimit1 := 1; const UInt8 c_hopLimit1 := 1; const UInt8 c_defaultHopLimit := 10; const UInt8 c_defaultHopLimit := 10; } // end geoNwHeaderConstants } // end geoNwHeaderConstants } // end geoNwValues } // end geoNwValues Loading Loading @@ -844,9 +888,22 @@ module LibItsGeoNetworking_TypesAndValues { group utPrimitives { group utPrimitives { /** * @desc Upper tester primitive to initialise IUT */ type record UtGNInitialize { type record UtGNInitialize { } } /** * @desc UT primitives for GeoNetworking * @member geoUnicast - * @member geoBroadcast - * @member geoAnycast - * @member shb - * @member tsb - * @member changePosition - * @member checkPacket - */ type union UtGNEvent { type union UtGNEvent { GenerateGeoUnicastMessage geoUnicast, GenerateGeoUnicastMessage geoUnicast, GenerateGeoBroadcastMessage geoBroadcast, GenerateGeoBroadcastMessage geoBroadcast, Loading @@ -857,25 +914,49 @@ module LibItsGeoNetworking_TypesAndValues { GeoNetworkingPacket checkPacket GeoNetworkingPacket checkPacket } } /** * @desc UT primitive for IUT to send a GeoUnicast packet * @member gnAddress Destination of the packet * @member lifetime Lifetime of the packet * @member payload Payload of the packet */ type record GenerateGeoUnicastMessage { type record GenerateGeoUnicastMessage { GN_Address gnAddress, GN_Address gnAddress, integer lifetime optional, integer lifetime optional, Payload payload optional Payload payload optional } } /** * @desc UT primitive for IUT to send a GeoBroadcast packet * @member area Destination GeoArea * @member payload Payload of the packet */ type record GenerateGeoBroadcastMessage { type record GenerateGeoBroadcastMessage { GeoArea area, GeoArea area, Payload payload optional Payload payload optional } } /** * @desc UT primitive for IUT to send a Geoanycast packet */ type GenerateGeoBroadcastMessage GenerateGeoAnycastMessage; type GenerateGeoBroadcastMessage GenerateGeoAnycastMessage; /** * @desc UT primitive for IUT to send a SHB packet * @member payload Payload of the packet */ type record GenerateSHBMessage { type record GenerateSHBMessage { Payload payload optional Payload payload optional } } /** * @desc UT primitive for IUT to send a TSB packet */ type GenerateSHBMessage GenerateTSBMessage; type GenerateSHBMessage GenerateTSBMessage; /** * @desc UT primitive for IUT to change its position */ type record ChangePosition { type record ChangePosition { } } Loading @@ -883,6 +964,16 @@ module LibItsGeoNetworking_TypesAndValues { group acPrimitives { group acPrimitives { /** * @desc TA primitives for GeoNetworking * @member startBeaconing - * @member stopBeaconing - * @member startPassBeaconing - * @member stopPassBeaconing - * @member startBeaconingMultipleNeighbour - * @member stopBeaconingMultipleNeighbour - * @member getLongPosVector - */ type union AcGnPrimitive { type union AcGnPrimitive { AcStartBeaconing startBeaconing, AcStartBeaconing startBeaconing, AcStopBeaconing stopBeaconing, AcStopBeaconing stopBeaconing, Loading @@ -893,32 +984,62 @@ module LibItsGeoNetworking_TypesAndValues { AcGetLongPosVector getLongPosVector AcGetLongPosVector getLongPosVector } } /** * @desc Primitive for receiveing response from TA * @member getLongPosVector */ type union AcGnResponse { type union AcGnResponse { LongPosVector getLongPosVector LongPosVector getLongPosVector } } /** * @desc Primitive for TA to start sending beacons for the test component * @member beaconHeader Beacon template */ type record AcStartBeaconing { type record AcStartBeaconing { BeaconHeader beaconHeader BeaconHeader beaconHeader } } /** * @desc Primitive for TA to stop sending beacons for the test component */ type record AcStopBeaconing { type record AcStopBeaconing { } } /** * @desc Primitive for TA to start enqueueing received beacons * @member beaconHeader Filter */ type record AcStartPassBeaconing { type record AcStartPassBeaconing { BeaconHeader beaconHeader BeaconHeader beaconHeader } } /** * @desc Primitive for TA to stop enqueueing received beacons */ type record AcStopPassBeaconing { type record AcStopPassBeaconing { } } /** * @desc Primitive for TA to start sending beacons for multiple neighbours * @member beaconHeader Beacon template * @member numberOfNeighbour Number of neighbours to simulate */ type record AcStartBeaconingMultipleNeighbour { type record AcStartBeaconingMultipleNeighbour { BeaconHeader beaconHeader, BeaconHeader beaconHeader, integer numberOfNeighbour integer numberOfNeighbour } } /** * @desc Primitive for TA to stop sending beacons for multiple neighbours */ type record AcStopBeaconingMultipleNeighbour { type record AcStopBeaconingMultipleNeighbour { } } /** * @desc Primitive for retrieving the position vector corresponding to a specific GN address * @member gnAddress GN address to be searched */ type record AcGetLongPosVector { type record AcGetLongPosVector { GN_Address gnAddress GN_Address gnAddress } } Loading ttcn/Ipv6OverGeoNetworking/LibItsIpv6OverGeoNetworking_Functions.ttcn +66 −8 Original line number Original line Diff line number Diff line Loading @@ -29,9 +29,7 @@ module LibItsIpv6OverGeoNetworking_Functions { * @desc This configuration features: * @desc This configuration features: * - one ITS node (IUT) * - one ITS node (IUT) * - two ITS nodes (nodeA, nodeB) * - two ITS nodes (nodeA, nodeB) * - Area1 which only includes NodeB and IUT * - three GVLs * - Area2 which only includes NodeB * NodeB being close to the area center */ */ function f_cf01UpGn6() runs on ItsNt { function f_cf01UpGn6() runs on ItsNt { Loading Loading @@ -66,7 +64,7 @@ module LibItsIpv6OverGeoNetworking_Functions { } // end f_cf01Up } // end f_cf01Up /** /** * @desc Deletes configuration cf01 * @desc Deletes configuration cf01Gn6 */ */ function f_cf01DownGn6() runs on ItsNt { function f_cf01DownGn6() runs on ItsNt { Loading @@ -81,6 +79,9 @@ module LibItsIpv6OverGeoNetworking_Functions { group testAdapter { group testAdapter { /** * @desc Retrieve IUT's interface names and associate them with predefined GVLs */ function f_acUpdateInterfaces() runs on ItsNt { function f_acUpdateInterfaces() runs on ItsNt { var AcGn6Response v_response; var AcGn6Response v_response; Loading Loading @@ -132,6 +133,11 @@ module LibItsIpv6OverGeoNetworking_Functions { group sendFunctions { group sendFunctions { /** * @desc Send a GeoBroadcast containing an IPv6 Router Advertisement * @param p_gvl Name of the GVL for which the RA is sent * @param p_compName Name of the component sending this packet */ function f_sendGeoBroadcastWithRtAdv( function f_sendGeoBroadcastWithRtAdv( in template (value) GvlTableEntry p_gvl, in template (value) GvlTableEntry p_gvl, in charstring p_compName in charstring p_compName Loading Loading @@ -175,6 +181,14 @@ module LibItsIpv6OverGeoNetworking_Functions { group miscellaneous { group miscellaneous { /** * @desc Add GVL information in the GVL table * @param p_gvlKey Name of the GVL * @param p_prefix IPv6 prefix associated with the GVL * @param p_prefixLength Prefix length * @param p_area Name of the GeoArea associated with the GVL * @param p_interface Name of IUT's virtual interface associated with the GVL */ function f_addGvl( function f_addGvl( in charstring p_gvlKey, in charstring p_gvlKey, in Oct16 p_prefix, in Oct16 p_prefix, Loading @@ -193,7 +207,7 @@ module LibItsIpv6OverGeoNetworking_Functions { /** /** * @desc Gets the Geographical Virtual link entry associated to an area * @desc Gets the Geographical Virtual link entry associated to an area * @param p_areaIndex The index of the area * @param p_gvlName Name of the GVL */ */ function f_getGvl(in charstring p_gvlName) runs on ItsNt return GvlTableEntry { function f_getGvl(in charstring p_gvlName) runs on ItsNt return GvlTableEntry { var GvlTableEntry v_return; var GvlTableEntry v_return; Loading @@ -209,10 +223,20 @@ module LibItsIpv6OverGeoNetworking_Functions { } // end f_getGvl } // end f_getGvl /** * @desc Gets interface name of one of IUT's GVL * @param p_gvlName Name of the GVL * @return Name of the GVL interface */ function f_getGvlInterface(in charstring p_gvlName) runs on ItsNt return charstring { function f_getGvlInterface(in charstring p_gvlName) runs on ItsNt return charstring { return f_getGvl(p_gvlName).interface return f_getGvl(p_gvlName).interface } // end f_getGvlInterface } // end f_getGvlInterface /** * @desc Gets IUT's TVL interface name * @return Name of the TVL interface * @see PX_GN6_TVL_INTERFACE_NAME */ function f_getTvlInterface() runs on ItsNt return charstring { function f_getTvlInterface() runs on ItsNt return charstring { return PX_GN6_TVL_INTERFACE_NAME; return PX_GN6_TVL_INTERFACE_NAME; } // end f_getTvlInterface } // end f_getTvlInterface Loading Loading @@ -312,6 +336,11 @@ module LibItsIpv6OverGeoNetworking_Functions { } // end f_computeAddresses } // end f_computeAddresses /** * @desc Retrieve addresses from address table * @param p_positionKey Reference key of the address entry * @return Address table entry */ function f_getAddresses( function f_getAddresses( in charstring p_positionKey in charstring p_positionKey ) runs on ItsNt ) runs on ItsNt Loading Loading @@ -368,6 +397,12 @@ module LibItsIpv6OverGeoNetworking_Functions { } // end f_computeGlobalAddress } // end f_computeGlobalAddress /** * @desc Compute Home Agent anycast address for a prefix * @param p_prefix Prefix for which the address is computed * @param p_prefixLen Length of the prefix * @return Home Agent anycast address */ function f_computeHomeAgentAnycastAddress( function f_computeHomeAgentAnycastAddress( in Oct16 p_prefix, in Oct16 p_prefix, in UInt8 p_prefixLen in UInt8 p_prefixLen Loading Loading @@ -425,6 +460,14 @@ module LibItsIpv6OverGeoNetworking_Functions { return v_trafficClass; return v_trafficClass; } // end f_getTrafficClassFromPriority } // end f_getTrafficClassFromPriority /** * @desc Gets a predefined prefix * @param p_index Index of the predefined prefix * @return IPv6 prefix * @see PX_GN6_PREFIX_1 * @see PX_GN6_PREFIX_2 * @see PX_GN6_PREFIX_3 */ function f_getPrefix(in integer p_index) return Oct16 { function f_getPrefix(in integer p_index) return Oct16 { select (p_index) { select (p_index) { Loading @@ -443,6 +486,14 @@ module LibItsIpv6OverGeoNetworking_Functions { } // end f_getPrefix } // end f_getPrefix /** * @desc Gets the length of a predefined prefix * @param p_index Index of the predefined prefix * @return length of a prefix * @see PX_GN6_PREFIX_LENGTH_1 * @see PX_GN6_PREFIX_LENGTH_2 * @see PX_GN6_PREFIX_LENGTH_3 */ function f_getPrefixLength(in integer p_index) return UInt8 { function f_getPrefixLength(in integer p_index) return UInt8 { select (p_index) { select (p_index) { Loading @@ -461,6 +512,13 @@ module LibItsIpv6OverGeoNetworking_Functions { } // end f_getPrefixLength } // end f_getPrefixLength /** * @desc Checks whether an IPv6 address belongs to an IPv6 prefix * @param p_ipv6Address IPv6 address to be checked * @param p_prefix Prefix * @param p_prefixLength Length of the prefix * @return Boolean - True if IPv6 address belongs to prefix, False otherwise */ function f_isIpv6AddressCorrespondingToPrefix(Ipv6Address p_ipv6Address, Ipv6Address p_prefix, UInt8 p_prefixLength) function f_isIpv6AddressCorrespondingToPrefix(Ipv6Address p_ipv6Address, Ipv6Address p_prefix, UInt8 p_prefixLength) return boolean { return boolean { Loading ttcn/Ipv6OverGeoNetworking/LibItsIpv6OverGeoNetworking_Pixits.ttcn +1 −1 Original line number Original line Diff line number Diff line Loading @@ -38,7 +38,7 @@ module LibItsIpv6OverGeoNetworking_Pixits { modulepar UInt8 PX_GN6_PREFIX_LENGTH_1 := 64; modulepar UInt8 PX_GN6_PREFIX_LENGTH_1 := 64; /** /** * @desc Length of IPv6 prefix 1 * @desc Length of IPv6 prefix 2 * @see PX_GN6_PREFIX_2 * @see PX_GN6_PREFIX_2 */ */ modulepar UInt8 PX_GN6_PREFIX_LENGTH_2 := 64; modulepar UInt8 PX_GN6_PREFIX_LENGTH_2 := 64; Loading Loading
ttcn/GeoNetworking/LibItsGeoNetworking_Functions.ttcn +270 −77 File changed.Preview size limit exceeded, changes collapsed. Show changes
ttcn/GeoNetworking/LibItsGeoNetworking_Templates.ttcn +17 −18 Original line number Original line Diff line number Diff line Loading @@ -263,8 +263,9 @@ module LibItsGeoNetworking_Templates { } } /** /** * @desc Testsystem will start beaconing for the given neighbor * @desc Testsystem will start beaconing for multiple neighbors * @param p_beaconHeader The neighbor information * @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) AcGnPrimitive m_startBeaconingMultipleNeighbour( template (value) BeaconHeader p_beaconHeader, template (value) BeaconHeader p_beaconHeader, Loading @@ -277,7 +278,7 @@ module LibItsGeoNetworking_Templates { } } /** /** * @desc Testsystem will stop beaconing for the given neighbor * @desc Testsystem will stop beaconing for multiple neighbors * @param p_compName The neighbor * @param p_compName The neighbor */ */ template AcGnPrimitive m_stopBeaconingMultipleNeighbour := { template AcGnPrimitive m_stopBeaconingMultipleNeighbour := { Loading Loading @@ -427,7 +428,7 @@ module LibItsGeoNetworking_Templates { } } /** /** * @desc Receive template for Beacon header * @desc Receive template for Beacon common header * @param p_trafficClass Packet's traffic class * @param p_trafficClass Packet's traffic class * @param p_hopLimit Maximum number of hops * @param p_hopLimit Maximum number of hops * @param p_senderLongPosVec Long position vector of sender * @param p_senderLongPosVec Long position vector of sender Loading @@ -438,10 +439,10 @@ module LibItsGeoNetworking_Templates { in template (present) LongPosVector p_senderLongPosVec in template (present) LongPosVector p_senderLongPosVec ) := { ) := { version := c_geoNwProtocolVersion, version := c_geoNwProtocolVersion, nextHeader := e_any, // 0 nextHeader := e_any, headerTST := { headerTST := { beaconHdr := { beaconHdr := { headerType := e_beacon, // 1 headerType := e_beacon, headerSubType := 0 headerSubType := 0 } } }, }, Loading Loading @@ -471,7 +472,7 @@ module LibItsGeoNetworking_Templates { } } /** /** * @desc Receive template for Common header with specific Hop limit * @desc Receive template for Common header with specific Traffic Class * @param p_senderLongPosVec Long position vector of sender * @param p_senderLongPosVec Long position vector of sender * @param p_nextHeader Id of next header * @param p_nextHeader Id of next header * @param p_headerTypeSubType Header's type and sub-type * @param p_headerTypeSubType Header's type and sub-type Loading Loading @@ -697,7 +698,7 @@ module LibItsGeoNetworking_Templates { } } /** /** * @desc Receive template for GeoUnicast header with source long position vector * @desc Receive template for GeoUnicast header with specific hop limit * @param p_senderLongPosVec Long position vector of sender * @param p_senderLongPosVec Long position vector of sender * @param p_destinationShortPosVec Long position vector of destination * @param p_destinationShortPosVec Long position vector of destination * @param p_seqNumber Sequence number of GeoUnicast packet * @param p_seqNumber Sequence number of GeoUnicast packet Loading @@ -719,9 +720,8 @@ module LibItsGeoNetworking_Templates { /** /** * @desc Receive template for GeoUnicast header with common header and lifetime * @desc Receive template for GeoUnicast header with common header and lifetime * @param p_senderLongPosVec Long position vector of sender * @param p_sourceLongPosVec Long position vector of source * @param p_destinationShortPosVec Long position vector of destination * @param p_destinationLongPosVec Long position vector of destination * @param p_stationType Station type of sender * @param p_seqNumber Sequence number of GeoUnicast packet * @param p_seqNumber Sequence number of GeoUnicast packet * @param p_commonHeader Common header * @param p_commonHeader Common header * @param p_lifetime lifetime of the packet * @param p_lifetime lifetime of the packet Loading Loading @@ -805,7 +805,6 @@ module LibItsGeoNetworking_Templates { * @desc Send template for GeoBroadcast header with hop limit * @desc Send template for GeoBroadcast header with hop limit * @param p_sourceLongPosVec Long position vector of source * @param p_sourceLongPosVec Long position vector of source * @param p_senderLongPosVec Long position vector of sender * @param p_senderLongPosVec Long position vector of sender * @param p_stationType Station type of sender * @param p_seqNumber Sequence number of GeoBroadcast packet * @param p_seqNumber Sequence number of GeoBroadcast packet * @param p_broadcastArea Destination GeoArea * @param p_broadcastArea Destination GeoArea * @param p_hopLimit Maximum number of hops * @param p_hopLimit Maximum number of hops Loading Loading @@ -1188,7 +1187,7 @@ module LibItsGeoNetworking_Templates { } } /** /** * @desc Receive template for GeoBroadcast header * @desc Receive template for GeoAnycast header type with any sub-type */ */ template HeaderTST mw_geoAnycastHeaderType := { template HeaderTST mw_geoAnycastHeaderType := { geoAnycastHdr := { geoAnycastHdr := { Loading @@ -1198,7 +1197,7 @@ module LibItsGeoNetworking_Templates { } } /** /** * @desc Receive template for GeoBroadcast header type with sub-type * @desc Receive template for GeoAnycast header type with sub-type * @param p_headerSubType Packet's subtype * @param p_headerSubType Packet's subtype * @see mw_geoAnycastHeaderType * @see mw_geoAnycastHeaderType */ */ Loading
ttcn/GeoNetworking/LibItsGeoNetworking_TypesAndValues.ttcn +121 −0 Original line number Original line Diff line number Diff line Loading @@ -51,13 +51,29 @@ module LibItsGeoNetworking_TypesAndValues { group geoConfigurationTypes { group geoConfigurationTypes { /** * @desc Entry of position table * @member key Reference key of the entry * @member position Position vector stored in the entry */ type record PositionEntry { type record PositionEntry { charstring key, charstring key, LongPosVector position LongPosVector position } } /** * @desc Table containing node positions */ type record of PositionEntry PositionTable; type record of PositionEntry PositionTable; /** * @desc Parameters of a geometric area * @member geoAreaPosLatitude Latitude of area's center * @member geoAreaPosLongitude Longitude of area's center * @member distanceA Distance A * @member distanceB Distance B * @member angle Angle */ type record Area { type record Area { UInt32 geoAreaPosLatitude, UInt32 geoAreaPosLatitude, UInt32 geoAreaPosLongitude, UInt32 geoAreaPosLongitude, Loading @@ -66,21 +82,39 @@ module LibItsGeoNetworking_TypesAndValues { UInt8 angle UInt8 angle } } /** * @desc Compact definition of GeoBroadcastArea * @member geoBroadcastSubType Type of GeoBroadcastArea (=shape) * @member geoBroadcastArea Parameters of the geometric area */ type record GeoBroadcastArea { type record GeoBroadcastArea { HeaderSubTypeGeoBroadcast geoBroadcastSubType, HeaderSubTypeGeoBroadcast geoBroadcastSubType, Area geoBroadcastArea Area geoBroadcastArea } } /** * @desc Compact definition of GeoAnycastArea * @member geoAnycastSubType Type of GeoAnycastArea (=shape) * @member geoAnycastArea Parameters of the geometric area */ type record GeoAnycastArea { type record GeoAnycastArea { HeaderSubTypeGeoAnycast geoAnycastSubType, HeaderSubTypeGeoAnycast geoAnycastSubType, Area geoAnycastArea Area geoAnycastArea } } /** * @desc Compact definition of a GeoArea (either GeoBroadcastArea or GeoAnycastArea) * @member shape Shape of the GeoArea * @member area Parameters of the geometric area */ type record GeoArea { type record GeoArea { GeoShape shape, GeoShape shape, Area area Area area } } /** * @desc Geometric shapes used to define GeoAreas */ type enumerated GeoShape { type enumerated GeoShape { e_geoCircle(0), e_geoCircle(0), e_geoRect(1), e_geoRect(1), Loading @@ -88,11 +122,19 @@ module LibItsGeoNetworking_TypesAndValues { e_reserved e_reserved } } /** * @desc Entry of GeoArea table * @member key Reference key of the entry * @member geoArea GeoArea stored in the entry */ type record GeoAreaEntry { type record GeoAreaEntry { charstring key, charstring key, GeoArea geoArea GeoArea geoArea } } /** * @desc Table containing geoArea definitions */ type record of GeoAreaEntry GeoAreaTable; type record of GeoAreaEntry GeoAreaTable; } // end geoConfigurationTypes } // end geoConfigurationTypes Loading @@ -100,10 +142,12 @@ module LibItsGeoNetworking_TypesAndValues { group geoNwValues { group geoNwValues { group geoNwHeaderConstants { group geoNwHeaderConstants { const UInt4 c_geoNwProtocolVersion := 0; const UInt4 c_geoNwProtocolVersion := 0; const UInt8 c_hopLimit1 := 1; const UInt8 c_hopLimit1 := 1; const UInt8 c_defaultHopLimit := 10; const UInt8 c_defaultHopLimit := 10; } // end geoNwHeaderConstants } // end geoNwHeaderConstants } // end geoNwValues } // end geoNwValues Loading Loading @@ -844,9 +888,22 @@ module LibItsGeoNetworking_TypesAndValues { group utPrimitives { group utPrimitives { /** * @desc Upper tester primitive to initialise IUT */ type record UtGNInitialize { type record UtGNInitialize { } } /** * @desc UT primitives for GeoNetworking * @member geoUnicast - * @member geoBroadcast - * @member geoAnycast - * @member shb - * @member tsb - * @member changePosition - * @member checkPacket - */ type union UtGNEvent { type union UtGNEvent { GenerateGeoUnicastMessage geoUnicast, GenerateGeoUnicastMessage geoUnicast, GenerateGeoBroadcastMessage geoBroadcast, GenerateGeoBroadcastMessage geoBroadcast, Loading @@ -857,25 +914,49 @@ module LibItsGeoNetworking_TypesAndValues { GeoNetworkingPacket checkPacket GeoNetworkingPacket checkPacket } } /** * @desc UT primitive for IUT to send a GeoUnicast packet * @member gnAddress Destination of the packet * @member lifetime Lifetime of the packet * @member payload Payload of the packet */ type record GenerateGeoUnicastMessage { type record GenerateGeoUnicastMessage { GN_Address gnAddress, GN_Address gnAddress, integer lifetime optional, integer lifetime optional, Payload payload optional Payload payload optional } } /** * @desc UT primitive for IUT to send a GeoBroadcast packet * @member area Destination GeoArea * @member payload Payload of the packet */ type record GenerateGeoBroadcastMessage { type record GenerateGeoBroadcastMessage { GeoArea area, GeoArea area, Payload payload optional Payload payload optional } } /** * @desc UT primitive for IUT to send a Geoanycast packet */ type GenerateGeoBroadcastMessage GenerateGeoAnycastMessage; type GenerateGeoBroadcastMessage GenerateGeoAnycastMessage; /** * @desc UT primitive for IUT to send a SHB packet * @member payload Payload of the packet */ type record GenerateSHBMessage { type record GenerateSHBMessage { Payload payload optional Payload payload optional } } /** * @desc UT primitive for IUT to send a TSB packet */ type GenerateSHBMessage GenerateTSBMessage; type GenerateSHBMessage GenerateTSBMessage; /** * @desc UT primitive for IUT to change its position */ type record ChangePosition { type record ChangePosition { } } Loading @@ -883,6 +964,16 @@ module LibItsGeoNetworking_TypesAndValues { group acPrimitives { group acPrimitives { /** * @desc TA primitives for GeoNetworking * @member startBeaconing - * @member stopBeaconing - * @member startPassBeaconing - * @member stopPassBeaconing - * @member startBeaconingMultipleNeighbour - * @member stopBeaconingMultipleNeighbour - * @member getLongPosVector - */ type union AcGnPrimitive { type union AcGnPrimitive { AcStartBeaconing startBeaconing, AcStartBeaconing startBeaconing, AcStopBeaconing stopBeaconing, AcStopBeaconing stopBeaconing, Loading @@ -893,32 +984,62 @@ module LibItsGeoNetworking_TypesAndValues { AcGetLongPosVector getLongPosVector AcGetLongPosVector getLongPosVector } } /** * @desc Primitive for receiveing response from TA * @member getLongPosVector */ type union AcGnResponse { type union AcGnResponse { LongPosVector getLongPosVector LongPosVector getLongPosVector } } /** * @desc Primitive for TA to start sending beacons for the test component * @member beaconHeader Beacon template */ type record AcStartBeaconing { type record AcStartBeaconing { BeaconHeader beaconHeader BeaconHeader beaconHeader } } /** * @desc Primitive for TA to stop sending beacons for the test component */ type record AcStopBeaconing { type record AcStopBeaconing { } } /** * @desc Primitive for TA to start enqueueing received beacons * @member beaconHeader Filter */ type record AcStartPassBeaconing { type record AcStartPassBeaconing { BeaconHeader beaconHeader BeaconHeader beaconHeader } } /** * @desc Primitive for TA to stop enqueueing received beacons */ type record AcStopPassBeaconing { type record AcStopPassBeaconing { } } /** * @desc Primitive for TA to start sending beacons for multiple neighbours * @member beaconHeader Beacon template * @member numberOfNeighbour Number of neighbours to simulate */ type record AcStartBeaconingMultipleNeighbour { type record AcStartBeaconingMultipleNeighbour { BeaconHeader beaconHeader, BeaconHeader beaconHeader, integer numberOfNeighbour integer numberOfNeighbour } } /** * @desc Primitive for TA to stop sending beacons for multiple neighbours */ type record AcStopBeaconingMultipleNeighbour { type record AcStopBeaconingMultipleNeighbour { } } /** * @desc Primitive for retrieving the position vector corresponding to a specific GN address * @member gnAddress GN address to be searched */ type record AcGetLongPosVector { type record AcGetLongPosVector { GN_Address gnAddress GN_Address gnAddress } } Loading
ttcn/Ipv6OverGeoNetworking/LibItsIpv6OverGeoNetworking_Functions.ttcn +66 −8 Original line number Original line Diff line number Diff line Loading @@ -29,9 +29,7 @@ module LibItsIpv6OverGeoNetworking_Functions { * @desc This configuration features: * @desc This configuration features: * - one ITS node (IUT) * - one ITS node (IUT) * - two ITS nodes (nodeA, nodeB) * - two ITS nodes (nodeA, nodeB) * - Area1 which only includes NodeB and IUT * - three GVLs * - Area2 which only includes NodeB * NodeB being close to the area center */ */ function f_cf01UpGn6() runs on ItsNt { function f_cf01UpGn6() runs on ItsNt { Loading Loading @@ -66,7 +64,7 @@ module LibItsIpv6OverGeoNetworking_Functions { } // end f_cf01Up } // end f_cf01Up /** /** * @desc Deletes configuration cf01 * @desc Deletes configuration cf01Gn6 */ */ function f_cf01DownGn6() runs on ItsNt { function f_cf01DownGn6() runs on ItsNt { Loading @@ -81,6 +79,9 @@ module LibItsIpv6OverGeoNetworking_Functions { group testAdapter { group testAdapter { /** * @desc Retrieve IUT's interface names and associate them with predefined GVLs */ function f_acUpdateInterfaces() runs on ItsNt { function f_acUpdateInterfaces() runs on ItsNt { var AcGn6Response v_response; var AcGn6Response v_response; Loading Loading @@ -132,6 +133,11 @@ module LibItsIpv6OverGeoNetworking_Functions { group sendFunctions { group sendFunctions { /** * @desc Send a GeoBroadcast containing an IPv6 Router Advertisement * @param p_gvl Name of the GVL for which the RA is sent * @param p_compName Name of the component sending this packet */ function f_sendGeoBroadcastWithRtAdv( function f_sendGeoBroadcastWithRtAdv( in template (value) GvlTableEntry p_gvl, in template (value) GvlTableEntry p_gvl, in charstring p_compName in charstring p_compName Loading Loading @@ -175,6 +181,14 @@ module LibItsIpv6OverGeoNetworking_Functions { group miscellaneous { group miscellaneous { /** * @desc Add GVL information in the GVL table * @param p_gvlKey Name of the GVL * @param p_prefix IPv6 prefix associated with the GVL * @param p_prefixLength Prefix length * @param p_area Name of the GeoArea associated with the GVL * @param p_interface Name of IUT's virtual interface associated with the GVL */ function f_addGvl( function f_addGvl( in charstring p_gvlKey, in charstring p_gvlKey, in Oct16 p_prefix, in Oct16 p_prefix, Loading @@ -193,7 +207,7 @@ module LibItsIpv6OverGeoNetworking_Functions { /** /** * @desc Gets the Geographical Virtual link entry associated to an area * @desc Gets the Geographical Virtual link entry associated to an area * @param p_areaIndex The index of the area * @param p_gvlName Name of the GVL */ */ function f_getGvl(in charstring p_gvlName) runs on ItsNt return GvlTableEntry { function f_getGvl(in charstring p_gvlName) runs on ItsNt return GvlTableEntry { var GvlTableEntry v_return; var GvlTableEntry v_return; Loading @@ -209,10 +223,20 @@ module LibItsIpv6OverGeoNetworking_Functions { } // end f_getGvl } // end f_getGvl /** * @desc Gets interface name of one of IUT's GVL * @param p_gvlName Name of the GVL * @return Name of the GVL interface */ function f_getGvlInterface(in charstring p_gvlName) runs on ItsNt return charstring { function f_getGvlInterface(in charstring p_gvlName) runs on ItsNt return charstring { return f_getGvl(p_gvlName).interface return f_getGvl(p_gvlName).interface } // end f_getGvlInterface } // end f_getGvlInterface /** * @desc Gets IUT's TVL interface name * @return Name of the TVL interface * @see PX_GN6_TVL_INTERFACE_NAME */ function f_getTvlInterface() runs on ItsNt return charstring { function f_getTvlInterface() runs on ItsNt return charstring { return PX_GN6_TVL_INTERFACE_NAME; return PX_GN6_TVL_INTERFACE_NAME; } // end f_getTvlInterface } // end f_getTvlInterface Loading Loading @@ -312,6 +336,11 @@ module LibItsIpv6OverGeoNetworking_Functions { } // end f_computeAddresses } // end f_computeAddresses /** * @desc Retrieve addresses from address table * @param p_positionKey Reference key of the address entry * @return Address table entry */ function f_getAddresses( function f_getAddresses( in charstring p_positionKey in charstring p_positionKey ) runs on ItsNt ) runs on ItsNt Loading Loading @@ -368,6 +397,12 @@ module LibItsIpv6OverGeoNetworking_Functions { } // end f_computeGlobalAddress } // end f_computeGlobalAddress /** * @desc Compute Home Agent anycast address for a prefix * @param p_prefix Prefix for which the address is computed * @param p_prefixLen Length of the prefix * @return Home Agent anycast address */ function f_computeHomeAgentAnycastAddress( function f_computeHomeAgentAnycastAddress( in Oct16 p_prefix, in Oct16 p_prefix, in UInt8 p_prefixLen in UInt8 p_prefixLen Loading Loading @@ -425,6 +460,14 @@ module LibItsIpv6OverGeoNetworking_Functions { return v_trafficClass; return v_trafficClass; } // end f_getTrafficClassFromPriority } // end f_getTrafficClassFromPriority /** * @desc Gets a predefined prefix * @param p_index Index of the predefined prefix * @return IPv6 prefix * @see PX_GN6_PREFIX_1 * @see PX_GN6_PREFIX_2 * @see PX_GN6_PREFIX_3 */ function f_getPrefix(in integer p_index) return Oct16 { function f_getPrefix(in integer p_index) return Oct16 { select (p_index) { select (p_index) { Loading @@ -443,6 +486,14 @@ module LibItsIpv6OverGeoNetworking_Functions { } // end f_getPrefix } // end f_getPrefix /** * @desc Gets the length of a predefined prefix * @param p_index Index of the predefined prefix * @return length of a prefix * @see PX_GN6_PREFIX_LENGTH_1 * @see PX_GN6_PREFIX_LENGTH_2 * @see PX_GN6_PREFIX_LENGTH_3 */ function f_getPrefixLength(in integer p_index) return UInt8 { function f_getPrefixLength(in integer p_index) return UInt8 { select (p_index) { select (p_index) { Loading @@ -461,6 +512,13 @@ module LibItsIpv6OverGeoNetworking_Functions { } // end f_getPrefixLength } // end f_getPrefixLength /** * @desc Checks whether an IPv6 address belongs to an IPv6 prefix * @param p_ipv6Address IPv6 address to be checked * @param p_prefix Prefix * @param p_prefixLength Length of the prefix * @return Boolean - True if IPv6 address belongs to prefix, False otherwise */ function f_isIpv6AddressCorrespondingToPrefix(Ipv6Address p_ipv6Address, Ipv6Address p_prefix, UInt8 p_prefixLength) function f_isIpv6AddressCorrespondingToPrefix(Ipv6Address p_ipv6Address, Ipv6Address p_prefix, UInt8 p_prefixLength) return boolean { return boolean { Loading
ttcn/Ipv6OverGeoNetworking/LibItsIpv6OverGeoNetworking_Pixits.ttcn +1 −1 Original line number Original line Diff line number Diff line Loading @@ -38,7 +38,7 @@ module LibItsIpv6OverGeoNetworking_Pixits { modulepar UInt8 PX_GN6_PREFIX_LENGTH_1 := 64; modulepar UInt8 PX_GN6_PREFIX_LENGTH_1 := 64; /** /** * @desc Length of IPv6 prefix 1 * @desc Length of IPv6 prefix 2 * @see PX_GN6_PREFIX_2 * @see PX_GN6_PREFIX_2 */ */ modulepar UInt8 PX_GN6_PREFIX_LENGTH_2 := 64; modulepar UInt8 PX_GN6_PREFIX_LENGTH_2 := 64; Loading