Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » 4DIAC - Framework for Distributed Industrial Automation and Control » How to integrate struct data type to 4DIAC IDE?(How to integrate struct data type to 4DIAC IDE?)
How to integrate struct data type to 4DIAC IDE? [message #1790247] Thu, 07 June 2018 11:48 Go to next message
Xu Chen is currently offline Xu ChenFriend
Messages: 6
Registered: June 2018
Junior Member
How to integrate struct data type to 4DIAC IDE?
--> I have already downloaded FORTE and I can find the definition of TestStruct, But how to integrate it to 4DIAC-IDE?
Re: How to integrate struct data type to 4DIAC IDE? [message #1790287 is a reply to message #1790247] Thu, 07 June 2018 20:13 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 635
Registered: January 2014
Senior Member
4diac-ide is currently only partly supporting user defined data types. That means you can not directly define structs in 4diac-ide or generate the code for it. As described in the development docs you need to implement your struct in cpp following the teststruct example. In order to get it into the ide you need to edit one FB's XML file and change a data in or output data type name to your struct's name. then 4diac-ide will parse this correctly and teh name can be used also in other FBs. However 4diac-ide will not understand the internals of the struct.
Re: How to integrate struct data type to 4DIAC IDE? [message #1790293 is a reply to message #1790287] Fri, 08 June 2018 04:45 Go to previous messageGo to next message
Xu Chen is currently offline Xu ChenFriend
Messages: 6
Registered: June 2018
Junior Member
Thanks for your reply. I created a task for my colleague to integrate the struct into 4DIAC-IDE. We want to add this feature to 4DIAC IDE by building it from source code. We follow the instructions from
http://fordiac.sourceforge.net/ehelp/html/development/installFromSource.html. But the Eclipse Modeling Tool reports problems.

Eclipse Modeling Tool: Neon
4DIAC IDE source :http://git.eclipse.org/c/4diac/org.eclipse.4diac.ide.git

BTW, where can I download the 4DIAC lib? I find the source from sourceforge, but no git repository.
index.php/fa/33043/0/
Re: How to integrate struct data type to 4DIAC IDE? [message #1790298 is a reply to message #1790293] Fri, 08 June 2018 07:14 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 635
Registered: January 2014
Senior Member
Having a better support for structs in the IDE would be great.

Thanks for pointing out your problems. With all the changes we performed for 1.9.0 we hadn't time to update all the documentation. There are a view things we should fix here:

1. Please always use the latest Eclipse Modeling tools (currently Oxygen.3a). Neon is already nearly 2 years old
2. Always use the target platform as described in the section "Set Target Platform"
3. With 1.9.0 we migrated the type-library into the ide repository. You can find it in the data directory

The link to the documentation you provided pointed to sourceforge. Where did you get that link? The latest version of the documentation is located at: https://www.eclipse.org/4diac/en_help.php, or in the help of Eclipse 4diac-ide. The source for the help is hosted in the git repo of 4diac-ide. you can find it in the org.eclipse.fordiac.ide plugin under html.
Re: How to integrate struct data type to 4DIAC IDE? [message #1790501 is a reply to message #1790298] Tue, 12 June 2018 02:11 Go to previous messageGo to next message
Xu Chen is currently offline Xu ChenFriend
Messages: 6
Registered: June 2018
Junior Member
Thanks for your help. I create a draft document for describing how to build & run 4DIAC-IDE from source. Please correct me if anything is wrong.
Re: How to integrate struct data type to 4DIAC IDE? [message #1790516 is a reply to message #1790501] Tue, 12 June 2018 09:09 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 635
Registered: January 2014
Senior Member
Hi thanks the update doc. I would have the following comments:
1. always use the latest Eclipse modeling tools (e..,g in 2 weeks Photon will be released)
2. always use the target platform, the target platform describes all dependencies of 4diac-ide and leads to a clean build environment. Although it requires to put the template and typelib at a different less easy to find place.

If you want to build own 4diac-ide binaries with your code I recommend to use the maven/tycho build environment. Just run a maven clean install on the pom.xml in the org.eclipse.fordiac.ide.master project. If you installed the maven tooling into your eclipse you can easily do this by right clicking on the pom.xml. Or you can also use it in build servers. See for example the official Eclipse 4diac Jenkins [1].

Would you be interested in providing your improvements to the docs as gerrit commits? In the documentation there is a section on how to contribute to FORTE by simple replacing the FORTE repo with the 4diac-ide repo the same procedure works.

Thanks in advance,
Alois

[1] https://ci.eclipse.org/4diac/
Re: How to integrate struct data type to 4DIAC IDE? [message #1790683 is a reply to message #1790516] Thu, 14 June 2018 12:38 Go to previous messageGo to next message
Xu Chen is currently offline Xu ChenFriend
Messages: 6
Registered: June 2018
Junior Member
I can upload the document to Gerrit after I complete it.
When I trying to export, I meet below errors.
index.php/fa/33113/0/
Re: How to integrate struct data type to 4DIAC IDE? [message #1790695 is a reply to message #1790683] Thu, 14 June 2018 15:38 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 635
Registered: January 2014
Senior Member
Great Thanks.

As I said above. I currently do not recomend the step export product but the tycho maven based build: Just run a maven clean install on the pom.xml in the org.eclipse.fordiac.ide.master project
Re: How to integrate struct data type to 4DIAC IDE? [message #1791478 is a reply to message #1790683] Sat, 30 June 2018 08:00 Go to previous messageGo to next message
Xu Chen is currently offline Xu ChenFriend
Messages: 6
Registered: June 2018
Junior Member
Update document for building fordiac IDE
Re: How to integrate struct data type to 4DIAC IDE? [message #1791587 is a reply to message #1791478] Mon, 02 July 2018 16:15 Go to previous message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 635
Registered: January 2014
Senior Member
There are two things I noticed afte quickly going through your update:
1 . when using the traget platform the typelib and template directory have to be put into a different location: "your workspace path"/.metadata/.plugins/org.eclipse.pde.core/.bundle_pool
2. I'm no maven expert but we always use mvn clean install in our CI server.
Previous Topic:[SOLVED] SUBSCRIBE_2 and PUBLISH_2 issue
Next Topic:RS232
Goto Forum:
  


Current Time: Sun Sep 23 18:44:23 GMT 2018

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

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

Back to the top