Newer
Older
/**
* @author ETSI / STF517
* @version $URL$
* $Id$
* @desc Module containing base template definitions for IVIM
* @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.
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
*
*/
module LibItsIvim_Templates {
// LibCommon
import from LibCommon_BasicTypesAndValues all;
import from LibCommon_DataStrings all;
// LibIts
import from ITS_Container language "ASN.1:1997" all;
import from IVIM_PDU_Descriptions language "ASN.1:1997" all;
import from IVI language "ASN.1:1997" all;
import from EfcDsrcApplication language "ASN.1:1997" all;
import from AVIAEINumberingAndDataStructures language "ASN.1:1997" all;
// LibItsCommon
import from LibItsCommon_TypesAndValues all;
import from LibItsCommon_Functions all;
import from LibItsCommon_Pixits all;
// LibItsIvim
import from LibItsIvim_TestSystem all;
import from LibItsIvim_TypesAndValues all;
import from LibItsIvim_Functions all;
group asn1Constants {
} // End of group asn1Constants
group primitivesTemplates {
/**
* @desc Send template for IVI Message (IvimPort Primitive)
* @param p_iviMsg The IVI Message to be sent
*/
template (value) IvimReq m_ivimReq(
in template (value) IVIM p_iviMsg
) := {
msgOut := p_iviMsg
} // End of template m_ivimReq
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
/**
* @desc Receive template for IVI Message (IvimPort Primitive)
* @param p_iviMsg The expected IVI Message
*/
template (present) IvimInd mw_ivimInd(
template (present) IVIM p_iviMsg
) := {
msgIn := p_iviMsg,
gnNextHeader := *,
gnHeaderType := *,
gnHeaderSubtype := *,
gnLifetime := *,
gnTrafficClass := *,
btpDestinationPort := *,
btpInfo := *,
ssp := *,
its_aid := *
} // End of template mw_ivimInd
/**
* @desc Receive template for IVI Message (IvimPort Primitive)
* @param p_iviMsg The expected IVI Message
* @param p_gnNextHeader GN next header value
* @param p_gnHeaderType GN header type value
* @param p_gnHeaderSubtype GN header subtype value
* @param p_gnLifetime GN packet lifetime value (ms)
* @param p_gnTrafficClass GN traffic class value
*/
template IvimInd mw_ivimIndWithGnParameters (
template (present) IVIM p_iviMsg,
in template UInt8 p_gnNextHeader := *,
in template UInt8 p_gnHeaderType := *,
in template UInt8 p_gnHeaderSubtype := *,
in template UInt32 p_gnLifetime := *,
in template UInt8 p_gnTrafficClass := *
) modifies mw_ivimInd := {
gnNextHeader := p_gnNextHeader,
gnHeaderType := p_gnHeaderType,
gnHeaderSubtype := p_gnHeaderSubtype,
gnLifetime := p_gnLifetime,
gnTrafficClass := p_gnTrafficClass
} // End of template mw_ivimIndWithGnParameters
/**
* @desc Receive template for IVI Message (IvimPort Primitive)
* @param p_iviMsg The expected IVI Message
* @param p_btpDestinationPort BTP destination port value
* @param p_btpInfo BTP destination port info value (if BTP-B) or BTP source port value (if BTP-A)
*/
template IvimInd mw_ivimIndWithBtpParameters (
template (present) IVIM p_iviMsg,
template UInt16 p_btpDestinationPort := *,
template UInt16 p_btpInfo := *
) modifies mw_ivimInd := {
btpDestinationPort := p_btpDestinationPort,
btpInfo := p_btpInfo
} // End of template mw_ivimIndWithBtpParameters
/**
* @desc Receive template for IVI Message (IvimPort Primitive)
* @param p_iviMsg The expected IVI Message
* @param p_ssp SSP security parameter
* @param p_its_aid ITS-AID value
*/
template IvimInd mw_ivimIndWithSecurityParameters (
template (present) IVIM p_iviMsg,
template UInt32 p_its_aid := *
) modifies mw_ivimInd := {
ssp := p_ssp,
its_aid := p_its_aid
} // End of template mw_ivimIndWithSecurityParameters
group utPrimitives {
/**
* @desc Send template for Upper Tester event initialization
*/
template (value) UtInitialize m_ivimStructureInitialize := {
hashedId8 := '0000000000000000'O
} // End of template m_ivimStructureInitialize
/**
* @desc Send template for Upper Tester Trigger event
* @param p_repetitionInterval TODO (Default: 4 seconds)
* @param p_validFrom TODO (Default: omit)
* @param p_validTo TODO (Default: omit)
* @param p_connectedIviStructures TODO (Default: omit)
* @param p_optional_ TODO (Default: omit)
*/
template (value) UtIvimTrigger m_utTriggerEvent(
template (omit) TimestampIts p_repetitionInterval := c_duration_4sec,
template (omit) TimestampIts p_validFrom := omit,
template (omit) IVIManagementContainer.connectedIviStructures p_connectedIviStructures := omit,
template (omit) IviStructure.optional_ p_optional_ := omit*/
) := {
validFrom := p_validFrom,
validTo := p_validTo,
repetitionInterval := p_repetitionInterval/*,
connectedIviStructures := p_connectedIviStructures,
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
} // End of template m_utTriggerEvent
/**
* @desc Send template for Upper Tester event update
* @param p_iviIdentificationNumber The p_iviIVI identification number
* @param p_timeStamp TODO (Default: 2 seconds)
* @param p_validFrom TODO (Default: omit)
* @param p_validTo TODO (Default: omit)
* @param p_connectedIviStructures TODO (Default: omit)
* @param p_optional_ TODO (Default: omit)
*/
template (value) UtIvimUpdate m_utUpdateEvent(
template (value) IviIdentificationNumber p_iviIdentificationNumber,
template (omit) TimestampIts p_timeStamp := c_duration_2sec,
template (omit) TimestampIts p_validFrom := omit,
template (omit) TimestampIts p_validTo := omit,
template (omit) IVIManagementContainer.connectedIviStructures p_connectedIviStructures := omit,
template (omit) IviStructure.optional_ p_optional_ := omit
) := {
iviIdentificationNumber := p_iviIdentificationNumber,
timeStamp := p_timeStamp,
validFrom := p_validFrom,
validTo := p_validTo,
connectedIviStructures := p_connectedIviStructures,
optional_ := p_optional_
} // End of template m_utUpdateEvent
/**
* @desc Send template for Upper Tester event cancellation
* @param p_actionId The action id
*/
template (value) UtIvimTermination m_utEventCancellation(
template (value) IviIdentificationNumber p_iviIdentificationNumber
) := {
iviIdentificationNumber := p_iviIdentificationNumber
} // End of template m_utEventCancellation
} // End of group utPrimitives
} // End of group primitivesTemplates
group headerTemplates {
/**
* @desc Default send template for ITS PDU header
* @param p_stationID The source station ID (Default: test system station id)
* @param p_protocolVersion The protocol version (Default: current IVI protocol version)
* @param p_messageID The message Id (Default: IVI message id)
*/
template (value) ItsPduHeader m_itsPduHeader(
template (value) StationID p_stationID := f_getTsStationId(),
template (value) ItsPduHeader.protocolVersion p_protocolVersion := ItsPduHeader_protocolVersion_currentVersion_,
template (value) ItsPduHeader.messageID p_messageID := ItsPduHeader_messageID_ivim_
) := {
protocolVersion := p_protocolVersion,
messageID := p_messageID,
stationID := p_stationID
} // End of template m_itsPduHeader
/**
* @desc Default receive template for ITS PDU header
* @param p_stationID The expected station id (Default: any)
* @param p_protocolVersion The expected protocol version (Default: current IVI protocol version)
* @param p_messageID The expected message id (Default: IVI message id)
*/
template ItsPduHeader mw_itsPduHeader(
template (present) StationID p_stationID := ?,
template (present) ItsPduHeader.protocolVersion p_protocolVersion := ItsPduHeader_protocolVersion_currentVersion_,
template (present) ItsPduHeader.messageID p_messageID := ItsPduHeader_messageID_ivim_
) := {
protocolVersion := p_protocolVersion,
messageID := p_messageID,
stationID := p_stationID
} // End of template mw_itsPduHeader
template (present) StationID mw_anyStationId := ?;
} // End of group headerTemplates
group ivimPduTemplates {
/**
* @desc Send template for IVIM PDU
* @param p_ivim The IVI Message
*/
template (value) IVIM m_ivimStructurePdu(
template (value) IviStructure p_ivim
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
) := {
header := m_itsPduHeader,
ivi := p_ivim
} // End of template m_ivimStructurePdu
/**
* @desc Default receive template for IVIM PDU
* @param p_itsPduHeader The expected ITS PDU header (Default: any)
* @param p_ivim The expected IVI Message (Default: any)
*/
template (present) IVIM mw_anyIvimPdu(
template (present) ItsPduHeader p_itsPduHeader := ?,
template (present) IviStructure p_ivim := ?
) := {
header := p_itsPduHeader,
ivi := p_ivim
} // End of template mw_anyIvimPdu
/**
* @desc Receive template for IVIM PDU
* @param p_ivim The expected IVI Message
* @param p_stationID The expected station id (Default: any)
* @param p_protocolVersion The expected protocol version (Default: current IVI protocol version)
* @param p_messageID The expected message id (Default: IVI message id)
*/
template (present) IVIM mw_ivimPdu(
template (present) IviStructure p_ivim,
template (present) StationID p_stationID := ?,
template (present) ItsPduHeader.protocolVersion p_protocolVersion := ItsPduHeader_protocolVersion_currentVersion_,
template (present) ItsPduHeader.messageID p_messageID := ItsPduHeader_messageID_ivim_
) := {
header := mw_itsPduHeader(p_stationID, p_protocolVersion, p_messageID),
ivi := p_ivim
} // End of template mw_ivimPdu
} // End of group ivimPduTemplates
group iviStructureTemplates {
/**
* @desc Send template for IVI Message
* @param p_mandatory The Management Container
* @param p_optional_ A list of IVI Container (Default: omit)
*/
template (omit) IviStructure m_ivimStructure(
in template (value) IVIManagementContainer p_mandatory,
in template (omit) IviStructure.optional_ p_optional_ := omit
) := {
mandatory := p_mandatory,
} // End of template m_ivimStructure
/**
* @desc Receive template for IVI Message
* @param p_mandatory The Management Container
* @param p_optional_ A list of IVI Container (Default: omit)
*/
template (present) IviStructure mw_ivimStructure(
template (present) IVIManagementContainer p_mandatory := ?,
template IviStructure.optional_ p_optional_ := *
) := {
mandatory := p_mandatory,
optional_ := p_optional_
} // End of template mw_ivimStructure
/**
* @desc Send template for DEN Message for event termination.
* @param p_iviIdentificationNumber The IVIM identification number
*/
template (value) IviStructure m_ivimStructureCancellation(
in template (value) IviIdentificationNumber p_iviIdentificationNumber
) := {
mandatory := m_iviManagementContainer(f_getProvider(), p_iviIdentificationNumber, IviStatus_cancellation_),
optional_ := omit
} // End of template m_ivimStructureCancellation
} // End of group iviStructureTemplates
group iviManagementContainerGroup {
/**
* @desc Send template for IVIManagement container
* @param p_serviceProviderId The IUT provider description
* @param p_iviIdentificationNumber The IVIM identification number
* @param p_iviStatus The IVIM status
*/
template (omit) IVIManagementContainer m_iviManagementContainer(
in template (value) Provider p_serviceProviderId,
in template (value) IviIdentificationNumber p_iviIdentificationNumber,
in template (value) IviStatus p_iviStatus,
in template (omit) IVIManagementContainer.connectedIviStructures p_connectedIviStructures := omit
) := {
serviceProviderId := p_serviceProviderId,
iviIdentificationNumber := p_iviIdentificationNumber,
validFrom := omit,
validTo := omit,
iviStatus := p_iviStatus
} // End of template m_iviManagementContainer
/**
* @desc Receive template for IVIManagement container
* @param p_serviceProviderId The IUT provider description
* @param p_iviIdentificationNumber The IVIM identification number
* @param p_iviStatus The IVIM status
*/
template (present) IVIManagementContainer mw_iviManagementContainer(
template (present) Provider p_serviceProviderId := ?,
template (present) IviIdentificationNumber p_iviIdentificationNumber := ?,
template (present) IviStatus p_iviStatus := ?
) := {
serviceProviderId := p_serviceProviderId,
iviIdentificationNumber := p_iviIdentificationNumber,
timeStamp := *,
connectedIviStructures := *,
iviStatus := p_iviStatus
} // End of template mw_iviManagementContainer
/**
* @desc Receive template for IVIManagement container
* @param p_serviceProviderId The IUT provider description
* @param p_iviIdentificationNumber The IVIM identification number
* @param p_iviStatus The IVIM status
* @param p_timeStamp TODO
*/
template (present) IVIManagementContainer mw_iviManagementContainer_timestamp(
template (present) Provider p_serviceProviderId := ?,
template (present) IviIdentificationNumber p_iviIdentificationNumber := ?,
template (present) IviStatus p_iviStatus := ?,
template (present) TimestampIts p_timeStamp := ?
) modifies mw_iviManagementContainer := {
timeStamp := p_timeStamp
} // End of template mw_iviManagementContainer_timestamp
/**
* @desc Receive template for IVIManagement container
* @param p_serviceProviderId The IUT provider description
* @param p_iviIdentificationNumber The IVIM identification number
* @param p_iviStatus The IVIM status
* @param p_validTo TODO
*/
template (present) IVIManagementContainer mw_iviManagementContainer_validTo(
template (present) Provider p_serviceProviderId := ?,
template (present) IviIdentificationNumber p_iviIdentificationNumber := ?,
template (present) IviStatus p_iviStatus := ?,
) modifies mw_iviManagementContainer := {
validTo := p_validTo
} // End of template mw_iviManagementContainer_validTo
/**
* @desc Receive template for IVIManagement container
* @param p_serviceProviderId The IUT provider description
* @param p_iviIdentificationNumber The IVIM identification number
* @param p_iviStatus The IVIM status
* @param p_validFrom TODO
*/
template (present) IVIManagementContainer mw_iviManagementContainer_validFrom(
template (present) Provider p_serviceProviderId := ?,
template (present) IviIdentificationNumber p_iviIdentificationNumber := ?,
template (present) IviStatus p_iviStatus := ?,
template (present) TimestampIts p_validFrom := ?
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
) modifies mw_iviManagementContainer := {
validFrom := p_validFrom
} // End of template mw_iviManagementContainer_validFrom
/**
* @desc Receive template for Porvide identifier
* @param p_countryCode TODO
* @param p_providerIdentifier TODO
*/
template (present) Provider mw_provider(
template (present) CountryCode p_countryCode := ?,
template (present) IssuerIdentifier p_providerIdentifier := ?
) := {
countryCode := p_countryCode,
providerIdentifier := p_providerIdentifier
} // End of template mw_provider
} // End of group iviManagementContainerGroup
group connectedIviStructuresGroup {
} // End of group connectedIviStructuresGroup
group iviContainerGroup {
template (value) IviContainer m_iviContainer_geographicLocationContainer(
in template (value) GeographicLocationContainer p_glc
) := {
glc := p_glc
} // End of template m_iviContainer_geographicLocationContainer
template (present) IviContainer mw_iviContainer_geographicLocationContainer(
template (present) GeographicLocationContainer p_glc := ?
) := {
glc := p_glc
} // End of template mw_iviContainer_geographicLocationContainer
template (value) IviContainer m_iviContainer_generalIviContainer(
in template (value) GeneralIviContainer p_giv
) := {
giv := p_giv
} // End of template m_iviContainer_generalIviContainer
template (present) IviContainer mw_iviContainer_generalIviContainer(
template (present) GeneralIviContainer p_giv := ?
) := {
giv := p_giv
} // End of template mw_iviContainer_generalIviContainer
template (value) IviContainer m_iviContainer_roadConfigurationContainer(
in template (value) RoadConfigurationContainer p_rcc
) := {
rcc := p_rcc
} // End of template m_iviContainer_roadConfigurationContainer
template (present) IviContainer mw_iviContainer_roadConfigurationContainer(
template (present) RoadConfigurationContainer p_rcc := ?
) := {
rcc := p_rcc
} // End of template mw_iviContainer_roadConfigurationContainer
// TODO Add the other IviContainer fields if needed
} // End of group iviContainerGroup
group geographicLocationContainerGroup {
template (value) GeographicLocationContainer m_geographicLocationContainer(
in template (value) ReferencePosition p_referencePosition,
in template (value) GeographicLocationContainer.parts p_parts
) := {
referencePosition := p_referencePosition,
referencePositionTime := omit,
referencePositionHeading := omit,
referencePositionSpeed := omit,
parts := p_parts
} // End of template m_geographicLocationContainer
template (present) GeographicLocationContainer mw_geographicLocationContainer(
template (present) ReferencePosition p_referencePosition := ?,
template (present) GeographicLocationContainer.parts p_parts := ?
) := {
referencePosition := p_referencePosition,
referencePositionTime := *,
referencePositionHeading := *,
referencePositionSpeed := *,
parts := p_parts
} // End of template mw_geographicLocationContainer
template (omit) GlcPart m_glcPart(
in template (value) Zid p_zoneId,
in template (omit) LanePosition p_laneNumber := omit,
in template (omit) GlcPart.zoneExtension p_zoneExtension := omit,
in template (omit) HeadingValue p_zoneHeading := omit,
in template (omit) Zone p_zone := omit
) := {
zoneId := p_zoneId,
laneNumber := p_laneNumber,
zoneExtension := p_zoneExtension,
zoneHeading := p_zoneHeading,
zone := p_zone
} // End of template m_glcPart
template (present) GlcPart mw_glcPart(
template (present) Zid p_zoneId := ?,
template LanePosition p_laneNumber := *,
template GlcPart.zoneExtension p_zoneExtension := *,
template HeadingValue p_zoneHeading := *,
template Zone p_zone := *
) := {
zoneId := p_zoneId,
laneNumber := p_laneNumber,
zoneExtension := p_zoneExtension,
zoneHeading := p_zoneHeading,
zone := p_zone
} // End of template mw_glcPart
} // End of group geographicLocationContainerGroup
group generalIviContainerGroup {
template (value) GicPart m_gicPart_basic(
in template (value) IviType p_iviType,
in template (value) GicPart.roadSignCodes p_roadSignCodes
) := {
detectionZoneIds := omit,
its_Rrid := omit,
relevanceZoneIds := omit,
direction := omit,
driverAwarenessZoneIds := omit,
minimumAwarenessTime := omit,
applicableLanes := omit,
iviType := p_iviType,
iviPurpose := omit,
laneStatus := omit,
vehicleCharacteristics := omit,
driverCharacteristics := omit,
layoutId := omit,
preStoredlayoutId := omit,
roadSignCodes := p_roadSignCodes,
extraText := omit
} // End of template m_gicPart
template (present) GicPart mw_gicPart_basic(
template (present) IviType p_iviType := ?,
template (present) GicPart.roadSignCodes p_roadSignCodes := ?
) := {
detectionZoneIds := *,
its_Rrid := *,
relevanceZoneIds := *,
direction := *,
driverAwarenessZoneIds := *,
minimumAwarenessTime := *,
applicableLanes := *,
iviType := p_iviType,
iviPurpose := *,
laneStatus := *,
vehicleCharacteristics := *,
driverCharacteristics := *,
layoutId := *,
preStoredlayoutId := *,
roadSignCodes := p_roadSignCodes,
extraText := *
} // End of template mw_gicPart
} // End of group generalIviContainerGroup
group roadConfigurationContainerGroup {
template (value) RccPart m_rccPart(
in template (value) RccPart.zoneIds p_zoneIds,
in template (value) RoadType p_roadType,
in template (value) RccPart.laneConfiguration p_laneConfiguration
) := {
zoneIds := p_zoneIds,
roadType := p_roadType,
laneConfiguration := p_laneConfiguration
} // End of template m_rccPart
template (present) RccPart mw_rccPart(
template (present) RccPart.zoneIds p_zoneIds := ?,
template (present) RoadType p_roadType := ?,
template (present) RccPart.laneConfiguration p_laneConfiguration := ?
) := {
zoneIds := p_zoneIds,
roadType := p_roadType,
laneConfiguration := p_laneConfiguration
} // End of template mw_rccPart
} // End of group roadConfigurationContainerGroup
} // End of module LibItsIvimTemplates