uorb autogeneration

This commit is contained in:
Daniel Agar
2016-05-14 11:27:07 +02:00
committed by Lorenz Meier
parent 3aa2297497
commit 76387b1693
113 changed files with 897 additions and 593 deletions
+5 -2
View File
@@ -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