mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
cleanup template for normal uorb headers
This commit is contained in:
parent
738f65a705
commit
5e9bef6f4b
@ -47,17 +47,14 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/* Auto-generated by genmsg_cpp from file @file_name_in */
|
||||
/* Auto-generated by genmsg_cpp from file @file_name_in */
|
||||
|
||||
@{
|
||||
import genmsg.msgs
|
||||
import gencpp
|
||||
|
||||
cpp_namespace = '::%s::'%(spec.package) # TODO handle nested namespace
|
||||
cpp_class = '%s_'%spec.short_name
|
||||
cpp_full_name = '%s%s'%(cpp_namespace,cpp_class)
|
||||
cpp_full_name_with_alloc = '%s<ContainerAllocator>'%(cpp_full_name)
|
||||
cpp_msg_definition = gencpp.escape_message_definition(msg_definition)
|
||||
uorb_struct = '%s_s'%spec.short_name
|
||||
topic_name = spec.short_name
|
||||
}@
|
||||
|
||||
#pragma once
|
||||
@ -137,11 +134,11 @@ def print_field_def(field):
|
||||
|
||||
}
|
||||
#ifdef __cplusplus
|
||||
@#class @(spec.short_name)_s {
|
||||
struct __EXPORT @(spec.short_name)_s {
|
||||
@#class @(uorb_struct) {
|
||||
struct __EXPORT @(uorb_struct) {
|
||||
@#public:
|
||||
#else
|
||||
struct @(spec.short_name)_s {
|
||||
struct @(uorb_struct) {
|
||||
#endif
|
||||
@{
|
||||
# loop over all fields and print the type and name
|
||||
@ -156,4 +153,4 @@ for field in spec.parsed_fields():
|
||||
*/
|
||||
|
||||
/* register this as object request broker structure */
|
||||
ORB_DECLARE(@(spec.short_name));
|
||||
ORB_DECLARE(@(topic_name));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user