rmw  master
C API providing a middleware abstraction layer which is used to implement the rest of ROS.
Classes | Macros | Typedefs | Enumerations | Functions | Variables
types.h File Reference
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <rcutils/logging.h>
#include "rmw/init.h"
#include "rmw/init_options.h"
#include "rmw/ret_types.h"
#include "rmw/security_options.h"
#include "rmw/serialized_message.h"
#include "rmw/visibility_control.h"
Include dependency graph for types.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  rmw_node_t
 Structure which encapsulates an rmw node. More...
 
struct  rmw_publisher_options_t
 Options that can be used to configure the creation of a publisher in rmw. More...
 
struct  rmw_publisher_t
 Structure which encapsulates an rmw publisher. More...
 
struct  rmw_subscription_options_t
 Options that can be used to configure the creation of a subscription in rmw. More...
 
struct  rmw_subscription_t
 
struct  rmw_service_t
 A handle to an rmw service. More...
 
struct  rmw_client_t
 A handle to an rmw service client. More...
 
struct  rmw_guard_condition_t
 Handle for an rmw guard condition. More...
 
struct  rmw_publisher_allocation_t
 Allocation of memory for an rmw publisher. More...
 
struct  rmw_subscription_allocation_t
 Allocation of memory for an rmw subscription. More...
 
struct  rmw_subscriptions_t
 Array of subscriber handles. More...
 
struct  rmw_services_t
 Array of service handles. More...
 
struct  rmw_clients_t
 Array of client handles. More...
 
struct  rmw_events_t
 
struct  rmw_guard_conditions_t
 Array of guard condition handles. More...
 
struct  rmw_wait_set_t
 Container for guard conditions to be waited on. More...
 
struct  rmw_request_id_t
 An rmw service request identifier. More...
 
struct  rmw_time_t
 Struct representing a time point for rmw. More...
 
struct  rmw_service_info_t
 Meta-data for a service-related take. More...
 
struct  rmw_qos_profile_t
 ROS MiddleWare quality of service profile. More...
 
struct  rmw_gid_t
 ROS graph ID of the topic. More...
 
struct  rmw_message_info_t
 Information describing an rmw message. More...
 
struct  rmw_liveliness_changed_status_t
 QoS Liveliness Changed information provided by a subscription. More...
 
struct  rmw_requested_deadline_missed_status_t
 QoS Requested Deadline Missed information provided by a subscription. More...
 
struct  rmw_liveliness_lost_status_t
 QoS Liveliness Lost information provided by a publisher. More...
 
struct  rmw_offered_deadline_missed_status_t
 QoS Deadline Missed information provided by a publisher. More...
 

Macros

#define RMW_GID_STORAGE_SIZE   24u
 
#define RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_NODE_DEPRECATED_MSG
 
#define RMW_DECLARE_DEPRECATED(name, msg)   name __attribute__((deprecated(msg)))
 
#define RMW_QOS_DEADLINE_DEFAULT   {0, 0}
 QoS Deadline default, 0s indicates deadline policies are not tracked or enforced. More...
 
#define RMW_QOS_LIFESPAN_DEFAULT   {0, 0}
 QoS Lifespan default, 0s indicate lifespan policies are not tracked or enforced. More...
 
#define RMW_QOS_LIVELINESS_LEASE_DURATION_DEFAULT   {0, 0}
 QoS Liveliness lease duration default, 0s indicate lease durations are not tracked or enforced. More...
 

Typedefs

typedef struct RMW_PUBLIC_TYPE rmw_node_t rmw_node_t
 Structure which encapsulates an rmw node. More...
 
typedef enum RMW_PUBLIC_TYPE rmw_endpoint_type_t rmw_endpoint_type_t
 Endpoint enumeration type. More...
 
typedef struct RMW_PUBLIC_TYPE rmw_publisher_options_t rmw_publisher_options_t
 Options that can be used to configure the creation of a publisher in rmw. More...
 
typedef struct RMW_PUBLIC_TYPE rmw_publisher_t rmw_publisher_t
 Structure which encapsulates an rmw publisher. More...
 
