Go to the source code of this file.
◆ rcutils_shared_library_t
Handle to a loaded shared library.
◆ rcutils_get_zero_initialized_shared_library()
Return an empty shared library struct.
◆ rcutils_load_shared_library()
Return shared library pointer.
- Parameters
-
[in,out] | lib | struct with the shared library pointer and shared library path name |
[in] | library_path | string with the path of the library |
[in] | allocator | to be used to allocate and deallocate memory |
- Returns
RCUTILS_RET_OK
if successful, or
-
RCUTILS_RET_BAD_ALLOC
if memory allocation fails, or
-
RCUTILS_RET_ERROR
if an unknown error occurs, or
-
RCUTILS_RET_INVALID_ARGUMENT
for invalid arguments
◆ rcutils_get_symbol()
Return shared library symbol pointer.
- Parameters
-
[in] | lib | struct with the shared library pointer and shared library path name |
[in] | symbol_name | name of the symbol inside the shared library |
- Returns
- shared library symbol pointer, if the symbol doesn't exist then returns NULL.
◆ rcutils_has_symbol()
Return true if the shared library contains a specific symbol name otherwise returns false.
- Parameters
-
[in] | lib | struct with the shared library pointer and shared library path name |
[in] | symbol_name | name of the symbol inside the shared library |
- Returns
- if symbols exists returns true, otherwise returns false.
◆ rcutils_unload_shared_library()
Unload the shared library.
- Parameters
-
- Returns
RCUTILS_RET_OK
if successful, or
-
RCUTILS_RET_INVALID_ARGUMENT
for invalid arguments, or
-
RCUTILS_RET_ERROR
if an unknown error occurs
◆ rcutils_is_shared_library_loaded()
Check if the library is loaded.
This function only determines if "unload" has been called on the current shared library handle. It could very well be that a second shared library handle is still open and therefore the library being loaded.
- Parameters
-
- Returns
- true if library is loaded, false otherwise
◆ rcutils_get_platform_library_name()
rcutils_ret_t rcutils_get_platform_library_name |
( |
const char * |
library_name, |
|
|
char * |
library_name_platform, |
|
|
unsigned int |
buffer_size, |
|
|
bool |
debug |
|
) |
| |
Get the library name for the compiled platform.
- Parameters
-
[in] | library_name | library base name (without prefix and extension) |
[out] | library_name_platform | library name for the compiled platform |
[in] | buffer_size | size of library_name_platform buffer |
[in] | debug | if true the library will return a debug library name, otherwise it returns a normal library path |
- Returns
RCUTILS_RET_OK
if successful, or
-
RCUTILS_RET_ERROR
if an unknown error occurs