mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-25 23:43:34 +08:00
uorb autogeneration
This commit is contained in:
committed by
Lorenz Meier
parent
3aa2297497
commit
76387b1693
@@ -52,6 +52,7 @@
|
||||
struct orb_metadata {
|
||||
const char *o_name; /**< unique object name */
|
||||
const size_t o_size; /**< object size */
|
||||
const char *o_fields; /**< semicolon separated list of fields */
|
||||
};
|
||||
|
||||
typedef const struct orb_metadata *orb_id_t;
|
||||
@@ -110,11 +111,13 @@ enum ORB_PRIO {
|
||||
*
|
||||
* @param _name The name of the topic.
|
||||
* @param _struct The structure the topic provides.
|
||||
* @param _fields All fields in a semicolon separated list e.g: "float[3] position;bool armed"
|
||||
*/
|
||||
#define ORB_DEFINE(_name, _struct) \
|
||||
#define ORB_DEFINE(_name, _struct, _fields) \
|
||||
const struct orb_metadata __orb_##_name = { \
|
||||
#_name, \
|
||||
sizeof(_struct) \
|
||||
sizeof(_struct), \
|
||||
_fields \
|
||||
}; struct hack
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
Reference in New Issue
Block a user