Integrate Applications with PHENOM & CinC: Difference between revisions

From PHENOM Portal Knowledgebase
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
This tutorial will walk a user through the compilation and execution of a CinC-based application.  It builds upon other tutorials in PHENOM.  As such, it uses the same principles as [[Integration Model to CinC Generation]], but the content is different.
This tutorial will walk a user through the compilation and execution of a CinC-based application.  It builds upon other tutorials in PHENOM.  As such, it uses the same principles as [[Integration Model to CinC Generation]], but the content is different.


{{Info|heading=Windows Subsystem for Linux | 1=This tutorial is written to use Windows Subsystem for Linux (WSL 2).}}
{{Info|heading=Windows Subsystem for Linux | 1=This tutorial is written to use Windows Subsystem for Linux (WSL 2) with a Ubuntu distribution.}}


==Preparing PHENOM==
==Preparing PHENOM==
Line 34: Line 34:
There is a prompt to '''Select your Mains and UoPs'''.  Since the project was setup to have both applications in a single executable, both UoPs are listed under a single main.  Ensure all three elements are selected, like this:
There is a prompt to '''Select your Mains and UoPs'''.  Since the project was setup to have both applications in a single executable, both UoPs are listed under a single main.  Ensure all three elements are selected, like this:


[[File:C:\Users\chris\Downloads\generate_cinc_select_mains_and_uops.png|thumb|none]]
[[File:generate_cinc_select_mains_and_uops.png|thumb|none]]


Next, select a license.  For this tutorial, you should choose '''Evaluation'''.
Next, select a license.  For this tutorial, you should choose '''Evaluation'''.
Line 52: Line 52:
hostAddressLoopback=true
hostAddressLoopback=true
</pre>
</pre>
Start your WSL instance, and ensure the proper packages are installed:
<pre>
apt install make
apt install g++
apt install cmake
</pre>
== Setup the Project ==
Unzip your CinC project in your user home (or other) directory.  This will create a subdirectory called <code>cinc-2.2.3</code>.
If unzip is not installed, run <code>sudo apt install unzip</code>.
== Install Pthread4W (Pthreads for Windows) ==

Revision as of 13:14, 16 January 2026

This tutorial will walk a user through the compilation and execution of a CinC-based application. It builds upon other tutorials in PHENOM. As such, it uses the same principles as Integration Model to CinC Generation, but the content is different.

Preparing PHENOM

In this tutorial, you will integrate two software applications. For the sake of simplicity, they will be integrated into a single executable. This will allow you to see the result of the integration by running a single file. This tutorial uses the Integration Model as shown in a previous tutorial.

Start by downloading this data model: File:Robot model with integration model.skayl

If you need help loading the project file, please view this tutorial: Creating a Project from an Existing Model.

Export a CinC Package

Log into PHENOM and click on the GENERATE icon in the vertical bar on the left-hand side of the screen.

Select the CINC tab.

Please make the following choices:

  • CinC Artifact CinC
  • CinC Version CinC 2.2.3 (note, other versions may work, this was tested with v2.2.3)
  • FACE Version 3.0
  • Language c++
  • Override namespaces? Not Selected
  • System Directory Test_System
  • Include CinC Source? Selected
  • Include Model files? Selected
  • Selection Type Mains and UoPs

There is a prompt to Select your Mains and UoPs. Since the project was setup to have both applications in a single executable, both UoPs are listed under a single main. Ensure all three elements are selected, like this:

Next, select a license. For this tutorial, you should choose Evaluation.

And finally, click GENERATE. PHENOM will start creating your source package and your browser will automatically download it once complete.

Prepare the Environment

In your Windows user folder (typically C:\Users\<username>), create (or edit) the .wslconfig file.

Make sure the file contains the following entries:

[wsl2]
networkingMode=mirrored

[experimental]
hostAddressLoopback=true

Start your WSL instance, and ensure the proper packages are installed:

apt install make
apt install g++
apt install cmake

Setup the Project

Unzip your CinC project in your user home (or other) directory. This will create a subdirectory called cinc-2.2.3.

If unzip is not installed, run sudo apt install unzip.


Install Pthread4W (Pthreads for Windows)