Add an ORB topic that can be subscribed for notification of changes in the parameter set.

This commit is contained in:
px4dev
2012-08-20 21:17:50 -07:00
parent a043702af5
commit 503cb0ea03
3 changed files with 107 additions and 28 deletions
+2 -27
View File
@@ -48,36 +48,11 @@
#include <stdint.h>
#include <stdbool.h>
#include "drivers/drv_param.h"
/** Maximum size of the parameter backing file */
#define PARAM_FILE_MAXSIZE 4096
/**
* Parameter types.
*/
typedef enum param_type_e {
/* globally-known parameter types */
PARAM_TYPE_INT32 = 0,
PARAM_TYPE_FLOAT,
/* structure parameters; size is encoded in the type value */
PARAM_TYPE_STRUCT = 100,
PARAM_TYPE_STRUCT_MAX = 16384 + PARAM_TYPE_STRUCT,
PARAM_TYPE_UNKNOWN = 0xffff
} param_type_t;
/**
* Parameter handle.
*
* Parameters are represented by parameter handles, which can
* be obtained by looking up (or creating?) parameters.
*/
typedef uintptr_t param_t;
/**
* Handle returned when a parameter cannot be found.
*/
#define PARAM_INVALID ((uintptr_t)0xffffffff)
/**
* Look up a parameter by name.