mirror of
https://github.com/apache/nuttx.git
synced 2026-08-01 20:28:58 +00:00
tools/nxstyle: Whitelist ROS 2 message type identifiers.
The ROS 2 C client API generates symbols via rosidl token-pasting macros. Each message type ends up with a name of the form <pkg>__msg__<Type>, and the bare type token (Int32, Float64, ...) appears in user code as an argument to ROSIDL_GET_MSG_TYPE_SUPPORT(). Neither form can be renamed without breaking the public API. Add the ROS 2 standard message package prefixes (std_msgs, geometry_msgs, sensor_msgs, nav_msgs, builtin_interfaces, rcl_interfaces) and the rosidl scalar type names (Int8/16/32/64, UInt8/16/32/64, Float32/64) to g_white_prefix so nxstyle does not flag the resulting mixed-case identifiers in apps that consume micro-ROS via apps/system/microros. Signed-off-by: Arjav Patel <arjav1528@gmail.com>
This commit is contained in:
parent
a23aaf45c2
commit
bc3a2596c8
1 changed files with 23 additions and 0 deletions
|
|
@ -227,6 +227,29 @@ static const char *g_white_prefix[] =
|
|||
"tClass", /* Ref: arch/tricore/src */
|
||||
"tCpu", /* Ref: arch/tricore/src */
|
||||
"tId", /* Ref: arch/tricore/src */
|
||||
|
||||
/* Ref: apps/system/microros, apps/examples/microros_*
|
||||
* ROS 2 standard message package names and rosidl scalar type names
|
||||
* are generated by upstream rosidl token-pasting macros and cannot
|
||||
* be renamed without breaking the ROS C client API.
|
||||
*/
|
||||
|
||||
"std_msgs", /* std_msgs__msg__Int32, ... */
|
||||
"geometry_msgs", /* geometry_msgs__msg__Twist, ... */
|
||||
"sensor_msgs", /* sensor_msgs__msg__Imu, ... */
|
||||
"nav_msgs", /* nav_msgs__msg__Odometry, ... */
|
||||
"builtin_interfaces", /* builtin_interfaces__msg__Time, ... */
|
||||
"rcl_interfaces", /* rcl_interfaces__msg__Log, ... */
|
||||
"Int8", /* ROSIDL_GET_MSG_TYPE_SUPPORT(_, _, Int8) */
|
||||
"Int16",
|
||||
"Int32",
|
||||
"Int64",
|
||||
"UInt8",
|
||||
"UInt16",
|
||||
"UInt32",
|
||||
"UInt64",
|
||||
"Float32",
|
||||
"Float64",
|
||||
NULL
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue