Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
6 changes: 3 additions & 3 deletions built_packages
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ https://github.com/ament/googletest.git 79c4c9db1a7bc8bc5473a280499bf776173653d6
https://github.com/ament/ament_cmake.git d87b9776e0178f5a31d7e389990b5de6fc3067dd
https://github.com/ament/ament_lint.git 4bc68c815ce308b3443e3cb38fd71e2b03ffdc40
https://github.com/ros2/ament_cmake_ros.git 7b6b599c3fc8023806db2a97b344e8610902adac
https://github.com/micro-ROS/rmw-microxrcedds.git fd1570af6906e6323db2345aa6cd27709514a5af
https://github.com/micro-ROS/rmw-microxrcedds.git 30658350495ea891301e11c000f9e22d2ebea62a
https://github.com/micro-ROS/rcl ae6b2abc43f71ad9e7d1fce6da76d0e2cc88578a
https://github.com/micro-ROS/rosidl_typesupport_microxrcedds.git d41a3103458636d1e9df88508077d657d01d5ccb
https://github.com/micro-ROS/rosidl_typesupport.git 0e03d18809cb08215877ff856a916ec35a066561
https://github.com/micro-ROS/rcutils 500ee3fcb16bf6260453c75b50c3d7785d724443
https://github.com/micro-ROS/micro_ros_utilities c829971bd33ac1f14a94aa722476110b4b59eaf9
https://gitlab.com/micro-ROS/ros_tracing/ros2_tracing.git/ 07ae5aa5c456f887f2aa82896e207a3209309a50
https://github.com/ros2/rclc be7c43c0b0dfd7d5b9ba6026631196ad3a09d447
https://github.com/ros2/rclc b04e6ca8142ce1edf28d558998507bef5a203ae7
https://github.com/micro-ROS/micro_ros_msgs.git c8af6d4f246d1b324e6578ec967c8ddc1f4093d5
https://github.com/ros-controls/control_msgs 11fdcdf76434d8ca9047787d17add4e18f56e9d6
https://github.com/ros2/rcl_interfaces.git c5d0a20150533a6cb93d5dcbd6e27cea9300aa6e
Expand All @@ -31,4 +31,4 @@ https://github.com/ros2/rosidl.git dceaeb91f72a72e3867557690e2cc074e349230c
https://github.com/ros2/rmw.git f9f4ef46f8dd3ef938526a1140a3c57c155a259f
https://github.com/ros2/rosidl_defaults.git 6665e8848389f2c67d7c68ce7c53ca957ebcc97e
https://github.com/eProsima/Micro-CDR.git 21c99e0d8d140c50b45f13c8ed3716cb9fa0fb27
https://github.com/eProsima/Micro-XRCE-DDS-Client.git 2693d83bd9c37bd4615c38163b9078084fc79730
https://github.com/eProsima/Micro-XRCE-DDS-Client.git 4ccec07f4089ec1ec49e72c4ed0484ae6515cd75
Binary file modified src/cortex-m0plus/libmicroros.a
Binary file not shown.
Binary file modified src/cortex-m3/libmicroros.a
Binary file not shown.
Binary file modified src/cortex-m7/fpv5-d16-softfp/libmicroros.a
Binary file not shown.
Binary file modified src/cortex-m7/fpv5-sp-d16-softfp/libmicroros.a
Binary file not shown.
Binary file modified src/imxrt1062/fpv5-d16-hard/libmicroros.a
Binary file not shown.
Binary file modified src/mk20dx256/libmicroros.a
Binary file not shown.
Binary file modified src/mk64fx512/fpv4-sp-d16-hard/libmicroros.a
Binary file not shown.
2 changes: 1 addition & 1 deletion src/rclc/executor.h
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ rclc_executor_add_subscription(
rclc_executor_t * executor,
rcl_subscription_t * subscription,
void * msg,
rclc_callback_t callback,
rclc_subscription_callback_t callback,
rclc_executor_handle_invocation_t invocation);

/**
Expand Down
29 changes: 13 additions & 16 deletions src/rclc/executor_handle.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,17 @@ extern "C"
typedef enum
{
SUBSCRIPTION,
SUBSCRIPTION_WITH_CONTEXT,
TIMER,
// TIMER_WITH_CONTEXT, // TODO
CLIENT,
CLIENT_WITH_REQUEST_ID,
// CLIENT_WITH_CONTEXT, // TODO
SERVICE,
SERVICE_WITH_REQUEST_ID,
SERVICE_WITH_CONTEXT,
GUARD_CONDITION,
// GUARD_CONDITION_WITH_CONTEXT, //TODO
NONE
} rclc_executor_handle_type_t;

Expand All @@ -46,21 +53,13 @@ typedef enum
ALWAYS
} rclc_executor_handle_invocation_t;

typedef enum
{
CB_UNDEFINED,
CB_WITHOUT_REQUEST_ID,
CB_WITH_REQUEST_ID,
CB_WITH_CONTEXT,
} rclc_executor_handle_callback_type_t;


/// Type definition for callback function.
typedef void (* rclc_callback_t)(const void *);

/// Type definition for subscription callback function
/// - incoming message
// typedef void (* rclc_subscription_callback_t)(const void *);
typedef void (* rclc_subscription_callback_t)(const void *);

/// Type definition (duplicate) for subscription callback function (alias for foxy and galactic).
/// - incoming message
typedef rclc_subscription_callback_t rclc_callback_t;

/// Type definition for subscription callback function
/// - incoming message
Expand Down Expand Up @@ -137,7 +136,7 @@ typedef struct

/// Storage for callbacks
union {
rclc_callback_t callback;
rclc_subscription_callback_t subscription_callback;
rclc_subscription_callback_with_context_t subscription_callback_with_context;
rclc_service_callback_t service_callback;
rclc_service_callback_with_request_id_t service_callback_with_reqid;
Expand All @@ -159,8 +158,6 @@ typedef struct
/// Interval variable. Flag, which is true, if new data is available from DDS queue
/// (is set after calling rcl_take)
bool data_available;
/// callback type for service/client
rclc_executor_handle_callback_type_t callback_type;
} rclc_executor_handle_t;

/// Information about total number of subscriptions, guard_conditions, timers, subscription etc.
Expand Down
79 changes: 79 additions & 0 deletions src/rmw_microros/timing.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
// Copyright 2021 Proyectos y Sistemas de Mantenimiento SL (eProsima).
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

/**
* @file
*/

