Updated rmw_* return codes (#246)
* Updated rmw_*_*_allocation return codes Signed-off-by: ahcorde <ahcorde@gmail.com> * Fixed return codes in rmw_* Signed-off-by: ahcorde <ahcorde@gmail.com> * Improved return error in rmw_wait Signed-off-by: ahcorde <ahcorde@gmail.com>
This commit is contained in:
parent
6bc75b4a49
commit
a197914d31
1 changed files with 7 additions and 6 deletions
|
@ -1907,14 +1907,14 @@ extern "C" rmw_ret_t rmw_init_publisher_allocation(
|
||||||
static_cast<void>(message_bounds);
|
static_cast<void>(message_bounds);
|
||||||
static_cast<void>(allocation);
|
static_cast<void>(allocation);
|
||||||
RMW_SET_ERROR_MSG("rmw_init_publisher_allocation: unimplemented");
|
RMW_SET_ERROR_MSG("rmw_init_publisher_allocation: unimplemented");
|
||||||
return RMW_RET_ERROR;
|
return RMW_RET_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" rmw_ret_t rmw_fini_publisher_allocation(rmw_publisher_allocation_t * allocation)
|
extern "C" rmw_ret_t rmw_fini_publisher_allocation(rmw_publisher_allocation_t * allocation)
|
||||||
{
|
{
|
||||||
static_cast<void>(allocation);
|
static_cast<void>(allocation);
|
||||||
RMW_SET_ERROR_MSG("rmw_fini_publisher_allocation: unimplemented");
|
RMW_SET_ERROR_MSG("rmw_fini_publisher_allocation: unimplemented");
|
||||||
return RMW_RET_ERROR;
|
return RMW_RET_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
static rmw_publisher_t * create_publisher(
|
static rmw_publisher_t * create_publisher(
|
||||||
|
@ -2280,14 +2280,14 @@ extern "C" rmw_ret_t rmw_init_subscription_allocation(
|
||||||
static_cast<void>(message_bounds);
|
static_cast<void>(message_bounds);
|
||||||
static_cast<void>(allocation);
|
static_cast<void>(allocation);
|
||||||
RMW_SET_ERROR_MSG("rmw_init_subscription_allocation: unimplemented");
|
RMW_SET_ERROR_MSG("rmw_init_subscription_allocation: unimplemented");
|
||||||
return RMW_RET_ERROR;
|
return RMW_RET_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" rmw_ret_t rmw_fini_subscription_allocation(rmw_subscription_allocation_t * allocation)
|
extern "C" rmw_ret_t rmw_fini_subscription_allocation(rmw_subscription_allocation_t * allocation)
|
||||||
{
|
{
|
||||||
static_cast<void>(allocation);
|
static_cast<void>(allocation);
|
||||||
RMW_SET_ERROR_MSG("rmw_fini_subscription_allocation: unimplemented");
|
RMW_SET_ERROR_MSG("rmw_fini_subscription_allocation: unimplemented");
|
||||||
return RMW_RET_ERROR;
|
return RMW_RET_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
static rmw_subscription_t * create_subscription(
|
static rmw_subscription_t * create_subscription(
|
||||||
|
@ -3051,7 +3051,7 @@ extern "C" rmw_ret_t rmw_trigger_guard_condition(
|
||||||
|
|
||||||
extern "C" rmw_wait_set_t * rmw_create_wait_set(rmw_context_t * context, size_t max_conditions)
|
extern "C" rmw_wait_set_t * rmw_create_wait_set(rmw_context_t * context, size_t max_conditions)
|
||||||
{
|
{
|
||||||
(void)context;
|
RMW_CHECK_ARGUMENT_FOR_NULL(context, nullptr);
|
||||||
(void)max_conditions;
|
(void)max_conditions;
|
||||||
rmw_wait_set_t * wait_set = rmw_wait_set_allocate();
|
rmw_wait_set_t * wait_set = rmw_wait_set_allocate();
|
||||||
CddsWaitset * ws = nullptr;
|
CddsWaitset * ws = nullptr;
|
||||||
|
@ -3262,7 +3262,8 @@ extern "C" rmw_ret_t rmw_wait(
|
||||||
rmw_services_t * srvs, rmw_clients_t * cls, rmw_events_t * evs,
|
rmw_services_t * srvs, rmw_clients_t * cls, rmw_events_t * evs,
|
||||||
rmw_wait_set_t * wait_set, const rmw_time_t * wait_timeout)
|
rmw_wait_set_t * wait_set, const rmw_time_t * wait_timeout)
|
||||||
{
|
{
|
||||||
RET_NULL(wait_set);
|
RET_NULL_X(wait_set, return RMW_RET_INVALID_ARGUMENT);
|
||||||
|
RET_WRONG_IMPLID(wait_set);
|
||||||
CddsWaitset * ws = static_cast<CddsWaitset *>(wait_set->data);
|
CddsWaitset * ws = static_cast<CddsWaitset *>(wait_set->data);
|
||||||
RET_NULL(ws);
|
RET_NULL(ws);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue