Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix up documentation build for rmw when using rosdoc2 #313

Merged
merged 7 commits into from
Sep 14, 2021
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
2 changes: 2 additions & 0 deletions rmw/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = YES
EXPAND_ONLY_PREDEF = YES
PREDEFINED += RMW_PUBLIC=
PREDEFINED += RMW_PUBLIC_TYPE=
PREDEFINED += RMW_WARN_UNUSED=
PREDEFINED += RCUTILS_DEPRECATED_WITH_MSG(x)=

# Tag files that do not exist will produce a warning and cross-project linking will not work.
TAGFILES += "../../../../doxygen_tag_files/cppreference-doxygen-web.tag.xml=http://en.cppreference.com/w/"
Expand Down
4 changes: 2 additions & 2 deletions rmw/include/rmw/event.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ extern "C"
#include "rmw/visibility_control.h"

/// Define publisher/subscription events
typedef enum rmw_event_type_t
typedef enum rmw_event_type_e
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this break rmw implementations?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any RMW implementation that was using a "bare" rmw_event_type_t before should be fine; we are still defining that as part of the typedef. If an RMW implementation was using enum rmw_event_type_t, then it would now be broken.

I don't think we have any users of that in the core, but I will request a full CI run before we merge this. There might be third-party ones that use enum rmw_event_type_t, so I think a release note is in order for this change.

{
// subscription events
RMW_EVENT_LIVELINESS_CHANGED,
Expand All @@ -48,7 +48,7 @@ typedef enum rmw_event_type_t
} rmw_event_type_t;

/// Encapsulate the RMW event implementation, data, and type.
typedef struct RMW_PUBLIC_TYPE rmw_event_t
typedef struct RMW_PUBLIC_TYPE rmw_event_s
{
/// Implementation identifier, used to ensure two different implementations are not being mixed.
const char * implementation_identifier;
Expand Down
8 changes: 4 additions & 4 deletions rmw/include/rmw/events_statuses/incompatible_qos.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ extern "C"
{
#endif

struct RMW_PUBLIC_TYPE rmw_qos_incompatible_event_status_t
typedef struct RMW_PUBLIC_TYPE rmw_qos_incompatible_event_status_s
{
/**
* Total cumulative number of times the concerned subscription discovered a
Expand All @@ -42,13 +42,13 @@ struct RMW_PUBLIC_TYPE rmw_qos_incompatible_event_status_t
* incompatible the last time an incompatibility was detected.
*/
rmw_qos_policy_kind_t last_policy_kind;
};
} rmw_qos_incompatible_event_status_t;

/// Event state for a subscription's 'RMW_EVENT_REQUESTED_QOS_INCOMPATIBLE' events.
typedef struct rmw_qos_incompatible_event_status_t rmw_requested_qos_incompatible_event_status_t;
typedef rmw_qos_incompatible_event_status_t rmw_requested_qos_incompatible_event_status_t;

/// Event state for a publisher's 'RMW_EVENT_OFFERED_QOS_INCOMPATIBLE' events.
typedef struct rmw_qos_incompatible_event_status_t rmw_offered_qos_incompatible_event_status_t;
typedef rmw_qos_incompatible_event_status_t rmw_offered_qos_incompatible_event_status_t;

#ifdef __cplusplus
}
Expand Down
2 changes: 1 addition & 1 deletion rmw/include/rmw/events_statuses/liveliness_changed.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ extern "C"
#endif

