|
| 1 | +// Copyright (c) 2023 by Apex.AI Inc. All rights reserved. |
| 2 | +// |
| 3 | +// Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +// you may not use this file except in compliance with the License. |
| 5 | +// You may obtain a copy of the License at |
| 6 | +// |
| 7 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +// |
| 9 | +// Unless required by applicable law or agreed to in writing, software |
| 10 | +// distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +// See the License for the specific language governing permissions and |
| 13 | +// limitations under the License. |
| 14 | + |
| 15 | +#include "rmw/impl/cpp/macros.hpp" |
| 16 | +#include "rmw/rmw.h" |
| 17 | + |
| 18 | +extern "C" |
| 19 | +{ |
| 20 | +rmw_ret_t |
| 21 | +rmw_take_dynamic_message( |
| 22 | + const rmw_subscription_t * subscription, |
| 23 | + rosidl_dynamic_typesupport_dynamic_data_t * dynamic_message, |
| 24 | + bool * taken, |
| 25 | + rmw_subscription_allocation_t * allocation) |
| 26 | +{ |
| 27 | + RCUTILS_CHECK_ARGUMENT_FOR_NULL(subscription, RMW_RET_ERROR); |
| 28 | + RCUTILS_CHECK_ARGUMENT_FOR_NULL(dynamic_message, RMW_RET_ERROR); |
| 29 | + RCUTILS_CHECK_ARGUMENT_FOR_NULL(taken, RMW_RET_ERROR); |
| 30 | + RCUTILS_CHECK_ARGUMENT_FOR_NULL(allocation, RMW_RET_ERROR); |
| 31 | + |
| 32 | + RMW_SET_ERROR_MSG("rmw_take_dynamic_message is not supported in iceoryx"); |
| 33 | + return RMW_RET_UNSUPPORTED; |
| 34 | +} |
| 35 | + |
| 36 | +rmw_ret_t |
| 37 | +rmw_take_dynamic_message_with_info( |
| 38 | + const rmw_subscription_t * subscription, |
| 39 | + rosidl_dynamic_typesupport_dynamic_data_t * dynamic_message, |
| 40 | + bool * taken, |
| 41 | + rmw_message_info_t * message_info, |
| 42 | + rmw_subscription_allocation_t * allocation) |
| 43 | +{ |
| 44 | + RCUTILS_CHECK_ARGUMENT_FOR_NULL(subscription, RMW_RET_ERROR); |
| 45 | + RCUTILS_CHECK_ARGUMENT_FOR_NULL(dynamic_message, RMW_RET_ERROR); |
| 46 | + RCUTILS_CHECK_ARGUMENT_FOR_NULL(taken, RMW_RET_ERROR); |
| 47 | + RCUTILS_CHECK_ARGUMENT_FOR_NULL(message_info, RMW_RET_ERROR); |
| 48 | + RCUTILS_CHECK_ARGUMENT_FOR_NULL(allocation, RMW_RET_ERROR); |
| 49 | + |
| 50 | + RMW_SET_ERROR_MSG("rmw_take_dynamic_message_with_info is not supported in iceoryx"); |
| 51 | + return RMW_RET_UNSUPPORTED; |
| 52 | +} |
| 53 | + |
| 54 | +rmw_ret_t |
| 55 | +rmw_serialization_support_init( |
| 56 | + const char * serialization_lib_name, |
| 57 | + rcutils_allocator_t * allocator, |
| 58 | + rosidl_dynamic_typesupport_serialization_support_t * serialization_support) |
| 59 | +{ |
| 60 | + RCUTILS_CHECK_ARGUMENT_FOR_NULL(serialization_lib_name, RMW_RET_ERROR); |
| 61 | + RCUTILS_CHECK_ARGUMENT_FOR_NULL(allocator, RMW_RET_ERROR); |
| 62 | + RCUTILS_CHECK_ARGUMENT_FOR_NULL(serialization_support, RMW_RET_ERROR); |
| 63 | + |
| 64 | + RMW_SET_ERROR_MSG("rmw_serialization_support_init is not supported in iceoryx"); |
| 65 | + return RMW_RET_UNSUPPORTED; |
| 66 | +} |
| 67 | +} // extern "C" |
0 commit comments