typedef struct RMW_PUBLIC_TYPE rmw_subscription_options_t rmw_subscription_options_t
 Options that can be used to configure the creation of a subscription in rmw. More...
 
typedef struct RMW_PUBLIC_TYPE rmw_subscription_t rmw_subscription_t
 
typedef struct RMW_PUBLIC_TYPE rmw_service_t rmw_service_t
 A handle to an rmw service. More...
 
typedef struct RMW_PUBLIC_TYPE rmw_client_t rmw_client_t
 A handle to an rmw service client. More...
 
typedef struct RMW_PUBLIC_TYPE rmw_guard_condition_t rmw_guard_condition_t
 Handle for an rmw guard condition. More...
 
typedef struct RMW_PUBLIC_TYPE rmw_publisher_allocation_t rmw_publisher_allocation_t
 Allocation of memory for an rmw publisher. More...
 
typedef struct RMW_PUBLIC_TYPE rmw_subscription_allocation_t rmw_subscription_allocation_t
 Allocation of memory for an rmw subscription. More...
 
typedef struct RMW_PUBLIC_TYPE rmw_subscriptions_t rmw_subscriptions_t
 Array of subscriber handles. More...
 
typedef struct RMW_PUBLIC_TYPE rmw_services_t rmw_services_t
 Array of service handles. More...
 
typedef struct RMW_PUBLIC_TYPE rmw_clients_t rmw_clients_t
 Array of client handles. More...
 
typedef struct RMW_PUBLIC_TYPE rmw_events_t rmw_events_t
 
typedef struct RMW_PUBLIC_TYPE rmw_guard_conditions_t rmw_guard_conditions_t
 Array of guard condition handles. More...
 
typedef struct RMW_PUBLIC_TYPE rmw_wait_set_t rmw_wait_set_t
 Container for guard conditions to be waited on. More...
 
typedef struct RMW_PUBLIC_TYPE rmw_request_id_t rmw_request_id_t
 An rmw service request identifier. More...
 
typedef struct RMW_PUBLIC_TYPE rmw_time_t rmw_time_t
 Struct representing a time point for rmw. More...
 
typedef rcutils_time_point_value_t rmw_time_point_value_t
 
typedef struct RMW_PUBLIC_TYPE rmw_service_info_t rmw_service_info_t
 Meta-data for a service-related take. More...
 
typedef struct RMW_PUBLIC_TYPE rmw_qos_profile_t rmw_qos_profile_t
 ROS MiddleWare quality of service profile. More...
 
typedef struct RMW_PUBLIC_TYPE rmw_gid_t rmw_gid_t
 ROS graph ID of the topic. More...
 
typedef struct RMW_PUBLIC_TYPE rmw_message_info_t rmw_message_info_t
 Information describing an rmw message. More...
 
typedef enum RMW_PUBLIC_TYPE rmw_log_severity_t
 Type mapping of rcutils log severity types to rmw specific types. More...
 
typedef struct RMW_PUBLIC_TYPE rmw_liveliness_changed_status_t rmw_liveliness_changed_status_t
 QoS Liveliness Changed information provided by a subscription. More...
 
typedef struct RMW_PUBLIC_TYPE rmw_requested_deadline_missed_status_t rmw_requested_deadline_missed_status_t
 QoS Requested Deadline Missed information provided by a subscription. More...
 
typedef struct RMW_PUBLIC_TYPE rmw_liveliness_lost_status_t rmw_liveliness_lost_status_t
 QoS Liveliness Lost information provided by a publisher. More...
 
typedef struct RMW_PUBLIC_TYPE rmw_offered_deadline_missed_status_t rmw_offered_deadline_missed_status_t
 QoS Deadline Missed information provided by a publisher. More...
 

Enumerations

enum  { RMW_QOS_POLICY_DEPTH_SYSTEM_DEFAULT = 0 }
 
enum  RMW_PUBLIC_TYPE {
  RMW_LOG_SEVERITY_DEBUG = RCUTILS_LOG_SEVERITY_DEBUG, RMW_LOG_SEVERITY_INFO = RCUTILS_LOG_SEVERITY_INFO, RMW_LOG_SEVERITY_WARN = RCUTILS_LOG_SEVERITY_WARN, RMW_LOG_SEVERITY_ERROR = RCUTILS_LOG_SEVERITY_ERROR,
  RMW_LOG_SEVERITY_FATAL = RCUTILS_LOG_SEVERITY_FATAL
}
 Type mapping of rcutils log severity types to rmw specific types. More...
 

Functions

 RMW_DECLARE_DEPRECATED (RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_NODE, RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_NODE_DEPRECATED_MSG)
 
rmw_message_info_t rmw_get_zero_initialized_message_info (void)
 Get zero initialized mesage info. More...
 

Variables

 RMW_ENDPOINT_INVALID = 0
 Endpoint type has not yet been set. More...
 
 RMW_ENDPOINT_PUBLISHER
 Creates and publishes messages to the ROS topic. More...
 
enum RMW_PUBLIC_TYPE rmw_qos_reliability_policy_t
 
 RMW_QOS_POLICY_RELIABILITY_SYSTEM_DEFAULT
 Implementation specific default. More...
 
 RMW_QOS_POLICY_RELIABILITY_RELIABLE
 Guarantee that samples are delivered, may retry multiple times. More...
 
 RMW_QOS_POLICY_RELIABILITY_BEST_EFFORT
 Attempt to deliver samples, but some may be lost if the network is not robust. More...
 
enum RMW_PUBLIC_TYPE rmw_qos_history_policy_t
 QoS history enumerations describing how samples endure. More...
 
 RMW_QOS_POLICY_HISTORY_SYSTEM_DEFAULT
 Implementation default for history policy. More...
 
 RMW_QOS_POLICY_HISTORY_KEEP_LAST
 Only store up to a maximum number of samples, dropping oldest once max is exceeded. More...
 
 RMW_QOS_POLICY_HISTORY_KEEP_ALL
 Store all samples, subject to resource limits. More...
 
enum RMW_PUBLIC_TYPE rmw_qos_durability_policy_t
 QoS durability enumerations describing how samples persist. More...
 
 RMW_QOS_POLICY_DURABILITY_SYSTEM_DEFAULT
 Impplementation specific default. More...
 
 RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL
 The rmw publisher is responsible for persisting samples for “late-joining” subscribers. More...
 
 RMW_QOS_POLICY_DURABILITY_VOLATILE
 Samples are not persistent. More...
 
enum RMW_PUBLIC_TYPE rmw_qos_liveliness_policy_t
 
 RMW_QOS_POLICY_LIVELINESS_SYSTEM_DEFAULT = 0
 Implementation specific default. More...
 
 RMW_QOS_POLICY_LIVELINESS_AUTOMATIC = 1
 The signal that establishes a Topic is alive comes from the ROS rmw layer. More...
 
 RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_TOPIC = 3
 

Macro Definition Documentation

◆ RMW_GID_STORAGE_SIZE

#define RMW_GID_STORAGE_SIZE   24u

◆ RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_NODE_DEPRECATED_MSG

#define RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_NODE_DEPRECATED_MSG
Value:
"RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_NODE is deprecated. " \
"Use RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_TOPIC if manually asserted liveliness is needed."

◆ RMW_DECLARE_DEPRECATED

#define RMW_DECLARE_DEPRECATED (   name,
  msg 
)    name __attribute__((deprecated(msg)))

◆ RMW_QOS_DEADLINE_DEFAULT

#define RMW_QOS_DEADLINE_DEFAULT   {0, 0}

QoS Deadline default, 0s indicates deadline policies are not tracked or enforced.

◆ RMW_QOS_LIFESPAN_DEFAULT

#define RMW_QOS_LIFESPAN_DEFAULT   {0, 0}

QoS Lifespan default, 0s indicate lifespan policies are not tracked or enforced.

◆ RMW_QOS_LIVELINESS_LEASE_DURATION_DEFAULT

#define RMW_QOS_LIVELINESS_LEASE_DURATION_DEFAULT   {0, 0}

QoS Liveliness lease duration default, 0s indicate lease durations are not tracked or enforced.

Typedef Documentation

◆ rmw_node_t

Structure which encapsulates an rmw node.

◆ rmw_endpoint_type_t

Endpoint enumeration type.

◆ rmw_publisher_options_t

Options that can be used to configure the creation of a publisher in rmw.

◆ rmw_publisher_t

Structure which encapsulates an rmw publisher.

◆ rmw_subscription_options_t

Options that can be used to configure the creation of a subscription in rmw.

◆ rmw_subscription_t

◆ rmw_service_t

A handle to an rmw service.

◆ rmw_client_t

A handle to an rmw service client.

◆ rmw_guard_condition_t

Handle for an rmw guard condition.

◆ rmw_publisher_allocation_t

Allocation of memory for an rmw publisher.

◆ rmw_subscription_allocation_t

Allocation of memory for an rmw subscription.

◆ rmw_subscriptions_t

Array of subscriber handles.

An array of void * pointers representing type-erased middleware-specific subscriptions. The number of non-null entries may be smaller than the allocated size of the array. The number of subscriptions represented may be smaller than the allocated size of the array. The creator of this struct is responsible for allocating and deallocating the array.

◆ rmw_services_t

Array of service handles.

An array of void * pointers representing type-erased middleware-specific services. The number of non-null entries may be smaller than the allocated size of the array. The number of services represented may be smaller than the allocated size of the array. The creator of this struct is responsible for allocating and deallocating the array.

◆ rmw_clients_t

Array of client handles.

An array of void * pointers representing type-erased middleware-specific clients. The number of non-null entries may be smaller than the allocated size of the array. The number of clients represented may be smaller than the allocated size of the array. The creator of this struct is responsible for allocating and deallocating the array.

◆ rmw_events_t

◆ rmw_guard_conditions_t

Array of guard condition handles.

An array of void * pointers representing type-erased middleware-specific guard conditions. The number of non-null entries may be smaller than the allocated size of the array. The number of guard conditions represented may be smaller than the allocated size of the array. The creator of this struct is responsible for allocating and deallocating the array.

◆ rmw_wait_set_t

Container for guard conditions to be waited on.

◆ rmw_request_id_t

An rmw service request identifier.

◆ rmw_time_t

Struct representing a time point for rmw.

◆ rmw_time_point_value_t

◆ rmw_service_info_t

Meta-data for a service-related take.

◆ rmw_qos_profile_t

ROS MiddleWare quality of service profile.

◆ rmw_gid_t

ROS graph ID of the topic.

◆ rmw_message_info_t

Information describing an rmw message.

◆ rmw_log_severity_t

Type mapping of rcutils log severity types to rmw specific types.

◆ rmw_liveliness_changed_status_t

QoS Liveliness Changed information provided by a subscription.

◆ rmw_requested_deadline_missed_status_t

QoS Requested Deadline Missed information provided by a subscription.

◆ rmw_liveliness_lost_status_t

QoS Liveliness Lost information provided by a publisher.

◆ rmw_offered_deadline_missed_status_t

QoS Deadline Missed information provided by a publisher.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Default size of the rmw queue when history is set to RMW_QOS_POLICY_HISTORY_KEEP_LAST, 0 indicates it is currently not set

Enumerator
RMW_QOS_POLICY_DEPTH_SYSTEM_DEFAULT 

◆ RMW_PUBLIC_TYPE

Type mapping of rcutils log severity types to rmw specific types.

Enumerator
RMW_LOG_SEVERITY_DEBUG 

Debug log severity, for pedantic messaging.

RMW_LOG_SEVERITY_INFO 

Informational log severity, for reporting expected but not overwhelming information.

RMW_LOG_SEVERITY_WARN 

Warning log severity, for reporting recoverable issues.

RMW_LOG_SEVERITY_ERROR 

Error log severity, for reporting uncoverable issues.

RMW_LOG_SEVERITY_FATAL 

