Home » Eclipse Projects » Eclipse Titan » No custom encoding function found (trying to compile the ETSI ITS-S Conformance TestSuite for AtsCAM)
No custom encoding function found [message #1735503] |
Mon, 20 June 2016 09:07  |
Eclipse User |
|
|
|
I'm struggling to get the ETSI ITS conformance test suite compiled for Titan.
I downloaded the ETSI TTCN conformance test suite for CAM from ETSI Websvn web site at forge_etsi_org___websvn. And there under ITS / ITS-S.
And there: (ITS)/trunk/ttcn/AtsCAM/ - Rev 2396
I also downloaded the ASN1 sources and the LibCommon as well as the LibItsCam source from ETSI.
I got everything installed. Some constants were not defined, this I have done (see the etsi mantis ticket id=7070)
Finally the compilation of the *.ttcn and *.asn sources fails with the following error:
LibItsCam_TestSystem.ttcn:128.18-130.13: error: No custom encoding function found for type `@LibItsCam_TestSystem.CamReq'
Can you please help me, what I need to define to get the official ETSI TTCN sources compiled with Titan.
The same I did with the DENM suite and here the TTCN3-compilation went well. I couldn't find the difference between CAM and DENM.
Thank You
|
|
|
Re: No custom encoding function found [message #1735511 is a reply to message #1735503] |
Mon, 20 June 2016 10:02   |
Eclipse User |
|
|
|
When an instance of a type is found in the TTCN-3 code as argument of the built-in encvalue() or decvalue() functions, Titan will automatically call the related encoding or decoding function, and return the result.
For built-in Titan codecs (RAW, TEXT, ASN.1 BER, XML, JSON) this is automatic, because both the encoding and decoding functions are generated compile time (unless codec generation is disabled by a compiler switch, e.g. to decrease code size).
When the type of the instance is using some other kind of encoding, the encoding and/or decoding functions has to be written manually. For example, in case of the CamReq type, the "LibIts_Interface" TTCN-3 encode attribute is associated with it. To identify, which functions to be called when executing envalue() or decvalue(), external functions of the prototype convert (for encoding) and sliding (for decoding) shall be declared, using the string in the TTCN-3 encode attribute.
For example for CAM:
module CAM_encdecDeclarations {
import from LibItsCam_TestSystem all;
external function fx_enc_CamReq (CamReq p) return bitstring
with {extension "prototype(convert) encode(LibIts_Interface)"}
external function fx_dec_CamReq (inout bitstring b, out CamReq p) return integer
with {extension "prototype(sliding) decode(LibIts_Interface)"}
}
(fx_dec_CamReq is added as an example only, as no decvalue() is using instance of CamReq in the ITS test suite, it is in fact not needed)
Pls. note, it is not needed to import this module into the module containing encvalue()/decvalue(), Titan will find these functions automatically, based by their declarations.
Attached are the dummy skeletons for the ITS user-specific codec functions; they will do nothing in runtime as of now, but allow building an executable.
We have a working version of an earlier version, pls. contact Elemér or me if you would like to try it.
[Updated on: Mon, 20 June 2016 11:44] by Moderator
|
|
| | |
Re: No custom encoding function found [message #1735552 is a reply to message #1735551] |
Tue, 21 June 2016 02:50   |
Eclipse User |
|
|
|
Hi Christof,
we have a nearly complete ITS stack that can be donwnloaded from
https://github.com/aitorbak/ITSG5_TS_Titanized_TA
(After cloning it, you need to create a directory build , then copy here and execute install.script from /src , after which make should be OK.)
BTP, CAM and DENM is functional and the test cases have been validated to an extent.
GN is functional and some effort has to be added to validate the test cases.
MAP_SPAT is also functional and the test cases will also have to be validated, but the effort should be minimal here.
Full validation of test cases was not done as we don't have access to a real SUT. If you have one and give us access , maybe we can work together to finish the stack.
There's a few things you need to know:
-as we wanted to re-use ETSIs system adapter, written in Java, we use simplified versions of test ports to connect to the SA via sockets.
(so there's a C++ -Java boundary in the code; there are better alternatives, but this was the simplest at that time)
-this is an earlier version of ITS, with ASN.1s not containing information object classes; for this , we could add an open-source PER codec;
for later versions , we don't have an open source solution; you will need to buy a 3rd party codec from somewhere;
more about this here:
https://www.eclipse.org/forums/index.php/t/1070344/
Please let me know if you have any problems -or success -with the code.
Best regards
Elemer
[Updated on: Tue, 21 June 2016 03:05] by Moderator
|
|
| | |
Re: No custom encoding function found [message #1736949 is a reply to message #1735562] |
Mon, 04 July 2016 10:22   |
Eclipse User |
|
|
|
Hi Elemer and György,
in the meantime I have the Titan and the ITSG5_TS_Titanized_TA installed on my Ubuntu system.
I can generate the ITS_Exec executable and can start the mctr and HC.
I selected to start first with the DENM test suite.
In cfg.cfg I have configured the two test ports where I would expect the messages to my SUT.:
*.utPort.TRI_mapper_address := "127.0.0.1"
*.utPort.TRI_mapper_port := "53043"
*.denmPort.TRI_mapper_address := "127.0.0.1"
*.denmPort.TRI_mapper_port := "53044"
When I start the test case ("cmtc" followed by "smtc") I was expecting to get the utInitialize primitive on the utPort (i.e. 0x01 followed by 8 Bytes 0x00).
But I'm getting a different message:
MTC@<myhost>: TRI_encode(): Encoding @TRI_interface_Types.TRI_mapper_PDU: { msg_id := 0, msg := { reg := { portid := { portName := "utPort", portTypeName := "<port type name>", component_ := { componentId := '00000001'O, componentName := "MTC", componentTypeName := "N/A" }, portindex := omit }, type_list := omit } } }
MTC@<myhost>: TRI_encode(): Stream after encoding: '7B226D73675F6964223A302C226D7367223A7B22726567223A7B22706F72746964223A7B22706F72744E616D65223A227574506F7274222C22706F7274547970654E616D65223A223C706F72742074797065206E616D653E222C22636F6D706F6E656E745F223A7B22636F6D706F6E656E744964223A223030303030303031222C22636F6D706F6E656E744E616D65223A224D5443222C22636F6D706F6E656E74547970654E616D65223A224E2F41227D7D7D7D7D'O ("{\"msg_id\":0,\"msg\":{\"reg\":{\"portid\":{\"portName\":\"utPort\",\"portTypeName\":\"<port type name>\",\"component_\":{\"componentId\":\"00000001\",\"componentName\":\"MTC\",\"componentTypeName\":\"N/A\"}}}}}")
What am I missing?
|
|
| | |
Re: No custom encoding function found [message #1737041 is a reply to message #1737029] |
Tue, 05 July 2016 05:18   |
Eclipse User |
|
|
|
Hi Christof,
I don't have the full description of the taproperties.cfg as this is part of the ETSI SA.
However, here's my take:
-first of all , the test system and the SUT are assumed to be on the same Ethernet segment, see
Intelligent Transport Systems (ITS);
Architecture of conformance validation framework
ETSI TR 103 099 V1.3.1 (2015-07)
5 Hardware equipment
The communication between the SUT and the test system is achieved through Ethernet if the SUT supports it or using a
G5 adaptation box, as shown in figure 2 and in figure 3.
-we should not forget that we are facing an ITS stack, not an IP stack, which is organized like
ETH/GN/BTP/CAM&DENM
Only the Upper tester runs on an IP stack ETH/IP/UDP/UT
This means that we can address the UT as IP:port, but not CAM or DENM; they will be addressed via Ethernet messages ; if the ITS stack will see a GN package, will send it to BTP, then BTP will sort
it based on port number (not IP port, mind you ) , see Well-known BTP port numbers in the standard:
2001 CAM
2002 DENM
2003 TOPO
2004 SPAT
2005 SAM
and so on.
So what you need to adjust in taproperties.cfg
{
"LinkLayer_NodeA": "BABEBABE0001",
"TsBeaconInterval": "1000",
"LinkLayer_NodeF": "BABEBABE0006",
"Gn6RemoteAdapterIp": "169.254.54.64",
"UtSecuredMode": "false",
"LinkLayer_NodeB": "BABEBABE0002",
"LinkLayer_NodeC": "BABEBABE0003",
"LinkLayer_NodeD": "BABEBABE0004",
"LinkLayer_NodeE": "BABEBABE0005",
"geoNetworkingPort": "ETH",
"mapSpatPort": "BTP/GN/ETH",
"TsSecuredRootPath": "data/certificates",
"TsLongitude": "0",
"TsLatitude": "0",
"UpperTesterSettings": "169.254.54.64:12345",
"IutEthernetTypeValue": "0x8947",
"LocalEthernetMAC": "705ab6a46f38",
"ipv6OverGeoNetworkingPort": "Debug",
"btpPort": "GN/ETH",
"TsSecuredConfiId": "vendorA",
"denmPort": "BTP/GN/ETH",
"TsSecuredMode": "false",
"Gn6RemoteAdapterPort": "42000",
"LinkLayer_MTC": "BABEBABE0000",
"camPort": "BTP/GN/ETH"
}
is "LocalEthernetMAC" and
"UpperTesterSettings": "x.y.z.w:abcd"
(You have to make sure your upper tester runs on the indicated IPaddress:portno; IP address can be of course 127.0.0.1 if the UT is installed on the same machine.
Addressing CAM/DENM etc. is done implicitly, by indicating their position in the stack:
and knowing they are on the same Ethernet.
I believe with TSLongitude and TSLatitude one can add a start position or offset (?) but that is the advanced part I must admit I'm not fully familiar with.
I hope this helps
Best regards
Elemer
|
|
| |
Re: No custom encoding function found [message #1737200 is a reply to message #1737046] |
Wed, 06 July 2016 08:06   |
Eclipse User |
|
|
|
Hi Elemer,
thank you for the useful hints.
I managed to get the UDP message for utInitilize to be sent to the right port.
When it comes to the point where the DENM message is to be sent I get the error:
"result := TRI_error (1), result_string := "Unknown port" ":
MTC@<myhost>: Sent on denmPort to system @LibItsDenm_TestSystem.DenmReq : { msgOut := { header := { protocolVersion := 1, messageID := 1, stationID := 111111 }, denm := { management := { actionID := { originatingStationID := 111111, sequenceNumber := 0 }, detectionTime := 110805050060, referenceTime := 110805050060, termination := omit, eventPosition := { latitude := 436175790, longitude := 70546480, positionConfidenceEllipse := { semiMajorConfidence := 1, semiMinorConfidence := 1, semiMajorOrientation := 0 }, altitude := { altitudeValue := 0, altitudeConfidence := alt_000_01 (0) } }, relevanceDistance := lessThan50m (0), relevanceTrafficDirection := allTrafficDirections (0), validityDuration := 600, transmissionInterval := omit, stationType := 3 }, situation := { informationQuality := 0, eventType := { causeCode := 91, subCauseCode := 0 }, linkedCause := omit, eventHistory := omit }, location := { eventSpeed := omit, eventPositionHeading := omit, traces := { { { pathPosition := { deltaLatitude := 0, deltaLongitude := 0, deltaAltitude := 0 }, pathDeltaTime := 0 } } }, roadType := omit }, alacarte := omit } } }
MTC@<myhost>: Encoded DENM PDU in BER: '3076A00B800101810101820301B207A167A042A008800301B207810100810519CC7EE2CC820519CC7EE2CCA41F800419FF83AE810404347430A209800101810101820100A306800100810100850100860100890103A10B800100A10680015B810100A214A2123010300EA009800100810100820100810100'O
MTC@<myhost>: BER2PER: DENM BER decoding successful.
MTC@<myhost>: Starting ASN1C PER encoding:
MTC@<myhost>: DENM PER encoding successful.
MTC@<myhost>: Encoded PDU in PER: '01010001B207C60000D903800003398FDC5980CE63F71664FA46CAE6F7E4630001001000186A0000180B600001BFFFEFFFFB19C00000'O
MTC@<myhost>: TRI_encode(): Encoding @TRI_interface_Types.TRI_mapper_PDU: { msg_id := 2, msg := { sendmsg := { addr := omit, data := { encoded_data := '01010001B207C60000D903800003398FDC5980CE63F71664FA46CAE6F7E4630001001000186A0000180B600001BFFFEFFFFB19C00000'O } } } }
MTC@<myhost>: TRI_encode(): Stream after encoding: '7B226D73675F6964223A322C226D7367223A7B2273656E646D7367223A7B2264617461223A7B22656E636F6465645F64617461223A22303130313030303142323037433630303030443930333830303030333339384644433539383043453633463731363634464134364341453646374534363330303031303031303030313836413030303031383042363030303031424646464546464646423139433030303030227D7D7D7D'O ("{\"msg_id\":2,\"msg\":{\"sendmsg\":{\"data\":{\"encoded_data\":\"01010001B207C60000D903800003398FDC5980CE63F71664FA46CAE6F7E4630001001000186A0000180B600001BFFFEFFFFB19C00000\"}}}}")
MTC@<myhost>: Start timer t: 10 s
MTC@<myhost>: TRI_decode(): Stream before decoding: '7B226D73675F6964223A322C226D7367223A7B22726573756C74223A7B22726573756C74223A225452495F6572726F72222C22726573756C745F737472696E67223A22556E6B6E6F776E20706F7274227D7D7D'O ("{\"msg_id\":2,\"msg\":{\"result\":{\"result\":\"TRI_error\",\"result_string\":\"Unknown port\"}}}")
MTC@<myhost>: TRI_decode(): Decoded @TRI_interface_Types.TRI_mapper_PDU: { msg_id := 2, msg := { result := { result := TRI_error (1), result_string := "Unknown port" } } }
MTC@<myhost>: Dynamic test case error: Unsucessfull send
Also I couldn't catch the expected ethernet message (Ethernet Type = 0x8947).
Any idea what I need to do to get the system adapter sending this message on ethernet?
Best Regards
Christof
|
|
| | | | | | | | | | | | |
Re: No custom encoding function found [message #1770394 is a reply to message #1770377] |
Thu, 10 August 2017 12:25  |
Eclipse User |
|
|
|
Hi Michal,
we are currently working on the latest version of the ETSI ITS code; the colleague who is engaged hands-on with the code can give you details next week.
there is an amount of adaptation needed but nothing significant; most of it comes from the necessity to use the ETSI test adapter (written in Java nonetheless!!!-we are discussing with ETSI the
possibility to rewrite them in C++, which would result in a more streamlined architecture). Adaptations concerning the TTCN-3 and ASN.1 code are marginal.
We intend to publish the code (the latest version of ETSI TTCN-3 code + Java adapters+ our TTCN-3 mods and C++/Java adaptations) during autumn, as we are still working on some details;
It will be functional except the PER-codec (which of course is critical) ; anyone willing to use it will have to add this.
We used OSS Nokalva's ASN.1 compiler and the PER codecs generated by it in the last ten+ years (in GSM/3G/3G projects, not ITS) and we can't have a complaint.
(BTW we can generate and test the PER codecs as we have OSS Nokalva license, but of course we cannot distribute it);
Best regards
Elemer
|
|
|
Goto Forum:
Current Time: Wed Jul 23 11:04:58 EDT 2025
Powered by FUDForum. Page generated in 0.35294 seconds
|