Support definitions for declaration of a C API of modules. More...
#include <string>
#include <vector>
#include <ros/message_traits.h>
#include <ros/serialization.h>
#include <cras_cpp_common/message_utils.hpp>
Go to the source code of this file.
Namespaces | |
cras | |
Typedefs | |
typedef void *(* | cras::allocator_t) (size_t) |
Allocator function that should allocate a buffer of the given size on the caller side and return a pointer to it. More... | |
Functions | |
uint8_t * | cras::outputByteBuffer (allocator_t allocator, const uint8_t *bytes, size_t length) |
Allocate enough bytes using the given allocator and copy the given bytes into the buffer. More... | |
uint8_t * | cras::outputByteBuffer (allocator_t allocator, const std::vector< uint8_t > &bytes) |
Allocate enough bytes using the given allocator and copy the given bytes into the buffer. More... | |
template<typename Message , typename Enable = ::std::enable_if_t<::ros::message_traits::IsMessage<Message>::value>> | |
uint8_t * | cras::outputRosMessage (allocator_t allocator, const Message &msg) |
Allocate enough bytes using the given allocator and serialize the given message into it. More... | |
char * | cras::outputString (allocator_t allocator, const char *string, size_t length) |
Allocate enough bytes using the given allocator and copy the given string into the buffer (including null termination byte). More... | |
char * | cras::outputString (allocator_t allocator, const std::string &string) |
Allocate enough bytes using the given allocator and copy the given string into the buffer (including null termination byte). More... | |
Support definitions for declaration of a C API of modules.
Definition in file c_api.h.