Newer
Older
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
Index: EncDec/LibItsBtp_EncdecDeclarations.cc
===================================================================
--- EncDec/LibItsBtp_EncdecDeclarations.cc (nonexistent)
+++ EncDec/LibItsBtp_EncdecDeclarations.cc (working copy)
@@ -0,0 +1,25 @@
+#include "LibItsBtp_EncdecDeclarations.hh"
+
+namespace LibItsBtp__EncdecDeclarations {
+/****************************************************
+ * @desc External function to encode a BtpPayload type
+ * @param value to encode
+ * @return encoded value
+ ****************************************************/
+BITSTRING fx__enc__BtpPayload(const LibItsBtp__TypesAndValues::BtpPayload& p)
+{
+ return int2bit(0,8);
+}
+
+/****************************************************
+ * @desc External function to decode a BtpPayload type
+ * @param value to encode
+ * @return encoded value
+ ****************************************************/
+/* TODO RGy function not implemented! (decvalue() not used by test suite @29-06-2016)
+INTEGER fx__dec__BtpPayload(BITSTRING& b, LibItsBtp__TypesAndValues::BtpPayload& p)
+{
+ return -1;
+}
+*/
+} //end namespace
Index: EncDec/LibItsCam_EncdecDeclarations.cc
===================================================================
--- EncDec/LibItsCam_EncdecDeclarations.cc (nonexistent)
+++ EncDec/LibItsCam_EncdecDeclarations.cc (working copy)
@@ -0,0 +1,39 @@
+#include "LibItsCam_EncdecDeclarations.hh"
+
+namespace LibItsBtp__EncdecDeclarations {
+/****************************************************
+ * @desc External function to encode a CamReq type
+ * @param value to encode
+ * @return encoded value
+ ****************************************************/
+BITSTRING fx__enc__CamReq(const LibItsCam__TestSystem::CamReq& p)
+{
+ //set error behavior
+ TTCN_EncDec::set_error_behavior(TTCN_EncDec::ET_ALL,TTCN_EncDec::EB_WARNING);
+
+ TTCN_Buffer TTCN_buf;
+ TTCN_buf.clear();
+
+//encode message in BER (CER variant, but can be any)
+ p.msgOut().encode(CAM__PDU__Descriptions::CAM_descr_,TTCN_buf,TTCN_EncDec::CT_BER,BER_ENCODE_CER);
+
+ OCTETSTRING encodedData(TTCN_buf.get_len(), TTCN_buf.get_data());
+
+//insert BER2PER recoding here!
+
+ return oct2bit(encodedData);
+}
+
+
+/****************************************************
+ * @desc External function to decode a DenmReq type
+ * @param value to encode
+ * @return encoded value
+ ****************************************************/
+/* TODO RGy function not implemented! (decvalue() not used by test suite @29-06-2016)
+INTEGER fx__dec__CamReq(BITSTRING& b, LibItsCam__TestSystem::CamReq& p)
+{
+ return -1;
+}
+*/
+} //end namespace
Index: EncDec/LibItsDenm_EncdecDeclarations.cc
===================================================================
--- EncDec/LibItsDenm_EncdecDeclarations.cc (nonexistent)
+++ EncDec/LibItsDenm_EncdecDeclarations.cc (working copy)
@@ -0,0 +1,38 @@
+#include "LibItsDenm_EncdecDeclarations.hh"
+
+namespace LibItsDenm__EncdecDeclarations {
+/****************************************************
+ * @desc External function to encode a DenmReq type
+ * @param value to encode
+ * @return encoded value
+ ****************************************************/
+BITSTRING fx__enc__DenmReq(const LibItsDenm__TestSystem::DenmReq& p)
+{
+ //set error behavior
+ TTCN_EncDec::set_error_behavior(TTCN_EncDec::ET_ALL,TTCN_EncDec::EB_WARNING);
+
+ TTCN_Buffer TTCN_buf;
+ TTCN_buf.clear();
+
+//encode message in BER (CER variant, but can be any)
+ p.msgOut().encode(DENM__PDU__Descriptions::DENM_descr_,TTCN_buf,TTCN_EncDec::CT_BER,BER_ENCODE_CER);
+
+ OCTETSTRING encodedData(TTCN_buf.get_len(), TTCN_buf.get_data());
+
+//insert BER2PER recoding here!
+
+ return oct2bit(encodedData);
+}
+
+/****************************************************
+ * @desc External function to decode a DenmReq type
+ * @param value to encode
+ * @return encoded value
+ ****************************************************/
+/* function not needed yet, decvalue() is not used in TTCN-3 code
+INTEGER fx__dec__DenmReq(BITSTRING& b, LibItsDenm__TestSystem::DenmReq& p)
+{
+ return -1
+}
+*/
+} //end namespace
Index: EncDec/LibItsEvcsn_EncdecDeclarations.cc
===================================================================
--- EncDec/LibItsEvcsn_EncdecDeclarations.cc (nonexistent)
+++ EncDec/LibItsEvcsn_EncdecDeclarations.cc (working copy)
@@ -0,0 +1,39 @@
+#include "LibItsEvcsn_encdecDeclarations.hh"
+
+namespace LibItsEvcsn__encdecDeclarations {
+/****************************************************
+ * @desc External function to encode a EvcsnReq type
+ * @param value to encode
+ * @return encoded value
+ ****************************************************/
+BITSTRING fx__enc__EvcsnReq(const LibItsEvcsn__TestSystem::EvcsnReq& p)
+{
+ //set error behavior
+ TTCN_EncDec::set_error_behavior(TTCN_EncDec::ET_ALL,TTCN_EncDec::EB_WARNING);
+
+ TTCN_Buffer TTCN_buf;
+ TTCN_buf.clear();
+
+//encode message in BER (CER variant, but can be any)
+ p.msgOut().encode(EVCSN__PDU__Descriptions::EvcsnPdu_descr_,TTCN_buf,TTCN_EncDec::CT_BER,BER_ENCODE_CER);
+
+ OCTETSTRING encodedData(TTCN_buf.get_len(), TTCN_buf.get_data());
+
+//insert BER2PER recoding here!
+
+ return oct2bit(encodedData);
+}
+
+
+/****************************************************
+ * @desc External function to decode a DenmReq type
+ * @param value to encode
+ * @return encoded value
+ ****************************************************/
+/* TODO RGy function not implemented! (decvalue() not used by test suite @29-06-2016)
+INTEGER fx__dec__EvcsnReq(BITSTRING& b, LibItsEvcsn__TestSystem::EvcsnReq& p)
+{
+ return -1;
+}
+*/
+} //end namespace
Index: EncDec/LibItsGeoNetworking_EncdecDeclarations.cc
===================================================================
--- EncDec/LibItsGeoNetworking_EncdecDeclarations.cc (nonexistent)
+++ EncDec/LibItsGeoNetworking_EncdecDeclarations.cc (working copy)
@@ -0,0 +1,67 @@
+#include "LibItsGeoNetworking_encdecDeclarations.hh"
+
+namespace LibItsGeoNetworking__encdecDeclarations {
+/****************************************************
+ * @desc External function to encode a GeoNetworkingPdu type
+ * @param value to encode
+ * @return encoded value
+ ****************************************************/
+BITSTRING fx__enc__GeoNetworkingPdu(const LibItsGeoNetworking__TypesAndValues::GeoNetworkingPdu& p)
+{
+ return int2bit(0,8);
+}
+
+/****************************************************
+ * @desc External function to decode a GeoNetworkingPdu type
+ * @param value to encode
+ * @return encoded value
+ ****************************************************/
+
+INTEGER fx__dec__GeoNetworkingPdu(BITSTRING& b, LibItsGeoNetworking__TypesAndValues::GeoNetworkingPdu& p)
+{
+ return -1;
+}
+
+/****************************************************
+ * @desc External function to encode a Payload type
+ * @param value to encode
+ * @return encoded value
+ ****************************************************/
+BITSTRING fx__enc__Payload(const LibItsGeoNetworking__TypesAndValues::Payload& p)
+{
+ return int2bit(0,8);
+}
+
+/****************************************************
+ * @desc External function to decode a Payload type
+ * @param value to encode
+ * @return encoded value
+ ****************************************************/
+
+INTEGER fx__dec__Payload(BITSTRING& b, LibItsGeoNetworking__TypesAndValues::Payload& p)
+{
+ return -1;
+}
+
+/****************************************************
+ * @desc External function to encode a GnNonSecuredPacket type
+ * @param value to encode
+ * @return encoded value
+ ****************************************************/
+BITSTRING fx__enc__GnNonSecuredPacket(const LibItsGeoNetworking__TypesAndValues::GnNonSecuredPacket& p)
+{
+ return int2bit(0,8);
+}
+
+/****************************************************
+ * @desc External function to decode a GnNonSecuredPacket type
+ * @param value to encode
+ * @return encoded value
+ ****************************************************/
+
+INTEGER fx__dec__GnNonSecuredPacket(BITSTRING& b, LibItsGeoNetworking__TypesAndValues::GnNonSecuredPacket& p)
+{
+ return -1;
+}
+
+} //end namespace
Index: EncDec/LibItsSecurity_EncdecDeclarations.cc
===================================================================
--- EncDec/LibItsSecurity_EncdecDeclarations.cc (nonexistent)
+++ EncDec/LibItsSecurity_EncdecDeclarations.cc (working copy)
@@ -0,0 +1,88 @@
+#include "LibItsSecurity_EncdecDeclarations.hh"
+
+namespace LibItsSecurity__EncdecDeclarations {
+/****************************************************
+ * @desc External function to encode a SecuredMessage type
+ * @param value to encode
+ * @return encoded value
+ ****************************************************/
+BITSTRING fx__enc__SecuredMessage(const LibItsSecurity__TypesAndValues::SecuredMessage& p)
+{
+ return int2bit(0,8);
+}
+
+/****************************************************
+ * @desc External function to decode a SecuredMessage type
+ * @param value to encode
+ * @return encoded value
+ ****************************************************/
+
+INTEGER fx__dec__SecuredMessage(BITSTRING& b, LibItsSecurity__TypesAndValues::SecuredMessage& p)
+{
+ return -1;
+}
+
+/****************************************************
+ * @desc External function to encode a ToBeSignedSecuredMessage type
+ * @param value to encode
+ * @return encoded value
+ ****************************************************/
+BITSTRING fx__enc__ToBeSignedSecuredMessage(const LibItsSecurity__TypesAndValues::ToBeSignedSecuredMessage& p)
+{
+ return int2bit(0,8);
+}
+
+/****************************************************
+ * @desc External function to decode a ToBeSignedSecuredMessage type
+ * @param value to encode
+ * @return encoded value
+ ****************************************************/
+
+INTEGER fx__dec__ToBeSignedSecuredMessage(BITSTRING& b, LibItsSecurity__TypesAndValues::ToBeSignedSecuredMessage& p)
+{
+ return -1;
+}
+
+/****************************************************
+ * @desc External function to encode a Certificate type
+ * @param value to encode
+ * @return encoded value
+ ****************************************************/
+BITSTRING fx__enc__Certificate(const LibItsSecurity__TypesAndValues::Certificate& p)
+{
+ return int2bit(0,8);
+}
+
+/****************************************************
+ * @desc External function to decode a Certificate type
+ * @param value to encode
+ * @return encoded value
+ ****************************************************/
+
+INTEGER fx__dec__Certificate(BITSTRING& b, LibItsSecurity__TypesAndValues::Certificate& p)
+{
+ return -1;
+}
+
+/****************************************************
+ * @desc External function to encode a ToBeSignedCertificate type
+ * @param value to encode
+ * @return encoded value
+ ****************************************************/
+BITSTRING fx__enc__ToBeSignedCertificate(const LibItsSecurity__TypesAndValues::ToBeSignedCertificate& p)
+{
+ return int2bit(0,8);
+}
+
+/****************************************************
+ * @desc External function to decode a ToBeSignedCertificate type
+ * @param value to encode
+ * @return encoded value
+ ****************************************************/
+/*
+INTEGER fx__dec__ToBeSignedCertificate(BITSTRING& b, LibItsSecurity__TypesAndValues::ToBeSignedCertificate& p)
+{
+ return -1;
+}
+*/
+} //end namespace
Index: Externals/LibItsCommon_externals.cc
===================================================================
--- Externals/LibItsCommon_externals.cc (nonexistent)
+++ Externals/LibItsCommon_externals.cc (working copy)
@@ -0,0 +1,95 @@
+#include "LibItsCommon_Functions.hh"
+//#include "ITS_Container.hh"
+#include <time.h>
+#include <math.h>
+
+namespace LibItsCommon__Functions
+{
+
+/* * @desc This external function gets the current time
+ * @return Timestamp - current time since 01/01/2014 in milliseconds
+ fx_getCurrentTime() return TimestampIts;
+*/
+INTEGER fx__getCurrentTime(
+) {
+ unsigned long long timestamp2014 = 1356998400000;
+ struct timeval tv;
+ gettimeofday(&tv, NULL);
+
+ unsigned long long timestampNow = tv.tv_sec*1000 + tv.tv_usec/1000;
+
+// i.set_long_long_val(timestampNow - timestamp2014);
+// return i;
+ return INTEGER(timestampNow - timestamp2014);
+}
+
+/* * @desc External function to compute distance between two points
+ * @param p_latitudeA Latitude of first point
+ * @param p_longitudeA Longitude of first point
+ * @param p_latitudeB Latitude of second point
+ * @param p_longitudeB Longitude of second point
+ * @return Computed distance in meters
+ fx_computeDistance(in Int32 p_latitudeA, in Int32 p_longitudeA, in Int32 p_latitudeB, in Int32 p_longitudeB) return float;
+*/
+FLOAT fx__computeDistance(
+ const INTEGER& p__latitudeA,
+ const INTEGER& p__longitudeA,
+ const INTEGER& p__latitudeB,
+ const INTEGER& p__longitudeB
+) {
+ double d_latA = ((int)p__latitudeA)/10000000.0;
+ double d_latB = ((int)p__latitudeB)/10000000.0;
+
+ double d_lonA = ((int)p__longitudeA)/10000000.0;
+ double d_lonB = ((int)p__longitudeB)/10000000.0;
+
+ double earth_radius = 6371000.0; //meters
+
+ double d_lat = (d_latB - d_latA) *M_PI/180.0;
+ double d_lon = (d_lonB - d_lonA)*M_PI/180.0;
+
+ double a = sin(d_lat/2)*sin(d_lat/2) + cos(d_latA*M_PI/180.0)*cos(d_latB*M_PI/180.0)*sin(d_lon/2)*sin(d_lon/2);
+ double c = 2*atan2(sqrt(a), sqrt(1-a));
+
+ return FLOAT(earth_radius*c);
+
+}
+
+/* * @desc External function to compute a position using a reference position, a distance and an orientation
+ * @param p_iutLongPosVector Reference position
+ * @param p_distance Distance to the reference position (in meter)
+ * @param p_orientation Direction of the computed position (0 to 359; 0 means North)
+ * @param p_latitude Computed position's latitude
+ * @param p_longitude Computed position's longitude
+ fx_computePositionUsingDistance(in Int32 p_refLatitude,in Int32 p_refLongitude,in float p_distance,in integer p_orientation,out Int32 p_latitude,out Int32 p_longitude);
+*/
+void fx__computePositionUsingDistance(
+ const INTEGER& p__refLatitude,
+ const INTEGER& p__refLongitude,
+ const FLOAT& p__distance,
+ const INTEGER& p__orientation,
+ INTEGER& p__latitude,
+ INTEGER& p__longitude
+) {
+ double distance = p__distance/6371000.0;
+ double angle = p__orientation*M_PI/180.0;
+
+ double ref_lat = p__refLatitude*M_PI/180.0;
+ double ref_lon = p__refLongitude*M_PI/180.0;
+
+ p__latitude = asin(sin(ref_lat)*cos(distance) + cos(ref_lat)*sin(distance)*cos(angle))*180/M_PI;
+ p__longitude = p__refLongitude + atan2(sin(angle)*sin(distance)*cos(ref_lat), cos(distance) - sin(ref_lat)*sin(p__latitude))*180/M_PI;
+}
+
+/* * @desc External function to compute radius of a given circular area
+ * @param p_squareMeters Square meters of an circular area
+ * @return Computed radius in meters
+ fx_computeRadiusFromCircularArea(in float p_squareMeters) return float;
+*/
+FLOAT fx__computeRadiusFromCircularArea(
+ const FLOAT& p__squareMeters
+) {
+ return FLOAT(sqrt(p__squareMeters/M_PI));
+}
+
+} // end of Namespace
Index: Externals/LibItsDcc_externals.cc
===================================================================
--- Externals/LibItsDcc_externals.cc (nonexistent)
+++ Externals/LibItsDcc_externals.cc (working copy)
@@ -0,0 +1,12 @@
+#include "LibItsDcc_Functions.hh"
+
+namespace LibItsDcc__Functions
+{
+/* * @desc Returns the string representation of the float value
+ * @param p_float The float value
+ * @return The string representation of the float value
+ fx_float2str(float p_float) return charstring;
+*/
+//RGY no C++ implementation is needed, Titan supports this function natively
+
+} // end of namespace
Index: Externals/LibItsGeoNetworking_externals.cc
===================================================================
--- Externals/LibItsGeoNetworking_externals.cc (nonexistent)
+++ Externals/LibItsGeoNetworking_externals.cc (working copy)
@@ -0,0 +1,24 @@
+#include "LibItsGeoNetworking_Functions.hh"
+#include <time.h>
+#include <math.h>
+
+namespace LibItsGeoNetworking__Functions
+{
+/* * @desc External function to compute timestamp based on current time
+ * @return Unix-Epoch-Time mod 2^32
+ fx_computeGnTimestamp() return UInt32;
+*/
+INTEGER fx__computeGnTimestamp(
+) {
+ struct timeval tv;
+ gettimeofday(&tv, NULL);
+
+// unsigned long long timestampNow = tv.tv_sec*1000 + tv.tv_usec/1000;
+ long long timestampNow = tv.tv_sec*1000 + tv.tv_usec/1000;
+ INTEGER i = INTEGER();
+ i.set_long_long_val(timestampNow % 4294967296);
+// return INTEGER(timestampNow % 4294967296);
+ return i;
+}
+
+} //end namespace
Index: Externals/LibItsIpv6OverGeoNetworking_externals.cc
===================================================================
--- Externals/LibItsIpv6OverGeoNetworking_externals.cc (nonexistent)
+++ Externals/LibItsIpv6OverGeoNetworking_externals.cc (working copy)
@@ -0,0 +1,58 @@
+#include "LibItsIpv6OverGeoNetworking_Functions.hh"
+#include <time.h>
+#include <math.h>
+
+namespace LibItsIpv6OverGeoNetworking__Functions
+{
+/* * @desc Calculate ICMPv6 checksum on pseudo header according RFC 4443 - Clause 2.3
+ * @param p_sourceAddress Source address,
+ * @param p_destinationAddress Destination address
+ * @param p_payloadLength Upper-Layer Packet Length
+ * @param p_payload Upper-Layer payload
+ * @param p_nextHdr Next header value (e.g. 0x3a for ICMPv6)
+ * @return The checksum value
+ * <pre>
+ * Pseudo header is defined by RFC 2460 - Clause 8.1
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | |
+ * + +
+ * | |
+ * + Source Address +
+ * | |
+ * + +
+ * | |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | |
+ * + +
+ * | |
+ * + Destination Address +
+ * | |
+ * + +
+ * | |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | Upper-Layer Packet Length |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | zero | Next Header |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * </pre>
+ external function fx_computeIPv6CheckSum(
+ in template (value) Ipv6Address p_sourceAddress,
+ in template (value) Ipv6Address p_destinationAddress,
+ in template (value) integer p_payloadLength,
+ in template (value) octetstring p_payload,
+ in template (value) UInt8 p_nextHdr
+ ) return Oct2;
+*/
+
+OCTETSTRING fx__computeIPv6CheckSum(
+ const OCTETSTRING_template& p__sourceAddress,
+ const OCTETSTRING_template& p__destinationAddress,
+ const INTEGER_template& p__payloadLength,
+ const OCTETSTRING_template& p__payload,
+ const INTEGER_template& p__nextHdr
+) {
+ OCTETSTRING ret_val = int2oct(0,1);
+ return ret_val;
+}
+
+} //end namespace
Index: Externals/LibItsMapemSpatem_externals.cc
===================================================================
--- Externals/LibItsMapemSpatem_externals.cc (nonexistent)
+++ Externals/LibItsMapemSpatem_externals.cc (working copy)
@@ -0,0 +1,18 @@
+#include "LibItsMapemSpatem_externals.hh"
+#include <time.h>
+#include <math.h>
+
+namespace LibItsMapemSpatem__externals
+{
+/*FIXME RGY @desc sounds like a copy-paste, not as the real purpose of the function
+ * @desc External function to compute distance between two points
+ * @param p_rawData Octetstring to analyse
+ * @return true or false according to the check
+ fx_checkUperEncoding ( in RawData p_rawData ) return boolean;
+*/
+BOOLEAN fx__checkUperEncoding(const OCTETSTRING& p__rawData)
+{
+ return TRUE;
+}
+
+} //end namespace
Index: Externals/LibItsSecurity_externals.cc
===================================================================
--- Externals/LibItsSecurity_externals.cc (nonexistent)
+++ Externals/LibItsSecurity_externals.cc (working copy)
@@ -0,0 +1,302 @@
+#include "LibItsSecurity_Functions.hh"
+
+namespace LibItsSecurity__Functions
+{
+// group signing
+/* * @desc Produces a 256-bit (32-byte) hash value
+ * @param p_toBeHashedData Data to be used to calculate the hash value
+ * @return The hash value
+ fx_hashWithSha256(in octetstring p_toBeHashedData) return Oct32;
+*/
+OCTETSTRING fx__hashWithSha256(
+ const OCTETSTRING& p__toBeHashedData
+) {
+//RGY when implementing, look at TCC_Useful_functions/TCCSecurity_Functions
+ OCTETSTRING ret_val = int2oct(0,1);
+ return ret_val;
+}
+
+/* * @desc Produces a Elliptic Curve Digital Signature Algorithm (ECDSA) signaturee
+ * @param p_toBeSignedSecuredMessage The data to be signed
+ * @param p_privateKey The private key
+ * @return The signature value
+ fx_signWithEcdsaNistp256WithSha256(in octetstring p_toBeSignedSecuredMessage, in octetstring<UInt64> p_privateKey) return octetstring;
+*/
+OCTETSTRING fx__signWithEcdsaNistp256WithSha256(
+ const OCTETSTRING& p__toBeSignedSecuredMessage,
+ const OCTETSTRING& p__privateKey
+) {
+ OCTETSTRING ret_val = int2oct(0,1);
+ return ret_val;
+}
+
+/* * @desc Verify the signature of the specified data
+ * @param p_toBeVerifiedData The data to be verified
+ * @param p_signature The signature
+ * @param p_ecdsaNistp256PublicKeyX The public key (x coordinate)
+ * @param p_ecdsaNistp256PublicKeyY The public key (y coordinate)
+ * @return true on success, false otherwise
+ fx_verifyWithEcdsaNistp256WithSha256(in octetstring p_toBeVerifiedData, in octetstring p_signature, in octetstring p_ecdsaNistp256PublicKeyX, in octetstring p_ecdsaNistp256PublicKeyY) return boolean;
+*/
+BOOLEAN fx__verifyWithEcdsaNistp256WithSha256(
+ const OCTETSTRING& p__toBeVerifiedData,
+ const OCTETSTRING& p__signature,
+ const OCTETSTRING& p__ecdsaNistp256PublicKeyX,
+ const OCTETSTRING& p__ecdsaNistp256PublicKeyY
+) {
+ return TRUE;
+}
+
+/* * @desc Produce a new public/private key pair based on Elliptic Curve Digital Signature Algorithm (ECDSA) algorithm.
+ * This function should not be used by the ATS
+ * @param p_privateKey The new private key value
+ * @param p_publicKeyX The new public key value (x coordinate)
+ * @param p_publicKeyX The new public key value (y coordinate)
+ * @return true on success, false otherwise
+ fx_generateKeyPair(out octetstring<UInt64> p_privateKey, out octetstring p_publicKeyX, out octetstring p_publicKeyY) return boolean;
+*/
+BOOLEAN fx__generateKeyPair(
+ OCTETSTRING& p__privateKey,
+ OCTETSTRING& p__publicKeyX,
+ OCTETSTRING& p__publicKeyY
+) {
+ return TRUE;
+}
+
+// group encryption
+
+// group certificatesLoader
+
+/* * @desc Load in memory cache the certificates available in the specified directory
+ * @param p_rootDirectory Root directory to access to the certificates identified by the certificate ID
+ * @param p_configId A configuration identifier
+ * @remark This method SHALL be call before any usage of certificates
+ * @return true on success, false otherwise
+ fx_loadCertificates(in charstring p_rootDirectory, in charstring p_configId) return boolean;
+*/
+BOOLEAN fx__loadCertificates(
+ const CHARSTRING& p__rootDirectory,
+ const CHARSTRING& p__configId
+) {
+ return TRUE;
+}
+
+/* * @desc Unload from memory cache the certificates
+ * @return true on success, false otherwise
+ fx_unloadCertificates() return boolean;
+*/
+BOOLEAN fx__unloadCertificates(
+) {
+ return TRUE;
+}
+
+/* * @desc Read the specified certificate
+ * @param p_certificateId the certificate identifier
+ * @param p_certificate the expected certificate
+ * @return true on success, false otherwise
+ fx_readCertificate(in charstring p_certificateId, out octetstring p_certificate) return boolean;
+*/
+BOOLEAN fx__readCertificate(
+ const CHARSTRING& p__certificateId,
+ OCTETSTRING& p__certificate
+) {
+ return TRUE;
+}
+
+
+/* * @desc Read the specified certificate digest
+ * @param p_certificateId the certificate identifier
+ * @param p_digest the expected certificate
+ * @return true on success, false otherwise
+ fx_readCertificateDigest(in charstring p_certificateId, out HashedId8 p_digest) return boolean;
+*/
+BOOLEAN fx__readCertificateDigest(
+ const CHARSTRING& p__certificateId,
+ OCTETSTRING& p__digest
+) {
+ return TRUE;
+}
+
+/* * @desc Read the private keys for the specified certificate
+ * @param p_keysId the keys identifier
+ * @param p_signingPrivateKey the signing private key
+ * @return true on success, false otherwise
+ fx_readSigningKey(in charstring p_keysId, out Oct32 p_signingPrivateKey) return boolean;
+*/
+BOOLEAN fx__readSigningKey(
+ const CHARSTRING& p__keysId,
+ OCTETSTRING& p__signingPrivateKey
+) {
+ return TRUE;
+}
+
+/* * @desc Read the private keys for the specified certificate
+ * @param p_keysId the keys identifier
+ * @param p_encryptPrivateKey the encrypt private key
+ * @return true on success, false otherwise
+ fx_readEncryptingKey(in charstring p_keysId, out Oct32 p_encryptingPrivateKey) return boolean;
+*/
+BOOLEAN fx__readEncryptingKey(
+ const CHARSTRING& p__keysId,
+ OCTETSTRING& p__encryptingPrivateKey
+) {
+ return TRUE;
+}
+
+// group geodesic
+
+/* * @desc Check that given polygon doesn't have neither self-intersections nor holes.
+ * @param p_region Polygonal Region
+ * @return true on success, false otherwise
+ * @verdict Unchanged
+ fx_isValidPolygonalRegion(in PolygonalRegion p_region) return boolean;
+*/
+BOOLEAN fx__isValidPolygonalRegion(
+ const LibItsSecurity__TypesAndValues::PolygonalRegion& p__region
+) {
+ return TRUE;
+}
+
+/* * @desc Check if a polygonal region is inside another one
+ * @param p_parent The main polygonal region
+ * @param p_region The polygonal region to be included
+ * @return true on success, false otherwise
+ * @verdict Unchanged
+ fx_isPolygonalRegionInside(in PolygonalRegion p_parent, in PolygonalRegion p_region) return boolean;
+*/
+BOOLEAN fx__isPolygonalRegionInside(
+ const LibItsSecurity__TypesAndValues::PolygonalRegion& p__parent,
+ const LibItsSecurity__TypesAndValues::PolygonalRegion& p__region
+) {
+ return TRUE;
+}
+
+/* * @desc Check that the location is inside a circular region
+ * @param p_region The circular region to consider
+ * @param p_location The device location
+ * @return true on success, false otherwise
+ * @verdict Unchanged
+ fx_isLocationInsideCircularRegion(in CircularRegion p_region, in ThreeDLocation p_location) return boolean;
+*/
+BOOLEAN fx__isLocationInsideCircularRegion(
+ const LibItsSecurity__TypesAndValues::CircularRegion& p__region,
+ const LibItsSecurity__TypesAndValues::ThreeDLocation& p__location
+) {
+ return TRUE;
+}
+
+/* * @desc Check that the location is inside a rectangular region
+ * @param p_region The rectangular region to consider
+ * @param p_location The device location
+ * @return true on success, false otherwise
+ * @verdict Unchanged
+ fx_isLocationInsideRectangularRegion(in RectangularRegions p_region, in ThreeDLocation p_location) return boolean;
+*/
+BOOLEAN fx__isLocationInsideRectangularRegion(
+ const LibItsSecurity__TypesAndValues::RectangularRegions& p__region,
+ const LibItsSecurity__TypesAndValues::ThreeDLocation& p__location
+) {
+ return TRUE;
+}
+
+/* * @desc Check that the location is inside a polygonal region
+ * @param p_region The polygonal region to consider
+ * @param p_location The device location
+ * @return true on success, false otherwise
+ * @verdict Unchanged
+ fx_isLocationInsidePolygonalRegion(in PolygonalRegion p_region, in ThreeDLocation p_location) return boolean;
+*/
+BOOLEAN fx__isLocationInsidePolygonalRegion(
+ const LibItsSecurity__TypesAndValues::PolygonalRegion& p__region,
+ const LibItsSecurity__TypesAndValues::ThreeDLocation& p__location
+) {
+ return TRUE;
+}
+
+
+/* * @desc Check if the location is inside an identified region
+ * @param p_region The identified region to consider
+ * @param p_location The device location
+ * @return true on success, false otherwise
+ * @verdict Unchanged
+ fx_isLocationInsideIdentifiedRegion(in IdentifiedRegion p_region, in ThreeDLocation p_location) return boolean;
+*/
+BOOLEAN fx__isLocationInsideIdentifiedRegion(
+ const LibItsSecurity__TypesAndValues::IdentifiedRegion& p__region,
+ const LibItsSecurity__TypesAndValues::ThreeDLocation& p__location
+) {
+ return TRUE;
+}
+
+/* * @desc Check if the location is inside an undefined region
+ * @param p_region The identified region to consider
+ * @param p_location The device location
+ * @return true on success, false otherwise
+ * @verdict Unchanged
+ fx_isLocationInsideOtherRegion(in octetstring p_region, in ThreeDLocation p_location) return boolean;
+*/
+BOOLEAN fx__isLocationInsideOtherRegion(
+ const OCTETSTRING& p_region,
+ const LibItsSecurity__TypesAndValues::ThreeDLocation& p_location
+) {
+ return TRUE;
+}
+
+/* * @desc Check that p_circular_region_1 circular region is included into p_circular_region_2 circular region
+ * @param p_circular_region_1 Circular region 1
+ * @param p_circular_region_2 Circular region 2
+ * @return true on success, false otherwise
+ fx_areCirclesInside(in CircularRegion p_circular_region_1, in CircularRegion p_circular_region_2) return boolean;
+*/
+BOOLEAN fx__areCirclesInside(
+ const LibItsSecurity__TypesAndValues::CircularRegion& p_circular_region_1,
+ const LibItsSecurity__TypesAndValues::CircularRegion& p_circular_region_2
+) {
+ return TRUE;
+}
+
+/* * @desc Check that p_rectanglar_region_1 rectangular region is included into p_rectanglar_region_2 rectangular region
+ * @param p_rectanglar_region_1 Rectangular region 1
+ * @param p_rectanglar_region_2 Rectangular region 2
+ * @return true on success, false otherwise
+ fx_areRectanglesInside(in RectangularRegions p_rectanglar_region_1, in RectangularRegions p_rectanglar_region_2) return boolean;
+*/
+BOOLEAN fx__areRectanglesInside(
+ const LibItsSecurity__TypesAndValues::RectangularRegions& p_rectanglar_region_1,
+ const LibItsSecurity__TypesAndValues::RectangularRegions& p_rectanglar_region_2
+) {
+ return TRUE;
+}
+
+/* * @desc Check that p_polygonal_region_1 polygonal region is included into p_polygonal_region_2 polygonal region
+ * @param p_polygonal_region_1 Polygonal region 1
+ * @param p_polygonal_region_2 Polygonal region 2
+ * @return true on success, false otherwise
+ fx_arePolygonsInside(in PolygonalRegion p_polygonal_region_1, in PolygonalRegion p_polygonal_region_2) return boolean;
+*/
+BOOLEAN fx__arePolygonsInside(
+ const LibItsSecurity__TypesAndValues::PolygonalRegion& p_polygonal_region_1,
+ const LibItsSecurity__TypesAndValues::PolygonalRegion& p_polygonal_region_2
+) {
+ return TRUE;
+}
+
+/* * @desc Convert a spacial coordinate from DMS to Dms
+ * @param p_degrees The degrees (D)
+ * @param p_minutes The minutes (M)
+ * @param p_seconds The seconds (S)
+ * @param p_latlon The latitude/longitude: (N|S|E|W)
+ * @return The decimal coordinate on success, 0.0, otherwise
+ * @verdict Unchanged
+ fx_dms2dd(in Int p_degrees, in Int p_minutes, in float p_seconds, in Oct1 p_latlon) return float;
+*/
+FLOAT fx__dms2dd(
+ const INTEGER& p__degrees,
+ const INTEGER& p__minutes,
+ const FLOAT& p__seconds,
+ const OCTETSTRING& p__latlon
+) {
+ return 0.0;
+}
+
+} // end of namespace
Index: Ports/LibIts_ports/AdapterControlPort.cc
===================================================================
--- Ports/LibIts_ports/AdapterControlPort.cc (nonexistent)
+++ Ports/LibIts_ports/AdapterControlPort.cc (working copy)
@@ -0,0 +1,21 @@
+#include "AdapterControlPort.hh"
+
+//#include "CALM_ports/AdapterControlPort_CALM.partC"
+/* to be used when built without generating softlinks to the working directory
+#include "CAM_ports/AdapterControlPort_CAM.partC"
+#include "DENM_ports/AdapterControlPort_DENM.partC"
+#include "GN_ports/AdapterControlPort_GN.partC"
+#include "IVIM_ports/AdapterControlPort_IVIM.partC"
+#include "MapemSpatem_ports/AdapterControlPort_MapemSpatem.partC"
+#include "SremSsem_ports/AdapterControlPort_SremSsem.partC"
+#include "V2G_ports/AdapterControlPort_V2G.partC"
+*/
+#include "AdapterControlPort_CAM.partC"
+#include "AdapterControlPort_DENM.partC"
+#include "AdapterControlPort_GN.partC"
+#include "AdapterControlPort_IVIM.partC"
+#include "AdapterControlPort_MapemSpatem.partC"
+#include "AdapterControlPort_SremSsem.partC"
+#include "AdapterControlPort_Evcsn.partC"
+//#include "AdapterControlPort_V2G.partC"
+
Index: Ports/LibIts_ports/AdapterControlPort.hh
===================================================================
--- Ports/LibIts_ports/AdapterControlPort.hh (nonexistent)
+++ Ports/LibIts_ports/AdapterControlPort.hh (working copy)
@@ -0,0 +1,25 @@
+#ifndef AdapterControlPort_HH
+#define AdapterControlPort_HH
+
+//#include "TRI_mapper_API.hh"
+
+//#include "CALM_ports/AdapterControlPort_CALM.partH"
+/* to be used when built without generating softlinks to the working directory
+#include "CAM_ports/AdapterControlPort_CAM.partH"
+#include "DENM_ports/AdapterControlPort_DENM.partH"
+#include "GN_ports/AdapterControlPort_GN.partH"
+#include "IVIM_ports/AdapterControlPort_IVIM.partH"
+#include "MapemSpatem_ports/AdapterControlPort_MapemSpatem.partH"
+#include "SremSsem_ports/AdapterControlPort_SremSsem.partH"
+#include "V2G_ports/AdapterControlPort_V2G.partH"
+*/
+#include "AdapterControlPort_CAM.partH"
+#include "AdapterControlPort_DENM.partH"
+#include "AdapterControlPort_GN.partH"
+#include "AdapterControlPort_IVIM.partH"
+#include "AdapterControlPort_MapemSpatem.partH"
+#include "AdapterControlPort_SremSsem.partH"
+#include "AdapterControlPort_Evcsn.partH"
+//#include "AdapterControlPort_V2G.partH"
+
+#endif
Index: Ports/LibIts_ports/BTP_ports/BtpPort.cc
===================================================================
--- Ports/LibIts_ports/BTP_ports/BtpPort.cc (nonexistent)
+++ Ports/LibIts_ports/BTP_ports/BtpPort.cc (working copy)
@@ -0,0 +1,77 @@
+// This Test Port skeleton source file was generated by the
+// TTCN-3 Compiler of the TTCN-3 Test Executor version CRL 113 200/5 R3A
+// for U-ERICSSON\ethgry (ethgry@HU00078339) on Fri Aug 14 21:19:06 2015
+
+// Copyright Ericsson Telecom AB 2000-2014
+
+// You may modify this file. Complete the body of empty functions and
+// add your member functions here.
+
+#include "BtpPort.hh"
+
+namespace LibItsBtp__TestSystem {
+
+BtpPort::BtpPort(const char *par_port_name)
+ : BtpPort_BASE(par_port_name)
+{
+
+}
+
+BtpPort::~BtpPort()
+{
+
+}
+
+void BtpPort::set_parameter(const char * /*parameter_name*/,
+ const char * /*parameter_value*/)
+{
+
+}
+
+/*void BtpPort::Handle_Fd_Event(int fd, boolean is_readable,
+ boolean is_writable, boolean is_error) {}*/
+
+void BtpPort::Handle_Fd_Event_Error(int /*fd*/)
+{
+
+}
+
+void BtpPort::Handle_Fd_Event_Writable(int /*fd*/)
+{
+
+}
+
+void BtpPort::Handle_Fd_Event_Readable(int /*fd*/)
+{
+
+}
+
+/*void BtpPort::Handle_Timeout(double time_since_last_call) {}*/
+
+void BtpPort::user_map(const char * /*system_port*/)
+{
+
+}
+
+void BtpPort::user_unmap(const char * /*system_port*/)
+{
+
+}
+
+void BtpPort::user_start()
+{
+
+}
+
+void BtpPort::user_stop()
+{
+
+}
+
+void BtpPort::outgoing_send(const BtpReq& /*send_par*/)
+{
+
+}