|
Firmware
|
DATAMANAGER driver. More...
#include <px4_config.h>#include <px4_defines.h>#include <px4_module.h>#include <px4_posix.h>#include <px4_tasks.h>#include <px4_getopt.h>#include <stdio.h>#include <stdbool.h>#include <stdlib.h>#include <errno.h>#include <fcntl.h>#include <systemlib/err.h>#include <queue.h>#include <string.h>#include <semaphore.h>#include <unistd.h>#include <drivers/drv_hrt.h>#include "dataman.h"#include <parameters/param.h>Classes | |
| struct | dm_operations_t |
| struct | work_q_item_t |
| Work task work item. More... | |
| struct | work_q_t |
Macros | |
| #define | DM_SECTOR_HDR_SIZE 4 /* data manager per item header overhead */ |
Typedefs | |
| typedef struct dm_operations_t | dm_operations_t |
Enumerations | |
| enum | dm_function_t { dm_write_func = 0, dm_read_func, dm_clear_func, dm_restart_func, dm_number_of_funcs } |
| Types of function calls supported by the worker task. | |
| enum | { BACKEND_NONE = 0, BACKEND_FILE, BACKEND_RAM, BACKEND_LAST } |
Functions | |
| __BEGIN_DECLS __EXPORT int | dataman_main (int argc, char *argv[]) |
| __EXPORT ssize_t | dm_write (dm_item_t item, unsigned index, dm_persitence_t persistence, const void *buf, size_t count) |
| Write to the data manager file. More... | |
| __EXPORT ssize_t | dm_read (dm_item_t item, unsigned index, void *buf, size_t count) |
| Retrieve from the data manager file. More... | |
| __EXPORT int | dm_clear (dm_item_t item) |
| Clear a data Item. More... | |
| __EXPORT int | dm_lock (dm_item_t item) |
| Lock all items of a type. More... | |
| __EXPORT int | dm_trylock (dm_item_t item) |
| Try to lock all items of a type (. More... | |
| __EXPORT void | dm_unlock (dm_item_t item) |
| Unlock a data Item. More... | |
| __EXPORT int | dm_restart (dm_reset_reason reason) |
| Tell the data manager about the type of the last reset. | |
Variables | |
| const size_t | k_work_item_allocation_chunk_size = 8 |
DATAMANAGER driver.
| __EXPORT int dm_clear | ( | dm_item_t | item | ) |
Clear a data Item.
Erase all items of this type.
| __EXPORT int dm_lock | ( | dm_item_t | item | ) |
Lock all items of a type.
Can be used for atomic updates of multiple items (single items are always updated atomically). Note that this lock is independent from dm_read & dm_write calls.
| __EXPORT ssize_t dm_read | ( | dm_item_t | item, |
| unsigned | index, | ||
| void * | buf, | ||
| size_t | count | ||
| ) |
Retrieve from the data manager file.
Retrieve from the data manager store.
| __EXPORT int dm_trylock | ( | dm_item_t | item | ) |
Try to lock all items of a type (.
| __EXPORT void dm_unlock | ( | dm_item_t | item | ) |
Unlock a data Item.
Unlock all items of a type.
| __EXPORT ssize_t dm_write | ( | dm_item_t | item, |
| unsigned | index, | ||
| dm_persitence_t | persistence, | ||
| const void * | buf, | ||
| size_t | count | ||
| ) |
Write to the data manager file.
write to the data manager store
1.8.12