-
Notifications
You must be signed in to change notification settings - Fork 5
/
XCP_104.aml
1329 lines (1141 loc) · 55.6 KB
/
XCP_104.aml
1
2
3
4
5
6
7
8
9
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
44
45
46
47
48
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
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
238
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
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
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
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
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
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/begin A2ML
/***********************************************************/
/* */
/* ASAP2 meta language for XCP protocol layer V1.4 */
/* */
/* File version description */
/* --------------------------------------------------- */
/* 1.4.0 initial version */
/* 1.4.1 taggedstruct member */
/* OPTIMISATION_TYPE_ODT_STRICT was added */
/* */
/* Datatypes: */
/* */
/* A2ML description */
/* --------------------------------------------------- */
/* uchar unsigned 8 Bit */
/* char signed 8 Bit */
/* uint unsigned integer 16 Bit */
/* int signed integer 16 Bit */
/* ulong unsigned integer 32 Bit */
/* long signed integer 32 Bit */
/* int64 signed integer 64 Bit */
/* uint64 unsigned integer 64 Bit */
/* float float point 32 Bit IEEE 754 */
/* double float point 64 Bit IEEE 754 */
/* */
/***********************************************************/
/*************** start of PROTOCOL_LAYER *******************/
struct Protocol_Layer { /* At MODULE */
uint; /* XCP protocol layer version */
/* "1.4" = 0x0104 */
uint; /* T1 [ms] */
uint; /* T2 [ms] */
uint; /* T3 [ms] */
uint; /* T4 [ms] */
uint; /* T5 [ms] */
uint; /* T6 [ms] */
uint; /* T7 [ms] */
uchar; /* MAX_CTO */
uint; /* MAX_DTO default for DAQ and STIM */
enum { /* BYTE_ORDER */
"BYTE_ORDER_MSB_LAST" = 0,
"BYTE_ORDER_MSB_FIRST" = 1
};
enum { /* ADDRESS_GRANULARITY */
"ADDRESS_GRANULARITY_BYTE" = 1,
"ADDRESS_GRANULARITY_WORD" = 2,
"ADDRESS_GRANULARITY_DWORD" = 4
};
taggedstruct { /* optional */
("OPTIONAL_CMD" enum { /* XCP-Code of optional level 0 commands */
/* supported by the slave */
"GET_COMM_MODE_INFO" = 0xFB,
"GET_ID" = 0xFA,
"SET_REQUEST" = 0xF9,
"GET_SEED" = 0xF8,
"UNLOCK" = 0xF7,
"SET_MTA" = 0xF6,
"UPLOAD" = 0xF5,
"SHORT_UPLOAD" = 0xF4,
"BUILD_CHECKSUM" = 0xF3,
"TRANSPORT_LAYER_CMD" = 0xF2,
"USER_CMD" = 0xF1,
"DOWNLOAD" = 0xF0,
"DOWNLOAD_NEXT" = 0xEF,
"DOWNLOAD_MAX" = 0xEE,
"SHORT_DOWNLOAD" = 0xED,
"MODIFY_BITS" = 0xEC,
"SET_CAL_PAGE" = 0xEB,
"GET_CAL_PAGE" = 0xEA,
"GET_PAG_PROCESSOR_INFO" = 0xE9,
"GET_SEGMENT_INFO" = 0xE8,
"GET_PAGE_INFO" = 0xE7,
"SET_SEGMENT_MODE" = 0xE6,
"GET_SEGMENT_MODE" = 0xE5,
"COPY_CAL_PAGE" = 0xE4,
"CLEAR_DAQ_LIST" = 0xE3,
"SET_DAQ_PTR" = 0xE2,
"WRITE_DAQ" = 0xE1,
"SET_DAQ_LIST_MODE" = 0xE0,
"GET_DAQ_LIST_MODE" = 0xDF,
"START_STOP_DAQ_LIST" = 0xDE,
"START_STOP_SYNCH" = 0xDD,
"GET_DAQ_CLOCK" = 0xDC,
"READ_DAQ" = 0xDB,
"GET_DAQ_PROCESSOR_INFO" = 0xDA,
"GET_DAQ_RESOLUTION_INFO" = 0xD9,
"GET_DAQ_LIST_INFO" = 0xD8,
"GET_DAQ_EVENT_INFO" = 0xD7,
"FREE_DAQ" = 0xD6,
"ALLOC_DAQ" = 0xD5,
"ALLOC_ODT" = 0xD4,
"ALLOC_ODT_ENTRY" = 0xD3,
"PROGRAM_START" = 0xD2,
"PROGRAM_CLEAR" = 0xD1,
"PROGRAM" = 0xD0,
"PROGRAM_RESET" = 0xCF,
"GET_PGM_PROCESSOR_INFO" = 0xCE,
"GET_SECTOR_INFO" = 0xCD,
"PROGRAM_PREPARE" = 0xCC,
"PROGRAM_FORMAT" = 0xCB,
"PROGRAM_NEXT" = 0xCA,
"PROGRAM_MAX" = 0xC9,
"PROGRAM_VERIFY" = 0xC8,
"WRITE_DAQ_MULTIPLE" = 0xC7,
"TIME_CORRELATION_PROPERTIES" = 0xC6,
"DTO_CTR_PROPERTIES" = 0xC5
/* do not use 0xC0 command code here, it is reserved as command extension code */
})*;
("OPTIONAL_LEVEL1_CMD" enum { /* XCP-Code of optional level 1 commands, starting with level 0 0xC0 as first byte */
"GET_VERSION" = 0x00,
"SET_DAQ_PACKED_MODE" = 0x01,
"GET_DAQ_PACKED_MODE" = 0x02,
"SW_DBG_COMMAND_SPACE" = 0xFC,
"POD_COMMAND_SPACE" = 0xFD
/* 0xFE shall not be used */
/* 0xFF reserved for optional level 2 command space extension */
})*;
"COMMUNICATION_MODE_SUPPORTED" taggedunion { /* optional modes supported */
"BLOCK" taggedstruct {
"SLAVE"; /* Slave Block Mode supported */
"MASTER" struct { /* Master Block Mode supported */
uchar; /* MAX_BS */
uchar; /* MIN_ST */
};
};
"INTERLEAVED" uchar; /* QUEUE_SIZE */
};
"SEED_AND_KEY_EXTERNAL_FUNCTION" char[256]; /* Name of the Seed&Key function */
/* including file extension */
/* without path */
"MAX_DTO_STIM" uint; /* overrules MAX_DTO see above for STIM use case */
block "ECU_STATES" taggedstruct{
(block "STATE" struct{
uchar; /* STATE_NUMBER */
char[100]; /* STATE_NAME */
taggedstruct {
"ECU_SWITCHED_TO_DEFAULT_PAGE";
};
enum { /* CAL/PAG RESOURCE */
"NOT_ACTIVE" = 0,
"ACTIVE" = 1,
"GETTER_ONLY" = 2 /* Setter methods not allowed */
};
enum { /* DAQ RESOURCE */
"NOT_ACTIVE" = 0,
"ACTIVE" = 1
};
enum { /* STIM RESOURCE */
"NOT_ACTIVE" = 0,
"ACTIVE" = 1
};
enum { /* PGM RESOURCE */
"NOT_ACTIVE" = 0,
"ACTIVE" = 1
};
taggedstruct {
(block "MEMORY_ACCESS" struct{ /* CAL/PAG AVAILABLE */
uchar; /* SEGMENT_NUMBER */
uchar; /* PAGE_NUMBER */
enum {
"READ_ACCESS_NOT_ALLOWED" = 0,
"READ_ACCESS_ALLOWED" = 1
};
enum {
"WRITE_ACCESS_NOT_ALLOWED" = 0,
"WRITE_ACCESS_ALLOWED" = 1
};
})*;
};
})*;
};
};
};
/***************** end of PROTOCOL_LAYER *******************/
/********************* start of DAQ ************************/
struct Daq { /* DAQ supported, at MODULE */
enum { /* DAQ_CONFIG_TYPE */
"STATIC" = 0,
"DYNAMIC" = 1
};
uint; /* MAX_DAQ */
uint; /* MAX_EVENT_CHANNEL */
uchar; /* MIN_DAQ */
enum { /* OPTIMISATION_TYPE */
"OPTIMISATION_TYPE_DEFAULT" = 0,
"OPTIMISATION_TYPE_ODT_TYPE_16" = 1,
"OPTIMISATION_TYPE_ODT_TYPE_32" = 2,
"OPTIMISATION_TYPE_ODT_TYPE_64" = 3,
"OPTIMISATION_TYPE_ODT_TYPE_ALIGNMENT" = 4,
"OPTIMISATION_TYPE_MAX_ENTRY_SIZE" = 5
};
enum { /* ADDRESS_EXTENSION */
"ADDRESS_EXTENSION_FREE" = 0,
"ADDRESS_EXTENSION_ODT" = 1,
"ADDRESS_EXTENSION_DAQ" = 3
};
enum { /* IDENTIFICATION_FIELD */
"IDENTIFICATION_FIELD_TYPE_ABSOLUTE" = 0,
"IDENTIFICATION_FIELD_TYPE_RELATIVE_BYTE" = 1,
"IDENTIFICATION_FIELD_TYPE_RELATIVE_WORD" = 2,
"IDENTIFICATION_FIELD_TYPE_RELATIVE_WORD_ALIGNED" = 3
};
enum { /* GRANULARITY_ODT_ENTRY_SIZE_DAQ */
"GRANULARITY_ODT_ENTRY_SIZE_DAQ_BYTE" = 1,
"GRANULARITY_ODT_ENTRY_SIZE_DAQ_WORD" = 2,
"GRANULARITY_ODT_ENTRY_SIZE_DAQ_DWORD" = 4,
"GRANULARITY_ODT_ENTRY_SIZE_DAQ_DLONG" = 8
};
uchar; /* MAX_ODT_ENTRY_SIZE_DAQ */
enum { /* OVERLOAD_INDICATION */
"NO_OVERLOAD_INDICATION" = 0,
"OVERLOAD_INDICATION_PID" = 1,
"OVERLOAD_INDICATION_EVENT" = 2
};
taggedstruct { /* optional */
"DAQ_ALTERNATING_SUPPORTED" uint; /* Display_Event_Channel_Number */
"PRESCALER_SUPPORTED";
"RESUME_SUPPORTED";
"STORE_DAQ_SUPPORTED";
"DTO_CTR_FIELD_SUPPORTED";
"OPTIMISATION_TYPE_ODT_STRICT"; /* strict mode shall only be used in combination with */
/* OPTIMISATION_TYPE_ODT_TYPE_16 */
/* OPTIMISATION_TYPE_ODT_TYPE_32 */
/* OPTIMISATION_TYPE_ODT_TYPE_64 */
block "STIM" struct { /* STIM supported */
enum { /* GRANULARITY_ODT_ENTRY_SIZE_STIM */
"GRANULARITY_ODT_ENTRY_SIZE_STIM_BYTE" = 1,
"GRANULARITY_ODT_ENTRY_SIZE_STIM_WORD" = 2,
"GRANULARITY_ODT_ENTRY_SIZE_STIM_DWORD" = 4,
"GRANULARITY_ODT_ENTRY_SIZE_STIM_DLONG" = 8
};
uchar; /* MAX_ODT_ENTRY_SIZE_STIM */
taggedstruct { /* bitwise stimulation */
"BIT_STIM_SUPPORTED";
"MIN_ST_STIM" uchar; /* separation time between DTOs */
/* time in units of 100 microseconds */
};
};
block "TIMESTAMP_SUPPORTED" struct {
uint; /* TIMESTAMP_TICKS */
enum { /* TIMESTAMP_SIZE */
"NO_TIME_STAMP" = 0,
"SIZE_BYTE" = 1,
"SIZE_WORD" = 2,
"SIZE_DWORD" = 4
};
enum { /* RESOLUTION OF TIMESTAMP */
"UNIT_1NS" = 0,
"UNIT_10NS" = 1,
"UNIT_100NS" = 2,
"UNIT_1US" = 3,
"UNIT_10US" = 4,
"UNIT_100US" = 5,
"UNIT_1MS" = 6,
"UNIT_10MS" = 7,
"UNIT_100MS" = 8,
"UNIT_1S" = 9,
"UNIT_1PS" = 10,
"UNIT_10PS" = 11,
"UNIT_100PS" = 12
};
taggedstruct {
"TIMESTAMP_FIXED";
};
};
"PID_OFF_SUPPORTED";
/* Configuration Limits */
"MAX_DAQ_TOTAL" uint;
"MAX_ODT_TOTAL" uint;
"MAX_ODT_DAQ_TOTAL" uint;
"MAX_ODT_STIM_TOTAL" uint;
"MAX_ODT_ENTRIES_TOTAL" uint;
"MAX_ODT_ENTRIES_DAQ_TOTAL" uint;
"MAX_ODT_ENTRIES_STIM_TOTAL" uint;
"CPU_LOAD_MAX_TOTAL" float;
"CORE_LOAD_MAX_TOTAL" float; /* max load of all cores */
(block "CORE_LOAD_MAX" struct {
uint; /* CORE_NR: core reference number */
float; /* CORE_LOAD_MAX: max load of core(CORE_NR) */
})*;
block "DAQ_MEMORY_CONSUMPTION" struct {
ulong; /* DAQ_MEMORY_LIMIT: in Elements[AG] */
uint; /* DAQ_SIZE: number of elements[AG] per DAQ list */
uint; /* ODT_SIZE: number of elements[AG] per ODT */
uint; /* ODT_ENTRY_SIZE: number of elements[AG] per ODT_entry */
uint; /* ODT_DAQ_BUFFER_ELEMENT_SIZE: number of */
/* payload elements[AG]*factor = sizeof(send buffer)[AG] */
uint; /* ODT_STIM_BUFFER_ELEMENT_SIZE: number of */
/* payload elements[AG]*factor = sizeof(receive buffer)[AG] */
taggedstruct {
block "BUFFER_RESERVE" struct { /* default for all EVENTs */
uchar; /* ODT_DAQ_BUFFER_ELEMENT_RESERVE in % of */
/* ODT_DAQ_BUFFER_ELEMENT_SIZE */
uchar; /* ODT_STIM_BUFFER_ELEMENT_RESERVE in % of */
/* ODT_STIM_BUFFER_ELEMENT_SIZE */
};
};
};
/******************* start of DAQ_LIST *********************/
(block "DAQ_LIST" struct { /* DAQ_LIST */
/* multiple possible */
uint; /* DAQ_LIST_NUMBER */
taggedstruct { /* optional */
"DAQ_LIST_TYPE" enum {
"DAQ" = 1, /* DIRECTION = DAQ only */
"STIM" = 2, /* DIRECTION = STIM only */
"DAQ_STIM" = 3 /* both directions possible */
/* but not simultaneously */
};
"MAX_ODT" uchar; /* MAX_ODT */
"MAX_ODT_ENTRIES" uchar; /* MAX_ODT_ENTRIES */
"FIRST_PID" uchar; /* FIRST_PID for this DAQ_LIST */
"EVENT_FIXED" uint; /* this DAQ_LIST always */
/* in this event */
"DAQ_PACKED_MODE_SUPPORTED"; /* supports DAQ packed mode */
block "PREDEFINED" taggedstruct { /* predefined */
/* not configurable DAQ_LIST */
(block "ODT" struct {
uchar; /* ODT number */
taggedstruct {
("ODT_ENTRY" struct {
uchar; /* ODT_ENTRY number */
ulong; /* address of element */
uchar; /* address extension of element */
uchar; /* size of element [AG] */
uchar; /* BIT_OFFSET */
})*;
}; /* end of ODT_ENTRY */
})*; /* end of ODT */
}; /* end of PREDEFINED */
};
})*;
/******************* end of DAQ_LIST ***********************/
/******************* start of EVENT ************************/
(block "EVENT" struct { /* EVENT */
/* multiple possible */
char[101]; /* EVENT_CHANNEL_NAME */
char[9]; /* EVENT_CHANNEL_SHORT_NAME */
uint; /* EVENT_CHANNEL_NUMBER */
enum {
"DAQ" = 1, /* only DAQ_LISTs */
/* with DIRECTION = DAQ */
"STIM" = 2, /* only DAQ_LISTs */
/* with DIRECTION = STIM */
"DAQ_STIM" = 3 /* both kind of DAQ_LISTs */
};
uchar; /* MAX_DAQ_LIST */
uchar; /* EVENT_CHANNEL_TIME_CYCLE */
uchar; /* EVENT_CHANNEL_TIME_UNIT */
uchar; /* EVENT_CHANNEL_PRIORITY */
taggedstruct { /* optional */
"COMPLEMENTARY_BYPASS_EVENT_CHANNEL_NUMBER" uint; /* for compatibility reasons */
/* not to be considered, if 1.3 Bypassing features are implemented */
"CONSISTENCY" enum {
"DAQ" = 0,
"EVENT" = 1,
"ODT" = 2,
"NONE" = 3
};
"EVENT_COUNTER_PRESENT";
"RELATED_EVENT_CHANNEL_NUMBER" uint;
"RELATED_EVENT_CHANNEL_NUMBER_FIXED"; /* RELATED_EVENT_CHANNEL_NUMBER can not be modified. */
"DTO_CTR_DAQ_MODE" enum { /* When inserting the DTO CTR field: */
"INSERT_COUNTER" = 0, /* - use CTR of the related event channel */
"INSERT_STIM_COUNTER_COPY" = 1 /* - use STIM CTR CPY of the related event channel */
};
"DTO_CTR_DAQ_MODE_FIXED"; /* DTO_CTR_DAQ_MODE properties can not be modified. */
"DTO_CTR_STIM_MODE" enum { /* When receiving DTOs with CTR field: */
"DO_NOT_CHECK_COUNTER" = 0, /* - do not check CTR */
"CHECK_COUNTER" = 1 /* - check CTR */
};
"DTO_CTR_STIM_MODE_FIXED"; /* DTO_CTR_STIM_MODE properties can not be modified */
"STIM_DTO_CTR_COPY_PRESENT"; /* DTO CTR can be saved for later reference */
block "DAQ_PACKED_MODE" struct { /* DAQ packed mode, applies for all associated DAQ lists */
enum { /* El. A,B,C,D, 3 samples */
"ELEMENT_GROUPED" = 1, /* A0A1A2B0B1B2C0C1C2D0D1D2 */
"EVENT_GROUPED" = 2 /* A0B0C0D0A1B1C1D1A2B2C2D2 */
};
enum { /* timestamp mode */
"STS_LAST" = 0, /* single timestamp of last sample */
"STS_FIRST" = 1 /* single timestamp of first sample */
};
enum { /* usage */
"OPTIONAL" = 0, /* optional, EVENT allows also non-packed mode */
"MANDATORY" = 1 /* mandatory, only packed mode allowed */
};
uint; /* DAQ packed mode sample count */
taggedstruct {
("ALT_SAMPLE_COUNT" uint)*; /* other valid sample count values (optional) */
};
};
block "MIN_CYCLE_TIME" struct { /* Configuration with 0-0 not allowed */
uchar; /* EVENT_CHANNEL_TIME_CYCLE */
uchar; /* EVENT_CHANNEL_TIME_UNIT */
};
block "BUFFER_RESERVE_EVENT" struct {
/* overrules default BUFFER_RESERVE for this EVENT */
uchar; /* ODT_DAQ_BUFFER_ELEMENT_RESERVE in % of ODT_DAQ_BUFFER_ELEMENT_SIZE */
uchar; /* ODT_STIM_BUFFER_ELEMENT_RESERVE in % of ODT_STIM_BUFFER_ELEMENT_SIZE */
};
"CPU_LOAD_MAX" float;
block "CPU_LOAD_CONSUMPTION_DAQ" struct {
float; /* DAQ_FACTOR */
float; /* ODT_FACTOR */
float; /* ODT_ENTRY_FACTOR */
taggedstruct {
(block "ODT_ENTRY_SIZE_FACTOR_TABLE" struct{
uint; /* SIZE */
float; /* SIZE_FACTOR */
})*;
block "CORE_LOAD_EP" struct {
uint; /* CORE_NR: core reference number */
float; /* CORE_LOAD_EP_MAX: max load of this event part */
};
};
};
block "CPU_LOAD_CONSUMPTION_STIM" struct {
float; /* DAQ_FACTOR */
float; /* ODT_FACTOR */
float; /* ODT_ENTRY_FACTOR */
taggedstruct {
(block "ODT_ENTRY_SIZE_FACTOR_TABLE" struct{
uint; /* SIZE */
float; /* SIZE_FACTOR */
})*;
block "CORE_LOAD_EP" struct {
uint; /* CORE_NR: core reference number */
float; /* CORE_LOAD_EP_MAX: max load of this event part */
};
};
};
block "CPU_LOAD_CONSUMPTION_QUEUE" struct {
/* default for DAQ and STIM QUEUE */
float; /* ODT_FACTOR */
float; /* ODT_ELEMENT_LOAD: length in elements[AG] */
taggedstruct {
block "CORE_LOAD_EP" struct {
uint; /* CORE_NR: core reference number */
float; /* CORE_LOAD_EP_MAX: max load of this event part */
};
};
};
block "CPU_LOAD_CONSUMPTION_QUEUE_STIM" struct {
/* overrules CPU_LOAD_CONSUMPTION_QUEUE for STIM QUEUE */
float; /* ODT_FACTOR */
float; /* ODT_ELEMENT_LOAD: length in elements[AG] */
taggedstruct {
block "CORE_LOAD_EP" struct {
uint; /* CORE_NR: core reference number */
float; /* CORE_LOAD_EP_MAX: max load of this event part */
};
};
};
};
})*;
/********************* end of EVENT ************************/
}; /* end of optional at DAQ */
};
/********************* end of DAQ **************************/
/***************** start of DAQ_EVENT **********************/
taggedunion Daq_Event { /* at MEASUREMENT */
"FIXED_EVENT_LIST" taggedstruct {
("EVENT" uint)*;
};
"VARIABLE" taggedstruct {
block "AVAILABLE_EVENT_LIST" taggedstruct {
("EVENT" uint)*;
};
block "DEFAULT_EVENT_LIST" taggedstruct {
("EVENT" uint)*;
};
block "CONSISTENCY_EVENT_LIST" taggedstruct {
("EVENT" uint)*;
};
};
};
/******************** end of DAQ_EVENT *********************/
/********************** start of PAG ***********************/
struct Pag { /* PAG supported, at MODULE */
uchar; /* MAX_SEGMENTS */
taggedstruct { /* optional */
"FREEZE_SUPPORTED";
};
};
/*********************** end of PAG ************************/
/********************** start of PGM ***********************/
struct Pgm { /* PGM supported, at MODULE */
enum {
"PGM_MODE_ABSOLUTE" = 1,
"PGM_MODE_FUNCTIONAL" = 2,
"PGM_MODE_ABSOLUTE_AND_FUNCTIONAL" = 3
};
uchar; /* MAX_SECTORS */
uchar; /* MAX_CTO_PGM */
taggedstruct { /* optional */
(block "SECTOR" struct { /* SECTOR */
/* multiple possible */
char[101]; /* SECTOR_NAME */
uchar; /* SECTOR_NUMBER */
ulong; /* Address */
ulong; /* Length */
uchar; /* CLEAR_SEQUENCE_NUMBER */
uchar; /* PROGRAM_SEQUENCE_NUMBER */
uchar; /* PROGRAM_METHOD */
})*; /* end of SECTOR */
"COMMUNICATION_MODE_SUPPORTED" taggedunion { /* optional modes supported */
"BLOCK" taggedstruct {
"SLAVE"; /* Slave Block Mode supported */
"MASTER" struct { /* Master Block Mode supported */
uchar; /* MAX_BS_PGM */
uchar; /* MIN_ST_PGM */
};
};
"INTERLEAVED" uchar; /* QUEUE_SIZE_PGM */
};
};
};
/*********************** end of PGM ************************/
/******************** start of SEGMENT *********************/
struct Segment { /* at MEMORY_SEGMENT */
uchar; /* SEGMENT_NUMBER */
uchar; /* number of pages */
uchar; /* ADDRESS_EXTENSION */
uchar; /* COMPRESSION_METHOD */
uchar; /* ENCRYPTION_METHOD */
taggedstruct { /* optional */
block "CHECKSUM" struct {
enum { /* checksum type */
"XCP_ADD_11" = 1,
"XCP_ADD_12" = 2,
"XCP_ADD_14" = 3,
"XCP_ADD_22" = 4,
"XCP_ADD_24" = 5,
"XCP_ADD_44" = 6,
"XCP_CRC_16" = 7,
"XCP_CRC_16_CITT" = 8,
"XCP_CRC_32" = 9,
"XCP_USER_DEFINED" = 255
};
taggedstruct {
"MAX_BLOCK_SIZE" ulong; /* maximum block size */
/* for checksum calculation */
"EXTERNAL_FUNCTION" char[256]; /* Name of the Checksum function */
/* including file extension */
/* without path */
"MTA_BLOCK_SIZE_ALIGN" uint; /* required alignment of MTA and block size */
};
};
"DEFAULT_PAGE_NUMBER" uchar; /* Number of the default page */
(block "PAGE" struct { /* PAGES for this SEGMENT */
/* multiple possible */
uchar; /* PAGE_NUMBER */
enum { /* ECU_ACCESS_TYPE */
"ECU_ACCESS_NOT_ALLOWED" = 0,
"ECU_ACCESS_WITHOUT_XCP_ONLY" = 1,
"ECU_ACCESS_WITH_XCP_ONLY" = 2,
"ECU_ACCESS_DONT_CARE" = 3
};
enum { /* XCP_READ_ACCESS_TYPE */
"XCP_READ_ACCESS_NOT_ALLOWED" = 0,
"XCP_READ_ACCESS_WITHOUT_ECU_ONLY" = 1,
"XCP_READ_ACCESS_WITH_ECU_ONLY" = 2,
"XCP_READ_ACCESS_DONT_CARE" = 3
};
enum { /* XCP_WRITE_ACCESS_TYPE */
"XCP_WRITE_ACCESS_NOT_ALLOWED" = 0,
"XCP_WRITE_ACCESS_WITHOUT_ECU_ONLY" = 1,
"XCP_WRITE_ACCESS_WITH_ECU_ONLY" = 2,
"XCP_WRITE_ACCESS_DONT_CARE" = 3
};
taggedstruct {
"INIT_SEGMENT" uchar; /* references segment that initialises this page */
};
})*; /* end of PAGE */
(block "ADDRESS_MAPPING" struct { /* multiple possible */
ulong; /* source address */
ulong; /* destination address */
ulong; /* length */
})*;
"PGM_VERIFY" ulong; /* verification value for PGM */
}; /* end of optional */
};
/********************** end of SEGMENT *********************/
/***************** start of TIME_CORRELATION ***************/
taggedstruct Time_Correlation {
/***********************************************************/
/* XCP_SLAVE_CLOCK and ECU_CLOCK need not */
/* necessarily be the same clock, i.e. in case of */
/* an external XCP Slave, these clocks might differ */
/***********************************************************/
"DAQ_TIMESTAMPS_RELATE_TO" enum {
"XCP_SLAVE_CLOCK" = 0,
"ECU_CLOCK" = 1
};
(block "CLOCK" struct {
char; /* globally unique clock identifier (UUID/EUI), 1st octet (most significant byte) */
char; /* globally unique clock identifier (UUID/EUI), 2nd octet */
char; /* globally unique clock identifier (UUID/EUI), 3rd octet */
char; /* globally unique clock identifier (UUID/EUI), 4th octet */
char; /* globally unique clock identifier (UUID/EUI), 5th octet */
char; /* globally unique clock identifier (UUID/EUI), 6th octet */
char; /* globally unique clock identifier (UUID/EUI), 7th octet */
char; /* globally unique clock identifier (UUID/EUI), 8th octet (least significant byte) */
enum { /* clock enumerator */
"XCP_SLAVE_CLOCK" = 0,
"ECU_CLOCK" = 1,
"XCP_SLAVE_GRANDMASTER_CLOCK" = 2, /* related to XCP_SLAVE_CLOCK */
"ECU_GRANDMASTER_CLOCK" = 3 /* related to ECU_CLOCK in case of an external slave */
};
enum { /* readability */
"RANDOMLY_READABLE" = 0,
"LIMITED_READABLE" = 1,
"NOT_READABLE" = 2
};
enum { /* synchronization features */
"SYN_UNSUPPORTED" = 0, /* clock neither supports synchronization */
/* nor syntonization */
"SYNCHRONIZATION_ONLY" = 1, /* clock only supports synchronization to */
/* external grandmaster clock */
"SYNTONIZATION_ONLY" = 2, /* clock only supports syntonization to */
/* external grandmaster clock */
"SYN_ALL" = 3 /* clock supports synchronization as well */
/* as syntonization to external grandmaster clock */
};
uchar; /* clock quality, stratum level */
taggedstruct {
block "TIMESTAMP_CHARACTERIZATION" struct {
uint; /* TIMESTAMP_TICKS */
enum { /* RESOLUTION OF TIMESTAMP */
"UNIT_1NS" = 0,
"UNIT_10NS" = 1,
"UNIT_100NS" = 2,
"UNIT_1US" = 3,
"UNIT_10US" = 4,
"UNIT_100US" = 5,
"UNIT_1MS" = 6,
"UNIT_10MS" = 7,
"UNIT_100MS" = 8,
"UNIT_1S" = 9,
"UNIT_1PS" = 10,
"UNIT_10PS" = 11,
"UNIT_100PS" = 12
};
enum { /* NATIVE TIMESTAMP SIZE */
"SIZE_FOUR_BYTE" = 4,
"SIZE_EIGHT_BYTE" = 8
};
};
};
uint64; /* MAX_TIMESTAMP_VALUE_BEFORE_WRAP_AROUND */
enum { /* epoch */
"ATOMIC_TIME" = 0, /* TAI */
"UNIVERSAL_COORDINATED_TIME" = 1, /* UTC */
"ARBITRARY" = 2 /* unknown */
};
})*;
};
/***************** end of TIME_CORRELATION ****************/
/***************** start of Common Parameters **************/
taggedstruct Common_Parameters {
block "PROTOCOL_LAYER" struct Protocol_Layer;
block "TIME_CORRELATION" taggedstruct Time_Correlation;
block "SEGMENT" struct Segment;
block "DAQ" struct Daq;
block "PAG" struct Pag;
block "PGM" struct Pgm;
block "DAQ_EVENT" taggedunion Daq_Event;
};
/****************** end of Common Parameters ***************/
/************************ start of CAN *********************/
struct CAN_Parameters { /* At MODULE */
uint; /* XCP on CAN version */
/* "1.4" = 0x0104 */
taggedstruct { /* optional */
"CAN_ID_BROADCAST" ulong; /* Auto detection CAN-ID */
/* master -> slaves */
/* Bit31= 1: extended identifier */
/* Bit30= 1: CAN-FD identifier */
"CAN_ID_MASTER" ulong; /* CMD/STIM CAN-ID */
/* master -> slave */
/* Bit31= 1: extended identifier */
/* Bit30= 1: CAN-FD identifier */
"CAN_ID_MASTER_INCREMENTAL"; /* master uses range of CAN-IDs */
/* start of range = CAN_ID_MASTER */
/* end of range = CAN_ID_MASTER+MAX_BS(_PGM)-1 */
"CAN_ID_SLAVE" ulong; /* RES/ERR/EV/SERV/DAQ CAN-ID */
/* slave -> master */
/* Bit31= 1: extended identifier */
/* Bit30= 1: CAN-FD identifier */
"CAN_ID_GET_DAQ_CLOCK_MULTICAST" ulong; /* Only to be used for GET_DAQ_CLOCK_MULTICAST */
/* master -> slaves */
/* Bit31= 1: extended identifier */
/* Bit30= 1: CAN-FD identifier */
"BAUDRATE" ulong; /* BAUDRATE [Hz] */
"SAMPLE_POINT" uchar; /* sample point */
/* [% complete bit time] */
"SAMPLE_RATE" enum {
"SINGLE" = 1, /* 1 sample per bit */
"TRIPLE" = 3 /* 3 samples per bit */
};
"BTL_CYCLES" uchar; /* BTL_CYCLES */
/* [slots per bit time] */
"SJW" uchar; /* length synchr. segment */
/* [BTL_CYCLES] */
"SYNC_EDGE" enum {
"SINGLE" = 1, /* on falling edge only */
"DUAL" = 2 /* on falling and rising edge */
};
"MAX_DLC_REQUIRED"; /* master to slave frames */
/* always to have DLC = MAX_DLC = 8 */
(block "DAQ_LIST_CAN_ID" struct { /* At IF_DATA DAQ */
uint; /* reference to DAQ_LIST_NUMBER */
taggedstruct { /* exclusive tags */
/* either VARIABLE or FIXED */
"VARIABLE";
"FIXED" ulong; /* this DAQ_LIST always */
/* on this CAN_ID */
};
})*;
(block "EVENT_CAN_ID_LIST" struct { /* At IF_DATA DAQ */
uint; /* reference to EVENT_NUMBER */
taggedstruct { /* exclusive tags */
("FIXED" ulong)*; /* this Event always on this ID */
};
})*;
"MAX_BUS_LOAD" ulong; /* maximum available bus */
/* load in percent */
"MEASUREMENT_SPLIT_ALLOWED"; /* Supports splitting of measurements to increase payload for MAX_DTO <= 8 */
block "CAN_FD" struct { /* The CAN_FD block definition indicates the use of CAN-FD frames */
taggedstruct {
"MAX_DLC" uint; /* 8, 12, 16, 20, 24, 32, 48 or 64 */
"CAN_FD_DATA_TRANSFER_BAUDRATE" ulong; /* BAUDRATE [Hz] */
"SAMPLE_POINT" uchar; /* sample point receiver */
/* [% complete bit time] */
"BTL_CYCLES" uchar; /* BTL_CYCLES */
/* [slots per bit time] */
"SJW" uchar; /* length synchr. segment */
/* [BTL_CYCLES] */
"SYNC_EDGE" enum {
"SINGLE" = 1, /* on falling edge only */
"DUAL" = 2 /* on falling and rising edge */
};
"MAX_DLC_REQUIRED"; /* master to slave frames */
/* always to have DLC = MAX_DLC_for CAN-FD */
"SECONDARY_SAMPLE_POINT" uchar; /* sender sample point */
/* [% complete bit time] */
"TRANSCEIVER_DELAY_COMPENSATION" enum {
"OFF" = 0,
"ON" = 1
};
};
};
};
taggedstruct {
("OPTIONAL_TL_SUBCMD" enum { /* XCP-Code of optional transport layer */
/* specific subcommand supported by the slave */
"GET_SLAVE_ID" = 0xFF,
"GET_DAQ_ID" = 0xFE,
"SET_DAQ_ID" = 0xFD,
"GET_DAQ_CLOCK_MULTICAST" = 0xFA
})*;
};
};
/************************* end of CAN **********************/
/********************** start of SxI ***********************/
struct SxI_Parameters { /* At MODULE */
uint; /* XCP on SxI version */
/* "1.4" = 0x0104 */
ulong; /* BAUDRATE [Hz] */
taggedstruct { /* exclusive tags */
"ASYNCH_FULL_DUPLEX_MODE" struct {
enum {
"PARITY_NONE" = 0,
"PARITY_ODD" = 1,
"PARITY_EVEN" = 2
};
enum {
"ONE_STOP_BIT" = 1,
"TWO_STOP_BITS" = 2
};
taggedstruct {
block "FRAMING" struct {
uchar; /* SYNC */
uchar; /* ESC */
};
};
};
"SYNCH_FULL_DUPLEX_MODE_BYTE";
"SYNCH_FULL_DUPLEX_MODE_WORD";
"SYNCH_FULL_DUPLEX_MODE_DWORD";
"SYNCH_MASTER_SLAVE_MODE_BYTE";
"SYNCH_MASTER_SLAVE_MODE_WORD";
"SYNCH_MASTER_SLAVE_MODE_DWORD";
};
enum {
"HEADER_LEN_BYTE" = 0,
"HEADER_LEN_CTR_BYTE" = 1,
"HEADER_LEN_FILL_BYTE" = 2,
"HEADER_LEN_WORD" = 3,
"HEADER_LEN_CTR_WORD" = 4,
"HEADER_LEN_FILL_WORD" = 5
};
enum {
"NO_CHECKSUM" = 0,
"CHECKSUM_BYTE" = 1,
"CHECKSUM_WORD" = 2
};
};
/*************************** end of SxI ********************/
/************************ start of TCP_IP ******************/
struct TCP_IP_Parameters {
uint; /* XCP on TCP_IP version */
/* "1.4" = 0x0104 */
uint; /* PORT */
taggedunion {
"HOST_NAME" char[256];
"ADDRESS" char[15];
"IPV6" char[39];
};
taggedstruct{
"MAX_BUS_LOAD" ulong; /* maximum available bus */
/* load in percent */
"MAX_BIT_RATE" ulong; /* Network speed which is */
/* the base for MAX_BUS_LOAD in Mbit */
};
taggedstruct{
"PACKET_ALIGNMENT" enum {
"PACKET_ALIGNMENT_8" = 0, /* This is the default if the keyword is missing */
"PACKET_ALIGNMENT_16" = 1,
"PACKET_ALIGNMENT_32" = 2
};
};
taggedstruct{
("OPTIONAL_TL_SUBCMD" enum { /* XCP-Code of optional transport layer */
/* specific subcommand supported by the slave */
"GET_SLAVE_ID" = 0xFF,
"GET_SLAVE_ID_EXTENDED" = 0xFD,
"SET_SLAVE_IP_ADDRESS" = 0xFC,
"GET_DAQ_CLOCK_MULTICAST" = 0xFA
})*;
};
};
/************************* end of TCP_IP *******************/
/************************ start of UDP_IP ******************/
struct UDP_IP_Parameters {
uint; /* XCP on UDP_IP version */
/* "1.4" = 0x0104 */
uint; /* PORT */
taggedunion {
"HOST_NAME" char[256];
"ADDRESS" char[15];
"IPV6" char[39];