#ifndef RMW_MICROROS__TIMING_H_
#define RMW_MICROROS__TIMING_H_

#include <rmw/rmw.h>
#include <rmw/ret_types.h>
#include <rmw/init_options.h>
#include <rmw/error_handling.h>
#include <uxr/client/util/time.h>

#if defined(__cplusplus)
extern "C"
{
#endif // if defined(__cplusplus)

/** \addtogroup rmw micro-ROS RMW API
* @{
*/

/**
* \brief Sets the DDS-XRCE session spin time in reliable publication
*
* \param[in] publisher publisher where the spin time is configured
* \param[in] session_timeout time in milliseconds
* \return RMW_RET_OK when success.
* \return RMW_RET_INVALID_ARGUMENT If publisher is not valid or unexpected arguments.
*/
rmw_ret_t rmw_uros_set_publisher_session_timeout(
rmw_publisher_t * publisher,
int session_timeout);

/**
* \brief Sets the DDS-XRCE session spin time in reliable service server
*
* \param[in] service service where the spin time is configured
* \param[in] session_timeout time in milliseconds
* \return RMW_RET_OK when success.
* \return RMW_RET_INVALID_ARGUMENT If service is not valid or unexpected arguments.
*/
rmw_ret_t rmw_uros_set_service_session_timeout(
rmw_service_t * service,
int session_timeout);

/**
* \brief Sets the DDS-XRCE session spin time in reliable service client
*
* \param[in] client client where the spin time is configured
* \param[in] session_timeout time in milliseconds
* \return RMW_RET_OK when success.
* \return RMW_RET_INVALID_ARGUMENT If client is not valid or unexpected arguments.
*/
rmw_ret_t rmw_uros_set_client_session_timeout(
rmw_client_t * client,
int session_timeout);

/** @}*/

#if defined(__cplusplus)
}
#endif // if defined(__cplusplus)

#endif // RMW_MICROROS__TIMING_H_
4 changes: 3 additions & 1 deletion src/uxr/client/core/session/session.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ typedef void (* uxrOnReplyFunc) (
* @param session Session structure related to the buffer to be flushed.
*/
typedef bool (* uxrOnBuffersFull) (
struct uxrSession* session);
struct uxrSession* session,
void* args);

#ifdef PERFORMANCE_TESTING
/**
Expand All @@ -156,6 +157,7 @@ typedef void (* uxrOnPerformanceFunc) (
typedef struct uxrContinuousArgs
{
uxrOnBuffersFull flush_callback;
void* flush_callback_args;
uxrStreamId stream_id;
size_t data_size;
} uxrContinuousArgs;
Expand Down
16 changes: 9 additions & 7 deletions src/uxr/client/core/session/write_access.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,13 @@ UXRDLLAPI uint16_t uxr_prepare_output_stream(
* The submessage will be sent when `uxr_flash_output_stream` or `uxr_run_session` function are called.
* This function handles the buffer flush by means of `uxrOnBuffersFull` callback.
* As a result of the reception of this submessage, the Agent will write a topic into the DDS Global-Data-Space.
* @param session A uxrSession structure previously initialized.
* @param stream_id The output stream identifier where the WRITE_DATA submessage will be buffered.
* @param datawriter_id The identifier of the XRCE DataWriter that will write the topic into the DDS GDS.
* @param ub The ucdrBuffer structure used for serializing the topic.
* @param data_size The size of the topic in bytes.
* @param flush_callback Callback that is call by the library when user should flush output buffers.
* @param session A uxrSession structure previously initialized.
* @param stream_id The output stream identifier where the WRITE_DATA submessage will be buffered.
* @param datawriter_id The identifier of the XRCE DataWriter that will write the topic into the DDS GDS.
* @param ub The ucdrBuffer structure used for serializing the topic.
* @param data_size The size of the topic in bytes.
* @param flush_callback Callback that is call by the library when user should flush output buffers.
* @param flush_callback_args Arguments passed to flush callback.
* @return A `request_id` that identifies the XRCE request made by the Entity.
* This could be used in the `uxr_run_session_until_one_status` or `uxr_run_session_until_all_status` functions.
* */
Expand All @@ -132,7 +133,8 @@ UXRDLLAPI uint16_t uxr_prepare_output_stream_fragmented(
uxrObjectId datawriter_id,
ucdrBuffer* ub,
size_t data_size,
uxrOnBuffersFull flush_callback);
uxrOnBuffersFull flush_callback,
void* flush_callback_args);

/** @}*/

Expand Down