Fatal log severity, for reporting issue causing imminent shutdown.

Function Documentation

◆ RMW_DECLARE_DEPRECATED()

rmw_qos_liveliness_policy_t::RMW_DECLARE_DEPRECATED ( RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_NODE  ,
RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_NODE_DEPRECATED_MSG   
)

Explicitly asserting node liveliness is required in this case. This option is deprecated, use RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_TOPIC if your application requires to assert liveliness manually.

◆ rmw_get_zero_initialized_message_info()

rmw_message_info_t rmw_get_zero_initialized_message_info ( void  )

Get zero initialized mesage info.

Variable Documentation

◆ RMW_ENDPOINT_INVALID

RMW_ENDPOINT_INVALID = 0

Endpoint type has not yet been set.

◆ RMW_ENDPOINT_PUBLISHER

RMW_ENDPOINT_PUBLISHER

Creates and publishes messages to the ROS topic.

◆ rmw_qos_reliability_policy_t

enum RMW_PUBLIC_TYPE rmw_qos_reliability_policy_t

◆ RMW_QOS_POLICY_RELIABILITY_SYSTEM_DEFAULT

RMW_QOS_POLICY_RELIABILITY_SYSTEM_DEFAULT

Implementation specific default.

◆ RMW_QOS_POLICY_RELIABILITY_RELIABLE

RMW_QOS_POLICY_RELIABILITY_RELIABLE

Guarantee that samples are delivered, may retry multiple times.

◆ RMW_QOS_POLICY_RELIABILITY_BEST_EFFORT

RMW_QOS_POLICY_RELIABILITY_BEST_EFFORT

Attempt to deliver samples, but some may be lost if the network is not robust.

◆ rmw_qos_history_policy_t

enum RMW_PUBLIC_TYPE rmw_qos_history_policy_t

QoS history enumerations describing how samples endure.

◆ RMW_QOS_POLICY_HISTORY_SYSTEM_DEFAULT

RMW_QOS_POLICY_HISTORY_SYSTEM_DEFAULT

Implementation default for history policy.

◆ RMW_QOS_POLICY_HISTORY_KEEP_LAST

RMW_QOS_POLICY_HISTORY_KEEP_LAST

Only store up to a maximum number of samples, dropping oldest once max is exceeded.

◆ RMW_QOS_POLICY_HISTORY_KEEP_ALL

RMW_QOS_POLICY_HISTORY_KEEP_ALL

Store all samples, subject to resource limits.

◆ rmw_qos_durability_policy_t

enum RMW_PUBLIC_TYPE rmw_qos_durability_policy_t

QoS durability enumerations describing how samples persist.

◆ RMW_QOS_POLICY_DURABILITY_SYSTEM_DEFAULT

RMW_QOS_POLICY_DURABILITY_SYSTEM_DEFAULT

Impplementation specific default.

◆ RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL

RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL

The rmw publisher is responsible for persisting samples for “late-joining” subscribers.

◆ RMW_QOS_POLICY_DURABILITY_VOLATILE

RMW_QOS_POLICY_DURABILITY_VOLATILE

Samples are not persistent.

◆ rmw_qos_liveliness_policy_t

enum RMW_PUBLIC_TYPE rmw_qos_liveliness_policy_t

QoS liveliness enumerations that describe a publisher's reporting policy for its alive status. For a subscriber, these are its requirements for its topic's publishers.

◆ RMW_QOS_POLICY_LIVELINESS_SYSTEM_DEFAULT

RMW_QOS_POLICY_LIVELINESS_SYSTEM_DEFAULT = 0

Implementation specific default.

◆ RMW_QOS_POLICY_LIVELINESS_AUTOMATIC

RMW_QOS_POLICY_LIVELINESS_AUTOMATIC = 1

The signal that establishes a Topic is alive comes from the ROS rmw layer.

◆ RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_TOPIC

RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_TOPIC = 3

The signal that establishes a Topic is alive is at the Topic level. Only publishing a message on the Topic or an explicit signal from the application to assert liveliness on the Topic will mark the Topic as being alive.