Create generic relationship between physical function and Node PC

Dear community,

I’m aware that to follow the Arcadia method, you allocate Physical Functions to Behavior PCs and deploy Behavior PCs to Node PCs. However, I would benefit from being able to indicate in a quick and dirty way which Node PCs are all involved in the execution of a certain higher level Physical Function without the need to go through all the modeling steps. Is there any option to generate a generic link (e.g., relates to) between such items which can also be followed through the P4C API?

It would help us to get to an overview quickly and do the detailed modeling later.

Regards,
Sebastiaan

When selecting a higher level physical function, you can right-click and select Wizard→Trace Manager. There you can create your own “Generic Traces” elements.

Hi Stephane,

Thanks, that’s indeed what I was looking for.
One follow-up question though: I’m trying to follow the generic trace using P4C, but I’m receiving the following error I don’t understand:

org.eclipse.ease.ScriptExecutionException: Traceback (most recent call last):

File “workspace://MINERVA scripts/createRDStags.py”, line 141, in

\# Check if we have a Java object

File “workspace://MINERVA scripts/createRDStags.py”, line 127, in followGenericTrace

File “workspace://Python4Capella/simplified_api/capella.py”, line 6357, in get_target

TypeError: ‘NoneType’ object is not callable

the code is as follows:

for trace in elem.get_contained_generic_traces():
        linkedItem = trace.get_target()
        print(linkedItem)

I further inserted some print statements in the get_target method to see what’s happening, which returns the following:

self: <_main_.GenericTrace object at 0x000002CF6CE9C790>

e_object_class: <class ‘_main_.EObject’>

value: org.polarsys.capella.core.data.cs.impl.PartImpl@62f4a77f (id: 62474d0a-c7ba-4938-9c3a-4183a55a078e, sid: null) (name: DF-SOL-01) (visibleInDoc: true, visibleInLM: true, summary: null, review: null) (isAbstract: false, isStatic: false, visibility: UNSET) (ordered: false, unique: false, minInclusive: false, maxInclusive: false, final: false, aggregationKind: UNSET, isDerived: false, isReadOnly: false, isPartOfKey: false)

specific_cls: None

Any idea what’s going on?

Thanks,
Sebastiaan

@YvanLussaud any idea?

Hi Sebastiaan,

The first error comes from a call on a None (Python) or null Java object. From the error message it’s a Python object. I think your Interaction is missing a Java Object calling get_java_object() should not return None… You probably need to check how this object is created or if its java object is removed at some point.

The Part EClass doesn’t have a corresponding Python API and EObject.get_class() returns the most generic Class EObject. From the part you can call the Java method getAbstractType() to get a component (in you case):

myPart.getAbstractType()