Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Titan » Error in function generation
Error in function generation [message #1792430] Tue, 17 July 2018 18:20 Go to next message
Vicente Leal is currently offline Vicente LealFriend
Messages: 8
Registered: July 2018
Junior Member
Hello everybody,

I am trying to port ITS-G5 Test Suite to Titan and I have some problem.

First problem is "Too many parameters: `1' was expected instead of `2'" at this lines:

EnrolmentRequestMessage ::= EtsiTs103097Data-SignedAndEncrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{enrolmentRequest PRESENT})})}
EnrolmentResponseMessage ::= EtsiTs103097Data-SignedAndEncrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{enrolmentResponse PRESENT})})}

Second problem I do not know how to fix because it is with the code generated.
The console shown the following errors:
g++ -c -DWIN32 -I. -I/home/Vicente-PCDell/titan.core/Install/include -I. -I../ccsrc/Asn1c -I../ccsrc/EncDec -I../ccsrc/Externals -I../ccsrc/Framework -I../ccsrc/Framework/src -I../ccsrc/Ports/LibIts_ports -I../ccsrc/Ports/LibIts_ports/BTP_ports -I../ccsrc/Ports/LibIts_ports/CAM_ports -I../ccsrc/Ports/LibIts_ports/DENM_ports -I../ccsrc/Ports/LibIts_ports/GN_ports -I../ccsrc/Ports/LibIts_ports/Http_ports -I../ccsrc/Ports/LibIts_ports/IPv6oGN_ports -I../ccsrc/Ports/LibIts_ports/IVIM_ports -I../ccsrc/Ports/LibIts_ports/MapemSpatem_ports -I../ccsrc/Ports/LibIts_ports/SremSsem_ports -I../ccsrc/Protocols/BTP -I../ccsrc/Protocols/CAM -I../ccsrc/Protocols/Commsignia -I../ccsrc/Protocols/DENM -I../ccsrc/Protocols/ETH -I../ccsrc/Protocols/GeoNetworking -I../ccsrc/Protocols/Http -I../ccsrc/Protocols/IVIM -I../ccsrc/Protocols/MapemSpatem -I../ccsrc/Protocols/Pcap -I../ccsrc/Protocols/RawSocket -I../ccsrc/Protocols/Security -I../ccsrc/Protocols/SremSsem -I../ccsrc/Protocols/Tcp -I../ccsrc/Protocols/UDP -I../ccsrc/Protocols/UpperTester -I../ccsrc/loggers -Wall -O2 -o ItsDenm_TpFunctions.o ItsDenm_TpFunctions.cc
In file included from LibItsBtp_TypesAndValues.hh:22:0,
from LibItsBtp_TestSystem.hh:22,
from LibItsBtp_Templates.hh:20,
from LibItsBtp_Functions.hh:20,
from ItsBtp_TestCases.hh:20,
from ItsBtp_TestControl.hh:20,
from ItsBtp_TestControl.cc:11:
LibItsBtp_EncdecDeclarations.hh:40:43: error: 'LibItsBtp__TypesAndValues' does not name a type
extern BITSTRING fx__enc__BtpPacket(const LibItsBtp__TypesAndValues::BtpPacket& p);
^~~~~~~~~~~~~~~~~~~~~~~~~
LibItsBtp_EncdecDeclarations.hh:40:79: error: expected unqualified-id before '&' token
extern BITSTRING fx__enc__BtpPacket(const LibItsBtp__TypesAndValues::BtpPacket& p);
^
LibItsBtp_EncdecDeclarations.hh:40:79: error: expected ')' before '&' token
LibItsBtp_EncdecDeclarations.hh:40:81: error: expected initializer before 'p'
extern BITSTRING fx__enc__BtpPacket(const LibItsBtp__TypesAndValues::BtpPacket& p);
^
LibItsBtp_EncdecDeclarations.hh:41:49: error: 'LibItsBtp__TypesAndValues' has not been declared
extern INTEGER fx__dec__BtpPacket(BITSTRING& b, LibItsBtp__TypesAndValues::BtpPacket& p);
^~~~~~~~~~~~~~~~~~~~~~~~~
LibItsBtp_EncdecDeclarations.hh:41:85: error: expected ',' or '...' before '&' token
extern INTEGER fx__dec__BtpPacket(BITSTRING& b, LibItsBtp__TypesAndValues::BtpPacket& p);
^
In file included from LibItsBtp_TypesAndValues.hh:22:0,
from LibItsBtp_TestSystem.hh:22,
from LibItsBtp_Templates.hh:20,
from LibItsBtp_Functions.hh:20,
from ItsBtp_TestCases.hh:20,
from ItsBtp_TestCases.cc:11:
LibItsBtp_EncdecDeclarations.hh:40:43: error: 'LibItsBtp__TypesAndValues' does not name a type
extern BITSTRING fx__enc__BtpPacket(const LibItsBtp__TypesAndValues::BtpPacket& p);
^~~~~~~~~~~~~~~~~~~~~~~~~
LibItsBtp_EncdecDeclarations.hh:40:79: error: expected unqualified-id before '&' token
extern BITSTRING fx__enc__BtpPacket(const LibItsBtp__TypesAndValues::BtpPacket& p);
^
LibItsBtp_EncdecDeclarations.hh:40:79: error: expected ')' before '&' token
LibItsBtp_EncdecDeclarations.hh:40:81: error: expected initializer before 'p'
extern BITSTRING fx__enc__BtpPacket(const LibItsBtp__TypesAndValues::BtpPacket& p);
^
LibItsBtp_EncdecDeclarations.hh:41:49: error: 'LibItsBtp__TypesAndValues' has not been declared
extern INTEGER fx__dec__BtpPacket(BITSTRING& b, LibItsBtp__TypesAndValues::BtpPacket& p);
^~~~~~~~~~~~~~~~~~~~~~~~~
LibItsBtp_EncdecDeclarations.hh:41:85: error: expected ',' or '...' before '&' token
extern INTEGER fx__dec__BtpPacket(BITSTRING& b, LibItsBtp__TypesAndValues::BtpPacket& p);


