module: add a common module base class with usage printf methods

Provides:
- thread-safety for module start/stop
- some shared code for module start/stop. Should also be less prone to
  errors.
- constructor & destructors are called from within the new module thread
- can be used for work queue & thread modules
- strutured & formal way for module printf usage & module documentation

Limitation:
- supports only modules with one instance (eg. not mavlink)
This commit is contained in:
Beat Küng
2017-07-14 11:57:11 +02:00
parent b5275ecd52
commit 04c4339ca3
3 changed files with 609 additions and 0 deletions
+1
View File
@@ -41,6 +41,7 @@ set(depends
px4_add_module(
MODULE platforms__common
SRCS
module.cpp
px4_getopt.c
shutdown.cpp
DEPENDS