Firmware
Macros | Typedefs | Functions
px4_tasks.h File Reference
#include <stdbool.h>

Go to the source code of this file.

Macros

#define SCHED_PRIORITY_FAST_DRIVER   (SCHED_PRIORITY_MAX - 0)
 
#define SCHED_PRIORITY_ATTITUDE_CONTROL   (SCHED_PRIORITY_MAX - 4)
 
#define SCHED_PRIORITY_ACTUATOR_OUTPUTS   (SCHED_PRIORITY_MAX - 3)
 
#define SCHED_PRIORITY_POSITION_CONTROL   (SCHED_PRIORITY_MAX - 5)
 
#define SCHED_PRIORITY_ESTIMATOR   (SCHED_PRIORITY_MAX - 5)
 
#define SCHED_PRIORITY_SENSOR_HUB   (SCHED_PRIORITY_MAX - 6)
 
#define SCHED_PRIORITY_LOG_CAPTURE   (SCHED_PRIORITY_MAX - 10)
 
#define SCHED_PRIORITY_SLOW_DRIVER   (SCHED_PRIORITY_MAX - 35)
 
#define SCHED_PRIORITY_NAVIGATION   (SCHED_PRIORITY_DEFAULT + 5)
 
#define SCHED_PRIORITY_LOG_WRITER   (SCHED_PRIORITY_DEFAULT - 10)
 
#define SCHED_PRIORITY_PARAMS   (SCHED_PRIORITY_DEFAULT - 15)
 

Typedefs

typedef int(* px4_main_t) (int argc, char *argv[])
 

Functions

__BEGIN_DECLS __EXPORT void px4_systemreset (bool to_bootloader) noreturn_function
 Reboots the board (without waiting for clean shutdown). More...
 
__EXPORT px4_task_t px4_task_spawn_cmd (const char *name, int scheduler, int priority, int stack_size, px4_main_t entry, char *const argv[])
 Starts a task and performs any specific accounting, scheduler setup, etc. More...
 
__EXPORT int px4_task_delete (px4_task_t pid)
 Deletes a task - does not do resource cleanup.
 
__EXPORT int px4_task_kill (px4_task_t pid, int sig)
 Send a signal to a task.
 
__EXPORT void px4_task_exit (int ret)
 Exit current task with return value.
 
__EXPORT void px4_show_tasks (void)
 Show a list of running tasks.
 
__EXPORT bool px4_task_is_running (const char *taskname)
 See if a task is running.
 
__EXPORT const char * px4_get_taskname (void)
 return the name of the current task
 

Detailed Description

Author
Lorenz Meier loren.nosp@m.z@px.nosp@m.4.io
Mark Charlebois (2015) charl.nosp@m.ebm@.nosp@m.gmail.nosp@m..com

Preserve existing task API call signature with OS abstraction

Function Documentation

§ px4_systemreset()

__BEGIN_DECLS __EXPORT void px4_systemreset ( bool  to_bootloader)

Reboots the board (without waiting for clean shutdown).

Modules should use px4_shutdown_request() in most cases.

§ px4_task_spawn_cmd()

__EXPORT px4_task_t px4_task_spawn_cmd ( const char *  name,
int  scheduler,
int  priority,
int  stack_size,
px4_main_t  entry,
char *const  argv[] 
)

Starts a task and performs any specific accounting, scheduler setup, etc.