commit a859bb6aa6460811b3c73ca26501fc2ee67becca Author: Christophe Bedard Date: Mon Jun 17 09:27:51 2019 +0200 Add basic package for launch integration diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..eef29c1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*~ +*.pyc + diff --git a/package.xml b/package.xml new file mode 100644 index 0000000..bbf1fb6 --- /dev/null +++ b/package.xml @@ -0,0 +1,22 @@ + + + + tracetools_launch + 0.0.1 + Launch integration for tracing + Christophe Bedard + TODO + Christophe Bedard + + launch + launch_ros + + ament_copyright + ament_flake8 + ament_pep257 + python3-pytest + + + ament_python + + diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..b7ef5cb --- /dev/null +++ b/setup.cfg @@ -0,0 +1,4 @@ +[develop] +script-dir=$base/lib/tracetools_launch +[install] +install-scripts=$base/lib/tracetools_launch diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..5480236 --- /dev/null +++ b/setup.py @@ -0,0 +1,23 @@ +from setuptools import find_packages +from setuptools import setup + +package_name = 'tracetools_launch' + +setup( + name=package_name, + version='0.0.1', + packages=find_packages(exclude=['test']), + data_files=[ + ('share/' + package_name, ['package.xml']), + ], + install_requires=['setuptools'], + maintainer='Christophe Bedard', + maintainer_email='fixed-term.christophe.bourquebedard@de.bosch.com', + author='Christophe Bedard', + author_email='fixed-term.christophe.bourquebedard@de.bosch.com', + # url='', + keywords=['ROS'], + description='Launch integration for tracing', + license='TODO', + tests_require=['pytest'], +) diff --git a/tracetools_launch/__init__.py b/tracetools_launch/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tracetools_launch/destroy.py b/tracetools_launch/destroy.py new file mode 100644 index 0000000..8b4a456 --- /dev/null +++ b/tracetools_launch/destroy.py @@ -0,0 +1,24 @@ + +from typing import List +from typing import Optional +from typing import Text + +from launch.action import Action +from launch_context import LaunchContext +from launch_description_entity import LaunchDescriptionEntity + + +class Destroy(Action): + """ + Action for launch that destroys a tracing session. + + It finalizes and destroys a tracing session that was setup with the Trace action. + """ + + def __init__(self, session_name: str, **kwargs) -> None: + """Constructor.""" + super().__init__(**kwargs) + self.__session_name = session_name + + def execute(self, context: LaunchContext) -> Optional[List[Action]]: + pass \ No newline at end of file diff --git a/tracetools_launch/trace.py b/tracetools_launch/trace.py new file mode 100644 index 0000000..5d847bd --- /dev/null +++ b/tracetools_launch/trace.py @@ -0,0 +1,29 @@ + +from typing import List +from typing import Optional +from typing import Text + +from launch.action import Action +from launch_context import LaunchContext +from launch_description_entity import LaunchDescriptionEntity + + +class Trace(Action): + """ + Tracing action for launch. + + Sets up and enables tracing through a launch file description. + """ + + def __init__(self, *, + session_name: str, + base_path: str, + events_ust: List[str], + events_kernel: List[str], + **kwargs) -> None: + """Constructor.""" + super().__init__(**kwargs) + + def execute(self, context: LaunchContext) -> Optional[List[Action]]: + # TODO + pass