This problem is repeted around a lot of functions, and I am a little bit frustrated.

Attach the asn file for the fist problem.

Thanks and best regards,

Vicente Leal
Re: Error in function generation [message #1792440 is a reply to message #1792430] Wed, 18 July 2018 06:27 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 807
Registered: January 2015
Senior Member
Hi Vicente,

could you please attache the complete code for both problems?


A 'make archive' will create a zip file , that should do.


Best regards
Elemer
Re: Error in function generation [message #1792449 is a reply to message #1792440] Wed, 18 July 2018 08:00 Go to previous messageGo to next message
Gyorgy Rethy is currently offline Gyorgy RethyFriend
Messages: 23
Registered: April 2015
Junior Member
Hi Vincente,

Regarding the "Too many parameters: `1' was expected instead of `2'", could you please comment out the
(WITH COMPONENTS{..., content (WITH COMPONENTS{enrolmentRequest PRESENT})})
type constraints from each message type and tell us the result?
These constraints make different fields of EtsiTs102941Data's content field mandatory. As the corresponding TTCN-3 templates should use only "?" matching, but not the "*" and ifpresent, this change should not effect the test behaviour.

/Gyorgy
Re: Error in function generation [message #1792483 is a reply to message #1792440] Wed, 18 July 2018 14:07 Go to previous messageGo to next message
Vicente Leal is currently offline Vicente LealFriend
Messages: 8
Registered: July 2018
Junior Member
Hi,

I attach the complete code.
The first problem has been solved (I comment out the part of the line as Gyorgy had told me)

Thanks,
Vicente
Re: Error in function generation [message #1792526 is a reply to message #1792483] Thu, 19 July 2018 06:46 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 807
Registered: January 2015
Senior Member
Hi Vicente ,

the rar file appears corrupt.


Please do a 'make archive' and attach the result.

Best regards
Elemer
Re: Error in function generation [message #1792552 is a reply to message #1792526] Thu, 19 July 2018 12:56 Go to previous messageGo to next message
Vicente Leal is currently offline Vicente LealFriend
Messages: 8
Registered: July 2018
Junior Member
Hi,

I attach the project again.

Thanks,
Vicente
  • Attachment: ITS-G5.zip
    (Size: 768.01KB, Downloaded 10 times)
Re: Error in function generation [message #1792614 is a reply to message #1792552] Fri, 20 July 2018 09:03 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 807
Registered: January 2015
Senior Member
Hi Vicente,

this appears to be Yanns' stuff; my guess is that some of the handwritten files ( external functions ) have been written with a certain gcc version and a lower version does not work.


Yann, could you tell us what gcc /Titan etc. version you use?


One more thing: from the Makefile it appears that some Windows derivative environment is being used. This is not something we recommend;
Please use Linux, if not else, in the form of virtual machines or Linux subsystem for Windows.



BR
Elemer







Re: Error in function generation [message #1792635 is a reply to message #1792614] Fri, 20 July 2018 11:36 Go to previous messageGo to next message
Yann Garcia is currently offline Yann GarciaFriend
Messages: 63
Registered: June 2016
Member
Hello Vicente,

I'm Yann Garcia, I'm consultant at ETSI and I'm involve in ITS projects.

1) We use gcc/g++ version 7.3.0

2) I think you download the code from the ETSI STF 525 repository, am I correct? If so, there are two interesting folders to set up the environment:
- docker folder which contain a docker file to create a STF 525 container
- vagrant, to create a STF 525 virtual machine
In addition, please take a look to the README.md file in the main folder.

Please let me know if you need help, I'll be happy to help you.

Best regards,

Yann Garcia
Senior Software Engineer
Microsoft MCAD.net Certified
**************************************
FSCOM SARL
Le Montespan B2
6, Avenue des Alpes
F-06600 Antibes, FRANCE
************************************************
Tel: +33 (0)4 92 94 49 08
Mobile: +33 (0)7 61 00 77 05
Email: yann.garcia@fscom.fr
Skype: yann.garcia
Google+: garcia.yann@gmail.com

Re: Error in function generation [message #1792919 is a reply to message #1792635] Wed, 25 July 2018 18:46 Go to previous messageGo to next message
Vicente Leal is currently offline Vicente LealFriend
Messages: 8
Registered: July 2018
Junior Member
Thanks for your advices.

First, I have changed to Linux and everything is better.
I haved upgraded my c compiler to 7.3.0 version, but the problems don't disappear, so I have started a project with only one testcase (atsGeoNetworking) , and I have one question according to externals functions.
How can I achieve the following files: sha256.hh, sha384.hh, hmac.hh, security_ecc.hh, security_services.hh?
I have found some of them, but I need all of this for the security external functions.

Thanks for everything.

Vicente Leal
Re: Error in function generation [message #1792928 is a reply to message #1792919] Thu, 26 July 2018 05:23 Go to previous messageGo to next message
Yann Garcia is currently offline Yann GarciaFriend
Messages: 63
Registered: June 2016
Member
Hello Vicente,

These files are located in the folder ccsrc/Protocols/Security
Are you using Eclipse? If so, you need the whole ccsrc folder add you shall exclude the following TTCN-3 folders: LibIts/CALM, AtsIICP, AtsFNP, AtsFSAP, AtsDCC, AtsATSP, AtsIPv6OverGeoNetworking & AtsV2G.
If not, please take a look to the vagrant/provisioner.bash script to setupp your environment.

Please keep me inform of your progress ;)

BR,
Yann

Re: Error in function generation [message #1792971 is a reply to message #1792928] Thu, 26 July 2018 16:35 Go to previous messageGo to next message
Vicente Leal is currently offline Vicente LealFriend
Messages: 8
Registered: July 2018
Junior Member
Yes, I am using Eclipse haha and I am going to make a git, so I will post the link here when the project is running well more or less haha.

I am using the csrc folder partially because I want to create the files .cc and .hh with my compiler because at some parts, my eclipse shows errors.

And I have another problem according to find some files. Where are the following files: asn_application.h, asn_application.c and its dependencies such as asn_internal, asn_codecs, asn_data_bit.... ?


Thanks,
Vicente
Re: Error in function generation [message #1792987 is a reply to message #1792971] Fri, 27 July 2018 05:15 Go to previous messageGo to next message
Yann Garcia is currently offline Yann GarciaFriend
Messages: 63
Registered: June 2016
Member
Hello Vicente,

Okay, please send me your link when it will be ready.
You need also the tool asn1c for PER encoding (see README.md).

Do you schedule to test real ITS equipment? Which one?

Next week, I'll be back to my office at ETSI, we can do a conf-call by Skype to check your issues.

BR, Yann
Re: Error in function generation [message #1793216 is a reply to message #1792987] Wed, 01 August 2018 15:51 Go to previous message
Vicente Leal is currently offline Vicente LealFriend
Messages: 8
Registered: July 2018
Junior Member
Yes, the equipment are Cohda Wireless MK5, so I hope don't have any problem.

When it will be ready, I will post it.
Thanks for the offer, but now I think that I don't have a lot of problems., and I think that I can solve them.
Thanks,
Vicente

[Updated on: Wed, 01 August 2018 15:55]

Report message to a moderator

Previous Topic:A new set of JSON tools as external functions
Next Topic:IP Header for BER Message
Goto Forum:
  


Current Time: Wed Sep 19 08:59:20 GMT 2018

Powered by FUDForum. Page generated in 0.07727 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top