/// QoS Liveliness Changed information provided by a subscription.
typedef struct RMW_PUBLIC_TYPE rmw_liveliness_changed_status_t
typedef struct RMW_PUBLIC_TYPE rmw_liveliness_changed_status_s
{
/**
* The total number of currently active Publishers which publish to the topic associated with
Expand Down
2 changes: 1 addition & 1 deletion rmw/include/rmw/events_statuses/liveliness_lost.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ extern "C"
#endif

/// QoS Liveliness Lost information provided by a publisher.
typedef struct RMW_PUBLIC_TYPE rmw_liveliness_lost_status_t
typedef struct RMW_PUBLIC_TYPE rmw_liveliness_lost_status_s
{
/**
* Lifetime cumulative number of times that a previously-alive Publisher became not alive due to
Expand Down
2 changes: 1 addition & 1 deletion rmw/include/rmw/events_statuses/message_lost.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ extern "C"
{
#endif

typedef struct RMW_PUBLIC_TYPE rmw_message_lost_status_t
typedef struct RMW_PUBLIC_TYPE rmw_message_lost_status_s
{
/// Total number of messages lost.
size_t total_count;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ extern "C"
#endif

/// QoS Deadline Missed information provided by a publisher.
typedef struct RMW_PUBLIC_TYPE rmw_offered_deadline_missed_status_t
typedef struct RMW_PUBLIC_TYPE rmw_offered_deadline_missed_status_s
{
/**
* Lifetime cumulative number of offered deadline periods elapsed during which a Publisher failed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ extern "C"
#endif

/// QoS Requested Deadline Missed information provided by a subscription.
typedef struct RMW_PUBLIC_TYPE rmw_requested_deadline_missed_status_t
typedef struct RMW_PUBLIC_TYPE rmw_requested_deadline_missed_status_s
{
/**
* Lifetime cumulative number of missed deadlines detected for any instance read by the
Expand Down
4 changes: 2 additions & 2 deletions rmw/include/rmw/init.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ extern "C"
/**
* This should be defined by the rmw implementation.
*/
typedef struct rmw_context_impl_t rmw_context_impl_t;
typedef struct rmw_context_impl_s rmw_context_impl_t;

/// Initialization context structure which is used to store init specific information.
typedef struct RMW_PUBLIC_TYPE rmw_context_t
typedef struct RMW_PUBLIC_TYPE rmw_context_s
{
/// Locally (process local) unique ID that represents this init/shutdown cycle.
uint64_t instance_id;
Expand Down
4 changes: 2 additions & 2 deletions rmw/include/rmw/init_options.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ extern "C"
/**
* This should be defined by the rmw implementation.
*/
typedef struct rmw_init_options_impl_t rmw_init_options_impl_t;
typedef struct rmw_init_options_impl_s rmw_init_options_impl_t;

/// Options structure used during rmw_init().
typedef struct RMW_PUBLIC_TYPE rmw_init_options_t
typedef struct RMW_PUBLIC_TYPE rmw_init_options_s
{
/// Locally (process local) unique ID that represents this init/shutdown cycle.
/**
Expand Down
2 changes: 1 addition & 1 deletion rmw/include/rmw/localhost.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ extern "C"
#endif

/// Used to specify if the context can only communicate through localhost.
typedef enum RMW_PUBLIC_TYPE rmw_localhost_only_t
typedef enum RMW_PUBLIC_TYPE rmw_localhost_only_e
{
/// Uses ROS_LOCALHOST_ONLY environment variable.
RMW_LOCALHOST_ONLY_DEFAULT = 0,
Expand Down
4 changes: 2 additions & 2 deletions rmw/include/rmw/message_sequence.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ extern "C"
#endif

/// Structure to hold a sequence of ROS messages.
typedef struct RMW_PUBLIC_TYPE rmw_message_sequence_t
typedef struct RMW_PUBLIC_TYPE rmw_message_sequence_s
{
/// Array of pointers to ROS messages.
void ** data;
Expand All @@ -40,7 +40,7 @@ typedef struct RMW_PUBLIC_TYPE rmw_message_sequence_t
} rmw_message_sequence_t;

/// Structure to hold a sequence of message infos.
typedef struct RMW_PUBLIC_TYPE rmw_message_info_sequence_t
typedef struct RMW_PUBLIC_TYPE rmw_message_info_sequence_s
{
/// Array of message info.
rmw_message_info_t * data;
Expand Down
2 changes: 1 addition & 1 deletion rmw/include/rmw/names_and_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ extern "C"
#include "rmw/visibility_control.h"

/// Associative array of topic or service names and types.
typedef struct RMW_PUBLIC_TYPE rmw_names_and_types_t
typedef struct RMW_PUBLIC_TYPE rmw_names_and_types_s
{
/// Array of names
rcutils_string_array_t names;
Expand Down
6 changes: 3 additions & 3 deletions rmw/include/rmw/network_flow_endpoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ extern "C"
#include "rmw/visibility_control.h"

/// Transport protocol types
typedef enum rmw_transport_protocol_t
typedef enum rmw_transport_protocol_e
{
RMW_TRANSPORT_PROTOCOL_UNKNOWN = 0,
RMW_TRANSPORT_PROTOCOL_UDP,
Expand All @@ -33,7 +33,7 @@ typedef enum rmw_transport_protocol_t
} rmw_transport_protocol_t;

/// Internet protocol types
typedef enum rmw_internet_protocol_t
typedef enum rmw_internet_protocol_e
{
RMW_INTERNET_PROTOCOL_UNKNOWN = 0,
RMW_INTERNET_PROTOCOL_IPV4,
Expand All @@ -46,7 +46,7 @@ typedef enum rmw_internet_protocol_t
#define RMW_INET_ADDRSTRLEN 48

/// Structure that describes network flow endpoint of a publisher or subscription
typedef struct RMW_PUBLIC_TYPE rmw_network_flow_endpoint_t
typedef struct RMW_PUBLIC_TYPE rmw_network_flow_endpoint_s
{
// Transport protocol
rmw_transport_protocol_t transport_protocol;
Expand Down
2 changes: 1 addition & 1 deletion rmw/include/rmw/network_flow_endpoint_array.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ extern "C"
#include "rmw/visibility_control.h"

/// Structure to hold an arrary of network_flow_endpoint_t
typedef struct RMW_PUBLIC_TYPE rmw_network_flow_endpoint_array_t
typedef struct RMW_PUBLIC_TYPE rmw_network_flow_endpoint_array_s
{
/// Size of the array
size_t size;
Expand Down
2 changes: 1 addition & 1 deletion rmw/include/rmw/qos_policy_kind.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ extern "C"
#endif

/// QoS Policy Kinds
typedef enum RMW_PUBLIC_TYPE rmw_qos_policy_kind_t
typedef enum RMW_PUBLIC_TYPE rmw_qos_policy_kind_e
{
RMW_QOS_POLICY_INVALID = 1 << 0,
RMW_QOS_POLICY_DURABILITY = 1 << 1,
Expand Down
2 changes: 1 addition & 1 deletion rmw/include/rmw/qos_profiles.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ static const rmw_qos_profile_t rmw_qos_profile_unknown =
false
};

typedef enum RMW_PUBLIC_TYPE rmw_qos_compatibility_type_t
typedef enum RMW_PUBLIC_TYPE rmw_qos_compatibility_type_e
{
/// QoS policies are compatible
RMW_QOS_COMPATIBILITY_OK = 0,
Expand Down
16 changes: 8 additions & 8 deletions rmw/include/rmw/qos_string_conversions.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,31 +73,31 @@ rmw_qos_policy_kind_to_str(rmw_qos_policy_kind_t kind);
*/
RMW_PUBLIC
const char *
rmw_qos_durability_policy_to_str(enum rmw_qos_durability_policy_t value);
rmw_qos_durability_policy_to_str(rmw_qos_durability_policy_t value);

/// Return a string representing the policy value.
/**
* See \ref rmw_qos_durability_policy_to_str() for more details.
*/
RMW_PUBLIC
const char *
rmw_qos_history_policy_to_str(enum rmw_qos_history_policy_t value);
rmw_qos_history_policy_to_str(rmw_qos_history_policy_t value);

/// Return a string representing the policy value.
/**
* See \ref rmw_qos_durability_policy_to_str() for more details.
*/
RMW_PUBLIC
const char *
rmw_qos_liveliness_policy_to_str(enum rmw_qos_liveliness_policy_t value);
rmw_qos_liveliness_policy_to_str(rmw_qos_liveliness_policy_t value);

/// Return a string representing the policy value.
/**
* See \ref rmw_qos_durability_policy_to_str() for more details.
*/
RMW_PUBLIC
const char *
rmw_qos_reliability_policy_to_str(enum rmw_qos_reliability_policy_t value);
rmw_qos_reliability_policy_to_str(rmw_qos_reliability_policy_t value);

/// Return a policy kind based on the provided string.
/**
Expand Down Expand Up @@ -142,23 +142,23 @@ rmw_qos_policy_kind_from_str(const char * str);
* \return `RMW_QOS_POLICY_*_UNKNOWN` if the string doesn't represent any value.
*/
RMW_PUBLIC
enum rmw_qos_durability_policy_t
rmw_qos_durability_policy_t
rmw_qos_durability_policy_from_str(const char * str);

/// Return a enum value based on the provided string.
/**
* See \ref rmw_qos_durability_policy_from_str() for more details.
*/
RMW_PUBLIC
enum rmw_qos_history_policy_t
rmw_qos_history_policy_t
rmw_qos_history_policy_from_str(const char * str);

/// Return a enum value based on the provided string.
/**
* See \ref rmw_qos_durability_policy_from_str() for more details.
*/
RMW_PUBLIC
enum rmw_qos_liveliness_policy_t
rmw_qos_liveliness_policy_t
rmw_qos_liveliness_policy_from_str(const char * str);


Expand All @@ -167,7 +167,7 @@ rmw_qos_liveliness_policy_from_str(const char * str);
* See \ref rmw_qos_durability_policy_from_str() for more details.
*/
RMW_PUBLIC
enum rmw_qos_reliability_policy_t
rmw_qos_reliability_policy_t
rmw_qos_reliability_policy_from_str(const char * str);

#ifdef __cplusplus
Expand Down
11 changes: 5 additions & 6 deletions rmw/include/rmw/rmw.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ extern "C"

#include "rmw/init.h"
#include "rmw/macros.h"
#include "rmw/publisher_options.h"
#include "rmw/qos_profiles.h"
#include "rmw/subscription_options.h"
#include "rmw/message_sequence.h"
Expand Down Expand Up @@ -194,6 +195,10 @@ RMW_WARN_UNUSED
rmw_ret_t
rmw_destroy_node(rmw_node_t * node);

/**
* \deprecated `rmw_node_assert_liveliness` implementation was removed.
* If manual liveliness assertion is needed, use MANUAL_BY_TOPIC.
*/
RMW_PUBLIC
RCUTILS_DEPRECATED_WITH_MSG(
"rmw_node_assert_liveliness implementation was removed."
Expand Down Expand Up @@ -297,12 +302,6 @@ rmw_ret_t
rmw_fini_publisher_allocation(
rmw_publisher_allocation_t * allocation);

/// Return a rmw_publisher_options_t initialized with default values.
RMW_PUBLIC
RMW_WARN_UNUSED
rmw_publisher_options_t
rmw_get_default_publisher_options(void);
ivanpauno marked this conversation as resolved.
Show resolved Hide resolved

/// Create a publisher and return a handle to that publisher.
/**
* This function can fail, and therefore return `NULL`, if:
Expand Down
6 changes: 3 additions & 3 deletions rmw/include/rmw/security_options.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ extern "C"
#include "rmw/ret_types.h"
#include "rmw/visibility_control.h"

typedef enum RMW_PUBLIC_TYPE rmw_security_enforcement_policy_t
typedef enum RMW_PUBLIC_TYPE rmw_security_enforcement_policy_e
{
RMW_SECURITY_ENFORCEMENT_PERMISSIVE,
RMW_SECURITY_ENFORCEMENT_ENFORCE,
} rmw_security_enforcement_policy_t;

typedef struct RMW_PUBLIC_TYPE rmw_security_options_t
typedef struct RMW_PUBLIC_TYPE rmw_security_options_s
{
enum rmw_security_enforcement_policy_t enforce_security;
rmw_security_enforcement_policy_t enforce_security;
char * security_root_path;
} rmw_security_options_t;

Expand Down
3 changes: 0 additions & 3 deletions rmw/include/rmw/serialized_message.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,13 @@ extern "C"
#include "rcutils/types/uint8_array.h"

/**
* \struct rmw_serialized_message_t
*
* \brief Serialized message as a string of bytes.
*
* It includes (but it is not limited to) the following members:
* \e \c buffer the reference to internal storage, as a pointer
* \e \c buffer_length the size of stored contents, as an unsigned integer
* \e \c buffer_capacity the capacity of internal storage, as an unsigned integer
*/

/* For now this is a simple aliasing from a serialized message to a uint8 array.
* However, in future developments this serialized message can become something
* more complex and is therefore aliased.
Expand Down
2 changes: 1 addition & 1 deletion rmw/include/rmw/time.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ extern "C"
#include "rmw/visibility_control.h"

/// A struct representing a duration or relative time in RMW - does not encode an origin.
typedef struct RMW_PUBLIC_TYPE rmw_time_t
typedef struct RMW_PUBLIC_TYPE rmw_time_s
{
/// Seconds component
uint64_t sec;
Expand Down
4 changes: 2 additions & 2 deletions rmw/include/rmw/topic_endpoint_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ extern "C"
/// A data structure that encapsulates the node name, node namespace,
/// topic_type, gid, and qos_profile of publishers and subscriptions
/// for a topic.
typedef struct RMW_PUBLIC_TYPE rmw_topic_endpoint_info_t
typedef struct RMW_PUBLIC_TYPE rmw_topic_endpoint_info_s
{
/// Name of the node
const char * node_name;
Expand Down Expand Up @@ -288,7 +288,7 @@ RMW_WARN_UNUSED
rmw_ret_t
rmw_topic_endpoint_info_set_gid(
rmw_topic_endpoint_info_t * topic_endpoint_info,
const uint8_t gid[],
const uint8_t * gid,
size_t size);

/// Set the endpoint QoS profile in the given topic endpoint info data structure.
Expand Down
2 changes: 1 addition & 1 deletion rmw/include/rmw/topic_endpoint_info_array.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ extern "C"
#include "rmw/visibility_control.h"

/// Array of topic endpoint information
typedef struct RMW_PUBLIC_TYPE rmw_topic_endpoint_info_array_t
typedef struct RMW_PUBLIC_TYPE rmw_topic_endpoint_info_array_s
{
/// Size of the array.
size_t size;
Expand Down
Loading