Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ros serialization #449

Merged
merged 190 commits into from
Sep 22, 2021
Merged

Ros serialization #449

merged 190 commits into from
Sep 22, 2021

Conversation

Soroosh129
Copy link
Contributor

@Soroosh129 Soroosh129 commented Aug 1, 2021

This PR proposes the following changes:

  • Implements ROS serialization (and a modular serialization framework) for our C target federated runtime.
    Limitation: The port types need to be std::shared_ptr<**ROS2MessageType**> for the serialization to work correctly.

  • Fixes the _distribute.sh scripts.
    Limitation: Platform support for remote federates is currently only enabled for Linux.

  • Modifies the C runtime so that all reactor definitions, including their actions, ports, reactions, and preambles are only selectively generated if they belong to a given federate (previously, all reactor definitions were being generated for all federates, causing linking conflicts in some cases).

  • Adds a C++ mode to the CCmakeGenerator that will compile all generated .c files as if they were .cpp (needed for ROS 2 compatibility).

  • Adds support for multi-threaded compilation in the CGenerator for federated programs, where each federate is compiled (i.e., cmake is invoked for each federate) in a separate thread.

  • Fixes an issue where the file target property was not working correctly for federated programs.

  • Changes the behavior for treating imported reactors that are used as federates:

    • Preambles are now selectively generated for federates based on the preamble in the imported .lf file (previously all preambles in all imported federates' files were included for all federates).
    • If a cmake-include file is provided for an imported federate in the original .lf file, that file is used to extend the CMakeLists.txt for that federate, provided that no cmake-include is provided in the current .lf file. This is particularly useful to handle different dependencies that might interfere with each other for different federates.
  • Fixes issues with the combination of federated banks and multiports and decentralized coordination.

  • Fixes an issue where the trace table generation was not considering federates.

  • Changes the federated AST transformation so that the receiver action is now of a special target-specific type (as opposed to mimicking the original port type). This type is reported by getNetworkBufferType().

  • Moves FederateInstance.xtend to org.lflang.federated.

Soroosh129 added 30 commits July 6, 2021 11:56
…he C target) whether CMake is used to compile or not
…g an instance of their parent. Added copy functions
Copy link
Collaborator

@cmnrd cmnrd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Except for the C++ compilation issue (which I believe is solved by #513), this is good to go!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants