Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ extern "C"

typedef struct rosidl_action_type_support_t rosidl_action_type_support_t;

/// Contains rosidl action type support data.
/*
* Actions are build based on services(goal, result and cancel) and message (feedback and status).
*/
struct rosidl_action_type_support_t
{
const rosidl_service_type_support_t * goal_service_type_support;
Expand All @@ -36,6 +40,12 @@ struct rosidl_action_type_support_t
const rosidl_message_type_support_t * status_message_type_support;
};

/// Get the action type support given a provided action and package.
/*
* \param PkgName name of the package that contains the action
* \param Name action name
* \return a rosidl_action_type_support_t struct if found, otherwise NULL.
*/
#define ROSIDL_GET_ACTION_TYPE_SUPPORT(PkgName, Name) \
ROSIDL_TYPESUPPORT_INTERFACE__ACTION_SYMBOL_NAME( \
rosidl_typesupport_c, PkgName, action, Name)()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,50 @@ typedef struct rosidl_message_type_support_t rosidl_message_type_support_t;
typedef const rosidl_message_type_support_t * (* rosidl_message_typesupport_handle_function)(
const rosidl_message_type_support_t *, const char *);

/// Contains rosidl message type support data
struct rosidl_message_type_support_t
{
/// String identifier for the type_support.
const char * typesupport_identifier;
/// Pointer to type support handle function
const void * data;
rosidl_message_typesupport_handle_function func;
};

/// Get the message type support handle specific to this identifier.
/**
* The handle's message typesupport identifier function is returned or if the parameters are NULL
* then an assert will happen.
*
* \param handle Handle to message type support
* \param identifier The typesupport identifier to get the handle function for
* \return The associated message typesupport handle function.
*/
ROSIDL_GENERATOR_C_PUBLIC
const rosidl_message_type_support_t * get_message_typesupport_handle(
const rosidl_message_type_support_t * handle, const char * identifier);

// Get the message type support handle function specific to this identifier.
/**
* If the identifier is the same as this handle's typesupport_identifier the handle is simply
* returned or if the parameters are NULL then an assert will happen.
*
* \param handle Handle to message type support
* \param identifier The typesupport identifier to get the handle function for
* \return if the identifier match's the handle's identifier then the handle's function
* is returned.
*/
ROSIDL_GENERATOR_C_PUBLIC
const rosidl_message_type_support_t * get_message_typesupport_handle_function(
const rosidl_message_type_support_t * handle, const char * identifier);

/// Get the message type support given a provided action and package.
/*
* \param PkgName Name of the package that contains the message
* \param MsgSubfolder name of the subfolder (for example: msg)
* \param MsgName message name
* \return a rosidl_message_type_support_t struct if founded, otherwise NULL.
*/
#define ROSIDL_GET_MSG_TYPE_SUPPORT(PkgName, MsgSubfolder, MsgName) \
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( \
rosidl_typesupport_c, PkgName, MsgSubfolder, MsgName)()
Expand Down
28 changes: 28 additions & 0 deletions rosidl_runtime_c/include/rosidl_runtime_c/sequence_bound.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,47 @@ typedef const rosidl_runtime_c__Sequence__bound * (* rosidl_runtime_c__bound_han

struct rosidl_runtime_c__Sequence__bound
{
/// String identifier for the type_support.
const char * typesupport_identifier;
/// Pointer to type support handle function
const void * data;
rosidl_runtime_c__bound_handle_function func;
};

/// Get the message bounds handle specific to this identifier.
/**
* The handle's sequence bound is simply returned or if the parameters are NULL then an assert
* will happen.
*
* \param handle Handle to service type support
* \param identifier The identifier to get the handle for
* \return The associated sequence bound handle function.
*/
ROSIDL_GENERATOR_C_PUBLIC
const rosidl_runtime_c__Sequence__bound * get_sequence_bound_handle(
const rosidl_runtime_c__Sequence__bound * handle, const char * identifier);

/// Get the message bounds handle function specific to this identifier.
/**
* If the identifier is the same as this handle function's identifier the handle is simply returned
* or if the parameters are NULL then an assert will happen.
*
* \param handle Handle to service type support
* \param identifier The identifier to get the handle function for
* \return if the identifier match's the handle's identifier then the handle's function
* is returned.
*/
ROSIDL_GENERATOR_C_PUBLIC
const rosidl_runtime_c__Sequence__bound * get_sequence_bound_handle_function(
const rosidl_runtime_c__Sequence__bound * handle, const char * identifier);

/// Get the sequence bounds given a provided action and package.
/*
* \param PkgName Name of the package that contains the message
* \param MsgSubfolder name of the subfolder (foe example: msg)
* \param MsgName message name
* \return a rosidl_message_bounds_t struct if founded, otherwise NULL.
*/
#define ROSIDL_GET_SEQUENCE_BOUNDS(PkgName, MsgSubfolder, MsgName) \
ROSIDL_BOUNDS_INTERFACE__MESSAGE_SYMBOL_NAME( \
rosidl_typesupport_c, PkgName, MsgSubfolder, MsgName)()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,50 @@ typedef struct rosidl_service_type_support_t rosidl_service_type_support_t;
typedef const rosidl_service_type_support_t * (* rosidl_service_typesupport_handle_function)(
const rosidl_service_type_support_t *, const char *);

/// Contains rosidl service type support data
struct rosidl_service_type_support_t
{
/// String identifier for the type_support.
const char * typesupport_identifier;
/// Pointer to type support handle function
const void * data;
rosidl_service_typesupport_handle_function func;
};

/// Get the service type support handle specific to this identifier.
/**
* The handle's message typesupport identifier function is returned or if the parameters are NULL
* then an assert will happen.
*
* \param handle Handle to service type support
* \param identifier The typesupport identifier to get the handle function for
* \return The associated service typesupport handle function.
*/
ROSIDL_GENERATOR_C_PUBLIC
const rosidl_service_type_support_t * get_service_typesupport_handle(
const rosidl_service_type_support_t * handle, const char * identifier);

/// Get the service type support handle function specific to this identifier.
/**
* If the identifier is the same as this handle's typesupport_identifier the handle is simply
* returned or if the parameters are NULL then an assert will happen.
*
* \param handle Handle to service type support
* \param identifier The typesupport identifier to get the handle function for
* \return if the identifier match's the handle's identifier then the handle's function
* is returned.
*/
ROSIDL_GENERATOR_C_PUBLIC
const rosidl_service_type_support_t * get_service_typesupport_handle_function(
const rosidl_service_type_support_t * handle, const char * identifier);

/// Get the service type support given a provided action and package.
/*
* \param PkgName Name of the package that contains the service
* \param SrvSubfolder name of the subfolder (for example: srv)
* \param SrvName service name
* \return a rosidl_service_type_support_t struct if founded, otherwise NULL.
*/
#define ROSIDL_GET_SRV_TYPE_SUPPORT(PkgName, SrvSubfolder, SrvName) \
ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME( \
rosidl_typesupport_c, PkgName, SrvSubfolder, SrvName)()
Expand Down