bugCERTI - Bugs: bug #54104, How to use JCERTI API...

 
 

bug #54104: How to use JCERTI API createFederationExecution() and the URL parameter (fedFile).

Submitter:  janette cardoso <cardoso>
Submitted:  Tue 12 Jun 2018 04:19:58 PM UTC
   
 
Category:  CERTI Severity:  * 3 - Normal
Item Group:  Software error Status:  Fixed
Privacy:  Public Assigned to:  jb_ch
Open/Closed:  Open Release:  * GIT-master
Reproducibility:  None Fixed Release:  * Unknown
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 18 Jun 2018 09:58:49 AM UTC, comment #2: 

The CERTI FOM path issue has been migrated to a dedicated issue ticket #54141.

consider this one as fixed.

JbCh <jb_ch>
Group administrator
Thu 14 Jun 2018 12:04:55 PM UTC, comment #1: 

An updating concerning CERTI_FOM_PATH:
When using the test shipped with jcerti, the directory added to this must must have a "/" at the end of the address:
export CERTI_FOM_PATH=/XXX/XXX/:$CERTI_FOM_PATH
Then, it works for the federation with UAVSend-run and UAVReceive-run.

We still would like an answer about local/distributed issue.

janette cardoso <cardoso>
Group Member
Tue 12 Jun 2018 04:19:58 PM UTC, original submission:  

Hi CERTI Team,

We are working with the projet PTII - HLA/CERTI (co-simulation framework between Ptolemy and HLA/CERTI).

We have some issues when testing the framework in a distributed simulation when the 'rtig' is on a 'host1' and the Ptolemy Federates are on a 'host2'.

When we do a distributed simulation on the same host (rtig + federates) the second parameter used in the createFederationExecution() method (CertiRtiAmbassador.java from the JCERTI API) is an URL which contains the absolute local path of the FED (FOM) file. And everything is working as expected.

But with different hosts, we cannot pass this absolute local path. One would like to use the FED file name and the FED file deployed on $CERTI_HOST/share/federations/ or in directory referenced by CERTI_FOM_PATH on the 'host1' running the 'rtig'.
As for the moment, a workaround was proposed for PtII users in br_ptII_bug_53878.
It works fine for a federation using 2 computers. However, the environement variable CERTI_FOM_PATH is not taken into account for this implementation, and if 2 federations are launched one after the other, the 2nd federation has the error CouldNotOpenFED.

What is the form of the expected URL in the case two (or more) computers are used? As only the FED file name will return an malformed URL exception (in the master implementation).

Here the lines in CertiRtiAmbassador.java:
- master d2f82ad2 (2014 and since 2010) and also a47b br_bug_5387:
request.setFederationName(executionName);
 try {
            request.setFEDid(new File(fed.toURI()).getCanonicalPath());
        } catch (URISyntaxException ex) { (...)

- 24cafd br_ptII_bug_53878
request.setFederationName(executionName);
 try {
            request.setFEDid(new File(fed.toURI()).getName());
        } catch (URISyntaxException ex) { (...)

Thank your for your help.

janette cardoso <cardoso>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jb_ch (Updated the item)
  • -email is unavailable- added by cardoso (Submitted the item)
  •  

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-06-18 jb_ch StatusIn Progress Fixed
    2018-06-18 jb_ch CategoryJavaCERTI CERTI
        Item GroupNone Software error
        StatusNone In Progress
        Assigned toNone jb_ch
        Fixed ReleaseGIT-master Unknown

    Back to the top

    Powered by Savane 3.13-cf05.
    Corresponding source code