| <?xml version="1.0" encoding="UTF-8"?> |
| <xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:C_Cpp="http://www.eclipse.org/papyrus/C_Cpp/1" xmlns:SW_Concurrency="http://www.eclipse.org/papyrus/SW_Concurrency/1" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/SW_Concurrency/1 http://www.eclipse.org/papyrus/MARTE/1#//MARTE_DesignModel/SRM/SW_Concurrency"> |
| <uml:Model xmi:id="_T7frkG-0EeiX6ta975XXMg" name="ros2Library"> |
| <packageImport xmi:type="uml:PackageImport" xmi:id="_UBsaMG-0EeiX6ta975XXMg"> |
| <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/> |
| </packageImport> |
| <packageImport xmi:type="uml:PackageImport" xmi:id="_xLOK0K7nEemGAs1AuXY9aw"> |
| <importedPackage xmi:type="uml:Model" href="pathmap://ROBOTICS_LIBRARIES/robotics.library.uml#_LaOOAJcvEeeV0-Lu2yLOjA"/> |
| </packageImport> |
| <packagedElement xmi:type="uml:Package" xmi:id="_r1zz0HSPEeispf19VVdJXQ" name="rclcpp"> |
| <packagedElement xmi:type="uml:Class" xmi:id="_E8zZgG_GEeiX6ta975XXMg" name="Node"/> |
| <packagedElement xmi:type="uml:Class" xmi:id="_GhJhIG_GEeiX6ta975XXMg" name="Publisher"/> |
| <packagedElement xmi:type="uml:Class" xmi:id="_z3vp8HSPEeispf19VVdJXQ" name="Subscription"/> |
| <packagedElement xmi:type="uml:Class" xmi:id="_lz5w0HuXEeiEh8urkKbENw" name="Service"/> |
| <packagedElement xmi:type="uml:Class" xmi:id="_nWoSYHuYEein8bPYf9iOdw" name="Client"/> |
| <packagedElement xmi:type="uml:Package" xmi:id="_XqVRoIEgEemfpqUZp4ZD7w" name="timer"> |
| <packagedElement xmi:type="uml:Class" xmi:id="_Y2-D4IEgEemfpqUZp4ZD7w" name="TimerBase"/> |
| </packagedElement> |
| <packagedElement xmi:type="uml:Class" xmi:id="_TfeUAAmGEeq5a7o_53h8zA" name="NodeOptions"/> |
| <packagedElement xmi:type="uml:Class" xmi:id="_YxHScLkJEe2M0K0sOtK1fw" name="CallbackGroup"/> |
| </packagedElement> |
| <packagedElement xmi:type="uml:Package" xmi:id="_uUivMJdaEem38prD3RV14g" name="rclcpp_lifecycle"> |
| <packagedElement xmi:type="uml:Class" xmi:id="_HGPHMJdbEem38prD3RV14g" name="LifecycleNode"/> |
| <packagedElement xmi:type="uml:Class" xmi:id="_hpl8IP7MEemW86Fq7AkVug" name="LifecyclePublisher"/> |
| </packagedElement> |
| <packagedElement xmi:type="uml:Package" xmi:id="_G7mukPVgEemTJIu6MXTrdg" name="composites"> |
| <ownedComment xmi:type="uml:Comment" xmi:id="_G7mukfVgEemTJIu6MXTrdg" annotatedElement="_G7muk_VgEemTJIu6MXTrdg"> |
| <body>A thread service supporting the LifeCycle port. Once started, it calls the activate operation (via the required port rLC) of a connected component in a new thread of a specific priority (a configuration attribute). This C++ implementation is based on the POSIX pthread library. It will further assume that the execution is done with root privileges, since these are required to set the thread priority. The thread properties assume round-robin (SCHED_RR) scheduling. |
| </body> |
| </ownedComment> |
| <ownedComment xmi:type="uml:Comment" xmi:id="_G7mukvVgEemTJIu6MXTrdg"> |
| <body> Interceptor variant of thread (inherits all, only difference to Thread superclass: tagged as connector)</body> |
| </ownedComment> |
| <packagedElement xmi:type="uml:Class" xmi:id="_G7muk_VgEemTJIu6MXTrdg" name="Thread"> |
| <ownedComment xmi:type="uml:Comment" xmi:id="_G7mulPVgEemTJIu6MXTrdg" annotatedElement="_G7mulvVgEemTJIu6MXTrdg"> |
| <body>Priority of the thread. The interpretation of the value is OS specific. In case of POSIX; priorities are only taken into account for threads with a FIFO and round-robin scheduliung policy.</body> |
| </ownedComment> |
| <ownedAttribute xmi:type="uml:Port" xmi:id="_G7mulfVgEemTJIu6MXTrdg" name="rRun" aggregation="composite"/> |
| <ownedAttribute xmi:type="uml:Property" xmi:id="_G7mulvVgEemTJIu6MXTrdg" name="priority" visibility="public"> |
| <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/> |
| <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_G7mul_VgEemTJIu6MXTrdg" value="1"/> |
| <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_G7mumPVgEemTJIu6MXTrdg" value="1"/> |
| </ownedAttribute> |
| <interfaceRealization xmi:type="uml:InterfaceRealization" xmi:id="_G7mumfVgEemTJIu6MXTrdg" name="derived realization of ILifeCycle" client="_G7muk_VgEemTJIu6MXTrdg"> |
| <supplier xmi:type="uml:Interface" href="pathmap://DML_TRAFO/sysinterfaces.uml#_T3li0Dz6Ed-v9PxuTj6Elw"/> |
| <contract xmi:type="uml:Interface" href="pathmap://DML_TRAFO/sysinterfaces.uml#_T3li0Dz6Ed-v9PxuTj6Elw"/> |
| </interfaceRealization> |
| <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="_G7mumvVgEemTJIu6MXTrdg" name="staticAct" specification="_G7mupPVgEemTJIu6MXTrdg"> |
| <ownedParameter xmi:type="uml:Parameter" xmi:id="_G7mum_VgEemTJIu6MXTrdg" name="arg"> |
| <type xmi:type="uml:PrimitiveType" href="pathmap://PapyrusC_Cpp_LIBRARIES/AnsiCLibrary.uml#_8I6RgBydEduyofBvg4RL2w"/> |
| <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_G7munPVgEemTJIu6MXTrdg" value="1"/> |
| <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_G7munfVgEemTJIu6MXTrdg" value="1"/> |
| </ownedParameter> |
| <ownedParameter xmi:type="uml:Parameter" xmi:id="_G7munvVgEemTJIu6MXTrdg" name="ret" direction="return"> |
| <type xmi:type="uml:PrimitiveType" href="pathmap://PapyrusC_Cpp_LIBRARIES/AnsiCLibrary.uml#_8I6RgBydEduyofBvg4RL2w"/> |
| <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_G7mun_VgEemTJIu6MXTrdg" value="1"/> |
| <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_G7muoPVgEemTJIu6MXTrdg" value="1"/> |
| </ownedParameter> |
| <language>C/C++</language> |
| <body>((Thread*) arg)->rRun->run(); |
| return NULL; |
| </body> |
| </ownedBehavior> |
| <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="_G7muofVgEemTJIu6MXTrdg" name="activate" specification="_G7muqfVgEemTJIu6MXTrdg"> |
| <language>C/C++</language> |
| <body>// create thread |
| pthread_t pt; |
| pthread_create (&pt, NULL, staticAct, (void *) this); |
| |
| // set priority of thread |
| struct sched_param schedParam; |
| schedParam.sched_priority = priority; |
| pthread_setschedparam (pt, SCHED_RR, &schedParam); |
| // TODO: check return code (in particular, SCHED_RR only works for root) |
| </body> |
| </ownedBehavior> |
| <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="_G7muovVgEemTJIu6MXTrdg" name="configuration_complete" specification="_G7muq_VgEemTJIu6MXTrdg"> |
| <language>C/C++</language> |
| <body></body> |
| </ownedBehavior> |
| <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="_G7muo_VgEemTJIu6MXTrdg" name="deactivate" specification="_G7muqvVgEemTJIu6MXTrdg"> |
| <language>C/C++</language> |
| <body></body> |
| </ownedBehavior> |
| <ownedOperation xmi:type="uml:Operation" xmi:id="_G7mupPVgEemTJIu6MXTrdg" name="staticAct" isStatic="true" method="_G7mumvVgEemTJIu6MXTrdg"> |
| <ownedParameter xmi:type="uml:Parameter" xmi:id="_G7mupfVgEemTJIu6MXTrdg" name="arg"> |
| <type xmi:type="uml:PrimitiveType" href="pathmap://PapyrusC_Cpp_LIBRARIES/AnsiCLibrary.uml#_8I6RgBydEduyofBvg4RL2w"/> |
| <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_G7mupvVgEemTJIu6MXTrdg" value="1"/> |
| <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_G7mup_VgEemTJIu6MXTrdg" value="1"/> |
| </ownedParameter> |
| <ownedParameter xmi:type="uml:Parameter" xmi:id="_G7muqPVgEemTJIu6MXTrdg" name="ret" direction="return"> |
| <type xmi:type="uml:PrimitiveType" href="pathmap://PapyrusC_Cpp_LIBRARIES/AnsiCLibrary.uml#_8I6RgBydEduyofBvg4RL2w"/> |
| </ownedParameter> |
| </ownedOperation> |
| <ownedOperation xmi:type="uml:Operation" xmi:id="_G7muqfVgEemTJIu6MXTrdg" name="activate" method="_G7muofVgEemTJIu6MXTrdg"/> |
| <ownedOperation xmi:type="uml:Operation" xmi:id="_G7muqvVgEemTJIu6MXTrdg" name="deactivate" method="_G7muo_VgEemTJIu6MXTrdg"/> |
| <ownedOperation xmi:type="uml:Operation" xmi:id="_G7muq_VgEemTJIu6MXTrdg" name="configuration_complete" method="_G7muovVgEemTJIu6MXTrdg"/> |
| </packagedElement> |
| <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_oMdrQPVgEemTJIu6MXTrdg"> |
| <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_oMe5YPVgEemTJIu6MXTrdg" source="http://www.eclipse.org/uml2/2.0.0/UML"> |
| <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/MARTE/1#//MARTE_DesignModel/SRM"/> |
| </eAnnotations> |
| <appliedProfile xmi:type="uml:Profile" href="pathmap://Papyrus_PROFILES/MARTE.profile.uml#_3VS0wAPMEdyuUt-4qHuVvQ"/> |
| </profileApplication> |
| <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_oMgHgfVgEemTJIu6MXTrdg"> |
| <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_oMgukPVgEemTJIu6MXTrdg" source="http://www.eclipse.org/uml2/2.0.0/UML"> |
| <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/MARTE/1#//MARTE_DesignModel/SRM/SW_Concurrency"/> |
| </eAnnotations> |
| <appliedProfile xmi:type="uml:Profile" href="pathmap://Papyrus_PROFILES/MARTE.profile.uml#_A_vtYBJeEdy3Td9UhuLFPg"/> |
| </profileApplication> |
| </packagedElement> |
| <packagedElement xmi:type="uml:Package" xmi:id="_bcM2YGkzEeqVn9vWpzOeXg" name="stdlib"> |
| <packagedElement xmi:type="uml:PrimitiveType" xmi:id="_n9guwGkbEeqVn9vWpzOeXg" name="vector<std::string>"> |
| <templateBinding xmi:type="uml:TemplateBinding" xmi:id="_Qy1ZEGk1EeqVn9vWpzOeXg" signature="_JBTWcGk1EeqVn9vWpzOeXg"> |
| <parameterSubstitution xmi:type="uml:TemplateParameterSubstitution" xmi:id="_bo0EIGk1EeqVn9vWpzOeXg" actual="_IijsIHSQEeispf19VVdJXQ" formal="_bLdPMGk0EeqVn9vWpzOeXg"/> |
| </templateBinding> |
| </packagedElement> |
| <packagedElement xmi:type="uml:Class" xmi:id="_IijsIHSQEeispf19VVdJXQ" name="string"/> |
| <packagedElement xmi:type="uml:Class" xmi:id="_DTQ1kGk1EeqVn9vWpzOeXg" name="vector"> |
| <ownedTemplateSignature xmi:type="uml:RedefinableTemplateSignature" xmi:id="_JBTWcGk1EeqVn9vWpzOeXg" name="RedefinableTemplateSignature1" parameter="_bLdPMGk0EeqVn9vWpzOeXg"> |
| <ownedParameter xmi:type="uml:ClassifierTemplateParameter" xmi:id="_bLdPMGk0EeqVn9vWpzOeXg" parameteredElement="_e9BcUGk0EeqVn9vWpzOeXg"> |
| <ownedParameteredElement xmi:type="uml:Class" xmi:id="_e9BcUGk0EeqVn9vWpzOeXg" name="T" templateParameter="_bLdPMGk0EeqVn9vWpzOeXg"/> |
| </ownedParameter> |
| </ownedTemplateSignature> |
| </packagedElement> |
| </packagedElement> |
| <packagedElement xmi:type="uml:Package" xmi:id="_uklG8HNvEeqPZecp7_XFqQ" name="rclcpp_action"> |
| <ownedComment xmi:type="uml:Comment" xmi:id="_Pm54YHNwEeqPZecp7_XFqQ"> |
| <body>Action client and server are defined in their own namespace</body> |
| </ownedComment> |
| <packagedElement xmi:type="uml:Class" xmi:id="_uklG_3NvEeqPZecp7_XFqQ" name="Server"/> |
| <packagedElement xmi:type="uml:Class" xmi:id="_uklHAHNvEeqPZecp7_XFqQ" name="Client"/> |
| <packagedElement xmi:type="uml:Class" xmi:id="_vHAWkH_8EeqWy9TAoOxzCg" name="ClientGoalHandle"/> |
| <packagedElement xmi:type="uml:Class" xmi:id="_pJTIkIApEeqWy9TAoOxzCg" name="GoalUUID"/> |
| <packagedElement xmi:type="uml:Class" xmi:id="_IS0MsIGHEeqBWvhpPyY2CQ" name="GoalResponse"/> |
| <packagedElement xmi:type="uml:Class" xmi:id="_PD2boIGHEeqBWvhpPyY2CQ" name="CancelResponse"/> |
| </packagedElement> |
| <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_3nqkYG_FEeiX6ta975XXMg"> |
| <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_3nrygG_FEeiX6ta975XXMg" source="http://www.eclipse.org/uml2/2.0.0/UML"> |
| <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/C_Cpp/1#/"/> |
| </eAnnotations> |
| <appliedProfile xmi:type="uml:Profile" href="pathmap://PapyrusC_Cpp_PROFILES/C_Cpp.profile.uml#_j9REUByGEduN1bTiWJ0lyw"/> |
| </profileApplication> |
| <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_XkBn0K7fEemxGIY1-rj1kw"> |
| <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_XkDdAK7fEemxGIY1-rj1kw" source="http://www.eclipse.org/uml2/2.0.0/UML"> |
| <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/robotics/1#//commobject"/> |
| </eAnnotations> |
| <appliedProfile xmi:type="uml:Profile" href="pathmap://ROBOTICS_PROFILES/robotics.profile.uml#_bz5AcPCaEeee6ab5J_C5Dg"/> |
| </profileApplication> |
| <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_HiMM0K7oEemGAs1AuXY9aw"> |
| <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_HiOCAK7oEemGAs1AuXY9aw" source="http://www.eclipse.org/uml2/2.0.0/UML"> |
| <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/robotics/1#//services"/> |
| </eAnnotations> |
| <appliedProfile xmi:type="uml:Profile" href="pathmap://ROBOTICS_PROFILES/robotics.profile.uml#_SlbOAJe_EeeiCOWsEr9OuA"/> |
| </profileApplication> |
| </uml:Model> |
| <C_Cpp:ExternLibrary xmi:id="_xkRygHSPEeispf19VVdJXQ" base_package="_r1zz0HSPEeispf19VVdJXQ" prefix="rclcpp::"> |
| <includes>rclcpp/rclcpp.hpp</includes> |
| </C_Cpp:ExternLibrary> |
| <C_Cpp:ExternLibrary xmi:id="_6GsHkJdaEem38prD3RV14g" base_package="_uUivMJdaEem38prD3RV14g" prefix="rclcpp_lifecycle::"/> |
| <C_Cpp:External xmi:id="_LQzDIJdbEem38prD3RV14g" incPath="rclcpp_lifecycle/lifecycle_node.hpp" base_Classifier="_HGPHMJdbEem38prD3RV14g"/> |
| <C_Cpp:Include xmi:id="_-JQSsPVgEemTJIu6MXTrdg" body="#include <pthread.h>" base_class="_G7muk_VgEemTJIu6MXTrdg" base_Classifier="_G7muk_VgEemTJIu6MXTrdg"/> |
| <SW_Concurrency:SwSchedulableResource xmi:id="_nS96oPVkEemTJIu6MXTrdg" base_Classifier="_G7muk_VgEemTJIu6MXTrdg" priorityElements="_G7mulvVgEemTJIu6MXTrdg"/> |
| <C_Cpp:External xmi:id="_lOMrUP7MEemW86Fq7AkVug" incPath="rclcpp_lifecycle/lifecycle_node.hpp" base_Classifier="_hpl8IP7MEemW86Fq7AkVug"/> |
| <C_Cpp:External xmi:id="_vLWOcGkbEeqVn9vWpzOeXg" name="" incPath="vector" base_Classifier="_n9guwGkbEeqVn9vWpzOeXg"/> |
| <C_Cpp:ExternLibrary xmi:id="_lCNuYGkzEeqVn9vWpzOeXg" base_package="_bcM2YGkzEeqVn9vWpzOeXg" prefix="std::"/> |
| <C_Cpp:External xmi:id="_5JMqwGkzEeqVn9vWpzOeXg" name="" incPath="string" base_Classifier="_IijsIHSQEeispf19VVdJXQ"/> |
| <C_Cpp:External xmi:id="_Fb0dgGk1EeqVn9vWpzOeXg" name="" incPath="vector" base_Classifier="_DTQ1kGk1EeqVn9vWpzOeXg"/> |
| <C_Cpp:ExternLibrary xmi:id="_UUjTQHNwEeqPZecp7_XFqQ" base_package="_uklG8HNvEeqPZecp7_XFqQ" prefix="rclcpp_action::"> |
| <includes>rclcpp_action/rclcpp_action.hpp</includes> |
| </C_Cpp:ExternLibrary> |
| </xmi:XMI> |