rcutils
is a C API consisting of macros, functions, and data structures used through out the ROS 2 code base.
Quality Declaration
This package claims to be in the Quality Level 2 category, see the Quality Declaration for more details.
API
The API is a combination of parts:
- Allocator concept, used to inject the allocating and deallocating methods into a function or type.
- Command line interface utilities:
- Utilities for setting error states (error message, file, and line number) like
strerror
for errno
:
- Some basic filesystem utilities like checking for path existence, getting the cwd, etc...:
- A C string find method:
- A convenient string formatting function, which takes a custom allocator:
- Functions for interfacing with process environment variables:
- Extensible logging macros:
- Some basic utilities to load, unload and get symbols from shared libraries at run-time.
- A string replacement function which takes an allocator, based on http://creativeandcritical.net/str-replace-c:
- String splitting functions which take a custom allocator:
- A version of
strdup
which takes an allocator:
- Portable implementations of "get system time" and "get steady time":
- Some useful data structures:
- Macros for controlling symbol visibility and linkage for this library: