Is it possible to get the Components PORTS or/and Components EXHANGES from a Logical Component?
I have been looking at the functions available in the capella simplified api and been experimenting as follows but something might be wrong:
- I got a Logical Component inside the the variable wrap3
Pre=FULL_LC_REAL wrap3=EObject.get_class(Pre)(Pre)#Python Object print(wrap3) D=wrap3.get_realizing_behavior_p_cs() print(D)
I tried this function (get_realizing_behavior_p_cs) → Error:
- I tried the other available function in the simplified api but this has more to do with “capabilities” than actual exhanges:
D2=wrap3.get_involving_capability_realizations() print(D2) print(D2.size()) print(D2.get(0)) print(D2.get(0).get_java_object()) print(D2.get(0).get_java_object().getName())
This time, we have no error… contrary to the previous function:
→ Something might be wrong with the function: (get_realizing_behavior_p_cs)
- Moving on the functions available for LC_Pkgs:
C=LC_pkg.get_owned_component_exchange_categories() print(C) print(C.size()) #0 C2=LC_pkg.get_owned_physical_link_categories() print(C2) print(C2.size()) #0
I tried this with my 3 Logical Component packages (the one containing the Logical System, and the other containing the Logical Actors)
The result was always EMPLY lists.
- Moving on, now I went to the INTERPRETER:
I found out there was no method to get the component exchanges or component ports from a Logical Component?
All of these 5 trials gave 0 results, eventhough I was trying on a model that I knew for sure had Components ports on that specific LC I was testing, we got 3 outgoing logical component exchanges and 1 incoming:
Yes in the interpreter, nothing shows up with those 5 commandes.
I know I could use .eContents() and put the class of component exhanges as a parameter i guess, but that could prove SLOW in python 4 Capella.
I saw there was some classes defined for Component exchanges or Component Ports in the API but I can’t find any function to “GET” them, wether that’s from the component package(s) or from a logical component…
Any idea how to obtain the CE or C Ports? (Logical Analysis layer). Thanks