nros C API
Lightweight ROS 2 client for embedded real-time systems
Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
nros_generated.h File Reference
#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
#include <stddef.h>
#include "nros/visibility.h"
#include "nros/nros_config_generated.h"
Include dependency graph for nros_generated.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ActionClientInternal
 
struct  ActionServerInternal
 
struct  nros_action_client_options_t
 
struct  nros_action_client_t
 
struct  nros_action_server_options_t
 
struct  nros_action_server_t
 
struct  nros_action_type_t
 
struct  nros_client_options_t
 
struct  nros_client_t
 
struct  nros_clock_t
 
struct  nros_count_status_t
 
struct  nros_duration_t
 
struct  nros_executor_t
 
struct  nros_goal_handle_t
 
struct  nros_goal_uuid_t
 
struct  nros_guard_condition_t
 
struct  nros_integrity_status_t
 
struct  nros_lifecycle_state_machine_t
 
struct  nros_liveliness_changed_status_t
 
struct  nros_message_type_t
 
struct  nros_node_options_t
 
struct  nros_node_t
 
struct  nros_param_array_t
 
struct  nros_param_server_t
 
struct  nros_parameter_t
 
union  nros_parameter_value_t
 
struct  nros_publisher_options_t
 
struct  nros_publisher_t
 
struct  nros_qos_override_t
 
struct  nros_qos_t
 
struct  nros_sched_context_t
 
struct  nros_service_options_t
 
struct  nros_service_t
 
struct  nros_service_type_t
 
struct  nros_subscription_options_t
 
struct  nros_subscription_t
 
struct  nros_support_t
 
struct  nros_time_t
 
struct  nros_timer_t
 
struct  nros_transport_ops_t
 
struct  nros_wake_state_t
 
struct  ServiceClientInternal
 
struct  ServiceServerInternal
 

Macros

#define MAX_RMW_NAME_LEN   32
 
#define NROS_DOMAIN_ID_INHERIT   UINT32_MAX
 
#define NROS_GENERATED_H
 
#define NROS_MAX_ACTION_NAME_LEN   256
 
#define NROS_MAX_CONCURRENT_GOALS   4
 
#define NROS_MAX_LOCATOR_LEN   128
 
#define NROS_MAX_NAME_LEN   64
 
#define NROS_MAX_NAMESPACE_LEN   128
 
#define NROS_MAX_PARAM_NAME_LEN   64
 
#define NROS_MAX_PARAM_STRING_LEN   128
 
#define NROS_MAX_SERVICE_NAME_LEN   256
 
#define NROS_MAX_TOPIC_LEN   256
 
#define NROS_MAX_TYPE_HASH_LEN   128
 
#define NROS_MAX_TYPE_NAME_LEN   256
 
#define NROS_RET_ALREADY_EXISTS   -5
 
#define NROS_RET_BAD_SEQUENCE   -8
 
#define NROS_RET_ERROR   -1
 
#define NROS_RET_FULL   -6
 
#define NROS_RET_INVALID_ARGUMENT   -3
 
#define NROS_RET_NOT_ALLOWED   -12
 
#define NROS_RET_NOT_FOUND   -4
 
#define NROS_RET_NOT_INIT   -7
 
#define NROS_RET_OK   0
 
#define NROS_RET_PUBLISH_FAILED   -10
 
#define NROS_RET_REENTRANT   -15
 
#define NROS_RET_REJECTED   -13
 
#define NROS_RET_SERVICE_FAILED   -9
 
#define NROS_RET_SUBSCRIPTION_FAILED   -11
 
#define NROS_RET_TIMEOUT   -2
 
#define NROS_RET_TRY_AGAIN   -14
 
#define NROS_RET_UNSUPPORTED   -16
 

Typedefs

typedef void(* nros_accepted_callback_t) (struct nros_action_server_t *server, const struct nros_goal_handle_t *goal, void *context)
 
typedef enum nros_cancel_response_t(* nros_cancel_callback_t) (struct nros_action_server_t *server, const struct nros_goal_handle_t *goal, void *context)
 
typedef uint8_t nros_deadline_policy_t
 
typedef void(* nros_event_liveliness_changed_cb_t) (struct nros_subscription_t *sub, struct nros_liveliness_changed_status_t status, void *user_context)
 
typedef void(* nros_event_publisher_count_cb_t) (struct nros_publisher_t *pub_, struct nros_count_status_t status, void *user_context)
 
typedef void(* nros_event_subscriber_count_cb_t) (struct nros_subscription_t *sub, struct nros_count_status_t status, void *user_context)
 
typedef bool(* nros_executor_trigger_t) (const bool *ready, size_t count, void *context)
 
typedef void(* nros_feedback_callback_t) (const struct nros_goal_uuid_t *goal_uuid, const uint8_t *feedback, size_t feedback_len, void *context)
 
typedef enum nros_goal_response_t(* nros_goal_callback_t) (struct nros_action_server_t *server, const struct nros_goal_handle_t *goal, const uint8_t *goal_request, size_t goal_len, void *context)
 
typedef void(* nros_goal_response_callback_t) (const struct nros_goal_uuid_t *goal_uuid, bool accepted, void *context)
 
typedef void(* nros_guard_condition_callback_t) (void *context)
 
typedef bool(* nros_param_callback_t) (const char *name, const struct nros_parameter_t *param, void *context)
 
typedef void(* nros_response_callback_t) (const uint8_t *response, size_t response_len, void *context)
 
typedef void(* nros_result_callback_t) (const struct nros_goal_uuid_t *goal_uuid, enum nros_goal_status_t status, const uint8_t *result, size_t result_len, void *context)
 
typedef int nros_ret_t
 
typedef uint8_t nros_sched_class_t
 
typedef uint8_t nros_sched_context_id_t
 
typedef uint8_t nros_sched_priority_t
 
typedef bool(* nros_service_callback_t) (const uint8_t *request_data, size_t request_len, uint8_t *response_data, size_t response_capacity, size_t *response_len, void *context)
 
typedef void(* nros_subscription_callback_t) (const uint8_t *data, size_t len, void *context)
 
typedef void(* nros_subscription_info_callback_t) (const uint8_t *data, size_t len, const uint8_t *attachment, size_t attachment_len, void *context)
 
typedef void(* nros_timer_callback_t) (struct nros_timer_t *timer, void *context)
 
typedef struct Option_LifecycleCallbackFnCtx Option_LifecycleCallbackFnCtx
 

Enumerations

enum  nros_action_client_state_t { NROS_ACTION_CLIENT_STATE_UNINITIALIZED = 0 , NROS_ACTION_CLIENT_STATE_INITIALIZED = 1 , NROS_ACTION_CLIENT_STATE_SHUTDOWN = 2 , NROS_ACTION_CLIENT_STATE_POLLING = 3 }
 
enum  nros_action_server_state_t { NROS_ACTION_SERVER_STATE_UNINITIALIZED = 0 , NROS_ACTION_SERVER_STATE_INITIALIZED = 1 , NROS_ACTION_SERVER_STATE_SHUTDOWN = 2 , NROS_ACTION_SERVER_STATE_POLLING = 3 }
 
enum  nros_cancel_response_t { NROS_CANCEL_REJECT = 0 , NROS_CANCEL_ACCEPT = 1 }
 
enum  nros_cancel_return_code_t { NROS_CANCEL_RC_OK = 0 , NROS_CANCEL_RC_REJECTED = 1 , NROS_CANCEL_RC_UNKNOWN_GOAL = 2 , NROS_CANCEL_RC_GOAL_TERMINATED = 3 }
 
enum  nros_client_state_t {
  NROS_CLIENT_STATE_UNINITIALIZED = 0 , NROS_CLIENT_STATE_INITIALIZED = 1 , NROS_CLIENT_STATE_REGISTERED = 2 , NROS_CLIENT_STATE_SHUTDOWN = 3 ,
  NROS_CLIENT_STATE_POLLING = 4
}
 
enum  nros_clock_state_t { NROS_CLOCK_STATE_UNINITIALIZED = 0 , NROS_CLOCK_STATE_READY = 1 , NROS_CLOCK_STATE_SHUTDOWN = 2 }
 
enum  nros_clock_type_t { NROS_CLOCK_UNINITIALIZED = 0 , NROS_CLOCK_ROS_TIME = 1 , NROS_CLOCK_SYSTEM_TIME = 2 , NROS_CLOCK_STEADY_TIME = 3 }
 
enum  nros_deadline_policy_t { NROS_DEADLINE_POLICY_RELEASED = 0 , NROS_DEADLINE_POLICY_ACTIVATED = 1 , NROS_DEADLINE_POLICY_INHERITED = 2 }
 
enum  nros_executor_invocation_t { NROS_EXECUTOR_ON_NEW_DATA = 0 , NROS_EXECUTOR_ALWAYS = 1 }
 
enum  nros_executor_semantics_t { NROS_SEMANTICS_RCLCPP_EXECUTOR = 0 , NROS_SEMANTICS_LOGICAL_EXECUTION_TIME = 1 }
 
enum  nros_executor_state_t { NROS_EXECUTOR_STATE_UNINITIALIZED = 0 , NROS_EXECUTOR_STATE_INITIALIZED = 1 , NROS_EXECUTOR_STATE_SPINNING = 2 , NROS_EXECUTOR_STATE_SHUTDOWN = 3 }
 
enum  nros_goal_response_t { NROS_GOAL_REJECT = 0 , NROS_GOAL_ACCEPT_AND_EXECUTE = 1 , NROS_GOAL_ACCEPT_AND_DEFER = 2 }
 
enum  nros_goal_status_t {
  NROS_GOAL_STATUS_UNKNOWN = 0 , NROS_GOAL_STATUS_ACCEPTED = 1 , NROS_GOAL_STATUS_EXECUTING = 2 , NROS_GOAL_STATUS_CANCELING = 3 ,
  NROS_GOAL_STATUS_SUCCEEDED = 4 , NROS_GOAL_STATUS_CANCELED = 5 , NROS_GOAL_STATUS_ABORTED = 6
}
 
enum  nros_guard_condition_state_t { NROS_GUARD_CONDITION_STATE_UNINITIALIZED = 0 , NROS_GUARD_CONDITION_STATE_INITIALIZED = 1 , NROS_GUARD_CONDITION_STATE_SHUTDOWN = 2 }
 
enum  nros_node_state_t { NROS_NODE_STATE_UNINITIALIZED = 0 , NROS_NODE_STATE_INITIALIZED = 1 , NROS_NODE_STATE_SHUTDOWN = 2 }
 
enum  nros_param_server_state_t { NROS_PARAM_SERVER_STATE_UNINITIALIZED = 0 , NROS_PARAM_SERVER_STATE_READY = 1 , NROS_PARAM_SERVER_STATE_SHUTDOWN = 2 }
 
enum  nros_parameter_type_t {
  NROS_PARAMETER_NOT_SET = 0 , NROS_PARAMETER_BOOL = 1 , NROS_PARAMETER_INTEGER = 2 , NROS_PARAMETER_DOUBLE = 3 ,
  NROS_PARAMETER_STRING = 4 , NROS_PARAMETER_BYTE_ARRAY = 5 , NROS_PARAMETER_BOOL_ARRAY = 6 , NROS_PARAMETER_INTEGER_ARRAY = 7 ,
  NROS_PARAMETER_DOUBLE_ARRAY = 8 , NROS_PARAMETER_STRING_ARRAY = 9
}
 
enum  nros_publisher_state_t { NROS_PUBLISHER_STATE_UNINITIALIZED = 0 , NROS_PUBLISHER_STATE_INITIALIZED = 1 , NROS_PUBLISHER_STATE_SHUTDOWN = 2 }
 
enum  nros_qos_durability_t { NROS_QOS_DURABILITY_VOLATILE = 0 , NROS_QOS_DURABILITY_TRANSIENT_LOCAL = 1 }
 
enum  nros_qos_history_t { NROS_QOS_HISTORY_KEEP_LAST = 0 , NROS_QOS_HISTORY_KEEP_ALL = 1 }
 
enum  nros_qos_liveliness_t { NROS_QOS_LIVELINESS_NONE = 0 , NROS_QOS_LIVELINESS_AUTOMATIC = 1 , NROS_QOS_LIVELINESS_MANUAL_BY_TOPIC = 2 , NROS_QOS_LIVELINESS_MANUAL_BY_NODE = 3 }
 
enum  nros_qos_reliability_t { NROS_QOS_RELIABILITY_BEST_EFFORT = 0 , NROS_QOS_RELIABILITY_RELIABLE = 1 }
 
enum  nros_sched_class_t {
  NROS_SCHED_CLASS_FIFO = 0 , NROS_SCHED_CLASS_EDF = 1 , NROS_SCHED_CLASS_SPORADIC = 2 , NROS_SCHED_CLASS_BEST_EFFORT = 3 ,
  NROS_SCHED_CLASS_TIME_TRIGGERED = 4
}
 
enum  nros_sched_priority_t { NROS_SCHED_PRIORITY_CRITICAL = 0 , NROS_SCHED_PRIORITY_NORMAL = 1 , NROS_SCHED_PRIORITY_BEST_EFFORT = 2 }
 
enum  nros_service_state_t { NROS_SERVICE_STATE_UNINITIALIZED = 0 , NROS_SERVICE_STATE_INITIALIZED = 1 , NROS_SERVICE_STATE_SHUTDOWN = 2 , NROS_SERVICE_STATE_POLLING = 3 }
 
enum  nros_subscription_state_t { NROS_SUBSCRIPTION_STATE_UNINITIALIZED = 0 , NROS_SUBSCRIPTION_STATE_INITIALIZED = 1 , NROS_SUBSCRIPTION_STATE_SHUTDOWN = 2 , NROS_SUBSCRIPTION_STATE_POLLING = 3 }
 
enum  nros_support_state_t { NROS_SUPPORT_STATE_UNINITIALIZED = 0 , NROS_SUPPORT_STATE_INITIALIZED = 1 , NROS_SUPPORT_STATE_SHUTDOWN = 2 }
 
enum  nros_timer_state_t { NROS_TIMER_STATE_UNINITIALIZED = 0 , NROS_TIMER_STATE_RUNNING = 1 , NROS_TIMER_STATE_CANCELED = 2 , NROS_TIMER_STATE_SHUTDOWN = 3 }
 

Functions

nros_ret_t nros_action_abort (struct nros_action_server_t *server, const struct nros_goal_handle_t *goal, const uint8_t *result, size_t result_len)
 
nros_ret_t nros_action_cancel_goal (struct nros_action_client_t *client, const struct nros_goal_uuid_t *goal_uuid)
 
nros_ret_t nros_action_canceled (struct nros_action_server_t *server, const struct nros_goal_handle_t *goal, const uint8_t *result, size_t result_len)
 
bool nros_action_client_action_server_is_ready (const struct nros_action_client_t *client, struct nros_executor_t *executor)
 
nros_ret_t nros_action_client_fini (struct nros_action_client_t *client)
 
struct nros_action_client_options_t nros_action_client_get_default_options (void)
 
struct nros_action_client_t nros_action_client_get_zero_initialized (void)
 
nros_ret_t nros_action_client_init (struct nros_action_client_t *client, const struct nros_node_t *node, const char *action_name, const struct nros_action_type_t *type_info)
 
nros_ret_t nros_action_client_init_polling (struct nros_action_client_t *client, const struct nros_node_t *node, const struct nros_action_type_t *type_info, const char *action_name)
 
nros_ret_t nros_action_client_init_with_options (struct nros_action_client_t *client, const struct nros_node_t *node, const char *action_name, const struct nros_action_type_t *type_info, const struct nros_action_client_options_t *options)
 
nros_ret_t nros_action_client_poll (struct nros_action_client_t *client)
 
nros_ret_t nros_action_client_send_cancel_request_raw (struct nros_action_client_t *client, const uint8_t(*goal_id)[16])
 
nros_ret_t nros_action_client_send_get_result_request_raw (struct nros_action_client_t *client, const uint8_t(*goal_id)[16])
 
nros_ret_t nros_action_client_send_goal_raw (struct nros_action_client_t *client, const uint8_t *goal_cdr, size_t goal_len, uint8_t(*goal_id_out)[16])
 
nros_ret_t nros_action_client_set_cancel_response_wake_callback (struct nros_action_client_t *client, struct nros_wake_state_t *state, void(*cb)(void *), void *ctx)
 
nros_ret_t nros_action_client_set_feedback_callback (struct nros_action_client_t *client, nros_feedback_callback_t callback, void *context)
 
nros_ret_t nros_action_client_set_feedback_wake_callback (struct nros_action_client_t *client, struct nros_wake_state_t *state, void(*cb)(void *), void *ctx)
 
nros_ret_t nros_action_client_set_goal_response_callback (struct nros_action_client_t *client, nros_goal_response_callback_t callback, void *context)
 
nros_ret_t nros_action_client_set_goal_response_wake_callback (struct nros_action_client_t *client, struct nros_wake_state_t *state, void(*cb)(void *), void *ctx)
 
nros_ret_t nros_action_client_set_result_callback (struct nros_action_client_t *client, nros_result_callback_t callback, void *context)
 
nros_ret_t nros_action_client_set_result_wake_callback (struct nros_action_client_t *client, struct nros_wake_state_t *state, void(*cb)(void *), void *ctx)
 
int32_t nros_action_client_try_recv_cancel_response_raw (struct nros_action_client_t *client, uint8_t *buf, size_t buf_len)
 
int32_t nros_action_client_try_recv_feedback_raw (struct nros_action_client_t *client, uint8_t *buf, size_t buf_len, uint8_t(*goal_id_out)[16])
 
int32_t nros_action_client_try_recv_goal_response_raw (struct nros_action_client_t *client, uint8_t *buf, size_t buf_len)
 
int32_t nros_action_client_try_recv_result_raw (struct nros_action_client_t *client, uint8_t *buf, size_t buf_len)
 
nros_ret_t nros_action_client_wait_for_action_server (struct nros_action_client_t *client, struct nros_executor_t *executor, uint32_t timeout_ms)
 
nros_ret_t nros_action_execute (struct nros_action_server_t *server, const struct nros_goal_handle_t *goal)
 
nros_ret_t nros_action_get_goal_status (const struct nros_action_server_t *server, const struct nros_goal_handle_t *goal, enum nros_goal_status_t *status)
 
nros_ret_t nros_action_get_result (struct nros_action_client_t *client, struct nros_executor_t *executor, const struct nros_goal_uuid_t *goal_uuid, enum nros_goal_status_t *status, uint8_t *result, size_t result_capacity, size_t *result_len)
 
nros_ret_t nros_action_get_result_async (struct nros_action_client_t *client, const struct nros_goal_uuid_t *goal_uuid)
 
nros_ret_t nros_action_publish_feedback (struct nros_action_server_t *server, const struct nros_goal_handle_t *goal, const uint8_t *feedback, size_t feedback_len)
 
nros_ret_t nros_action_send_goal (struct nros_action_client_t *client, struct nros_executor_t *executor, const uint8_t *goal, size_t goal_len, struct nros_goal_uuid_t *goal_uuid)
 
nros_ret_t nros_action_send_goal_async (struct nros_action_client_t *client, const uint8_t *goal, size_t goal_len, struct nros_goal_uuid_t *goal_uuid)
 
nros_ret_t nros_action_server_accept_goal_raw (struct nros_action_server_t *server, const uint8_t(*goal_id)[16], int64_t sequence_number)
 
int32_t nros_action_server_active_goal_count_raw (struct nros_action_server_t *server)
 
nros_ret_t nros_action_server_complete_goal_raw (struct nros_action_server_t *server, const uint8_t(*goal_id)[16], enum nros_goal_status_t status, const uint8_t *result_cdr, size_t result_len)
 
nros_ret_t nros_action_server_fini (struct nros_action_server_t *server)
 
size_t nros_action_server_get_active_goal_count (const struct nros_action_server_t *server)
 
struct nros_action_server_options_t nros_action_server_get_default_options (void)
 
struct nros_action_server_t nros_action_server_get_zero_initialized (void)
 
nros_ret_t nros_action_server_init (struct nros_action_server_t *server, const struct nros_node_t *node, const char *action_name, const struct nros_action_type_t *type_info, nros_goal_callback_t goal_callback, nros_cancel_callback_t cancel_callback, nros_accepted_callback_t accepted_callback, void *context)
 
nros_ret_t nros_action_server_init_polling (struct nros_action_server_t *server, const struct nros_node_t *node, const struct nros_action_type_t *type_info, const char *action_name)
 
nros_ret_t nros_action_server_init_with_options (struct nros_action_server_t *server, const struct nros_node_t *node, const char *action_name, const struct nros_action_type_t *type_info, nros_goal_callback_t goal_callback, nros_cancel_callback_t cancel_callback, nros_accepted_callback_t accepted_callback, void *context, const struct nros_qos_t *qos, const struct nros_action_server_options_t *options)
 
nros_ret_t nros_action_server_init_with_qos (struct nros_action_server_t *server, const struct nros_node_t *node, const char *action_name, const struct nros_action_type_t *type_info, nros_goal_callback_t goal_callback, nros_cancel_callback_t cancel_callback, nros_accepted_callback_t accepted_callback, void *context, const struct nros_qos_t *qos)
 
nros_ret_t nros_action_server_publish_feedback_raw (struct nros_action_server_t *server, const uint8_t(*goal_id)[16], const uint8_t *feedback_cdr, size_t feedback_len)
 
nros_ret_t nros_action_server_reject_goal_raw (struct nros_action_server_t *server, int64_t sequence_number)
 
nros_ret_t nros_action_server_send_cancel_reply_raw (struct nros_action_server_t *server, int64_t sequence_number, enum nros_cancel_return_code_t return_code, const uint8_t(*accepted)[16], size_t accepted_count)
 
nros_ret_t nros_action_server_set_cancel_wake_callback (struct nros_action_server_t *server, struct nros_wake_state_t *state, void(*cb)(void *), void *ctx)
 
nros_ret_t nros_action_server_set_get_result_wake_callback (struct nros_action_server_t *server, struct nros_wake_state_t *state, void(*cb)(void *), void *ctx)
 
nros_ret_t nros_action_server_set_goal_wake_callback (struct nros_action_server_t *server, struct nros_wake_state_t *state, void(*cb)(void *), void *ctx)
 
int32_t nros_action_server_try_handle_get_result_raw (struct nros_action_server_t *server, const uint8_t *default_result_cdr, size_t default_result_len)
 
int32_t nros_action_server_try_recv_cancel_request_raw (struct nros_action_server_t *server, uint8_t(*goal_id_out)[16], int64_t *sequence_number_out, enum nros_goal_status_t *current_status_out)
 
int32_t nros_action_server_try_recv_goal_request_raw (struct nros_action_server_t *server, uint8_t *buf, size_t buf_len, uint8_t(*goal_id_out)[16], int64_t *sequence_number_out)
 
nros_ret_t nros_action_succeed (struct nros_action_server_t *server, const struct nros_goal_handle_t *goal, const uint8_t *result, size_t result_len)
 
nros_ret_t nros_action_try_recv_feedback (struct nros_action_client_t *client)
 
int32_t nros_cdr_read_bool (const uint8_t **ptr, const uint8_t *end, const uint8_t *origin, bool *value)
 
int32_t nros_cdr_read_f32 (const uint8_t **ptr, const uint8_t *end, const uint8_t *origin, float *value)
 
int32_t nros_cdr_read_f64 (const uint8_t **ptr, const uint8_t *end, const uint8_t *origin, double *value)
 
int32_t nros_cdr_read_i16 (const uint8_t **ptr, const uint8_t *end, const uint8_t *origin, int16_t *value)
 
int32_t nros_cdr_read_i32 (const uint8_t **ptr, const uint8_t *end, const uint8_t *origin, int32_t *value)
 
int32_t nros_cdr_read_i64 (const uint8_t **ptr, const uint8_t *end, const uint8_t *origin, int64_t *value)
 
int32_t nros_cdr_read_i8 (const uint8_t **ptr, const uint8_t *end, const uint8_t *origin, int8_t *value)
 
int32_t nros_cdr_read_string (const uint8_t **ptr, const uint8_t *end, const uint8_t *origin, char *value, size_t max_len)
 
int32_t nros_cdr_read_u16 (const uint8_t **ptr, const uint8_t *end, const uint8_t *origin, uint16_t *value)
 
int32_t nros_cdr_read_u32 (const uint8_t **ptr, const uint8_t *end, const uint8_t *origin, uint32_t *value)
 
int32_t nros_cdr_read_u64 (const uint8_t **ptr, const uint8_t *end, const uint8_t *origin, uint64_t *value)
 
int32_t nros_cdr_read_u8 (const uint8_t **ptr, const uint8_t *end, const uint8_t *origin, uint8_t *value)
 
int32_t nros_cdr_write_bool (uint8_t **ptr, const uint8_t *end, const uint8_t *origin, bool value)
 
int32_t nros_cdr_write_f32 (uint8_t **ptr, const uint8_t *end, const uint8_t *origin, float value)
 
int32_t nros_cdr_write_f64 (uint8_t **ptr, const uint8_t *end, const uint8_t *origin, double value)
 
int32_t nros_cdr_write_i16 (uint8_t **ptr, const uint8_t *end, const uint8_t *origin, int16_t value)
 
int32_t nros_cdr_write_i32 (uint8_t **ptr, const uint8_t *end, const uint8_t *origin, int32_t value)
 
int32_t nros_cdr_write_i64 (uint8_t **ptr, const uint8_t *end, const uint8_t *origin, int64_t value)
 
int32_t nros_cdr_write_i8 (uint8_t **ptr, const uint8_t *end, const uint8_t *origin, int8_t value)
 
int32_t nros_cdr_write_string (uint8_t **ptr, const uint8_t *end, const uint8_t *origin, const char *value)
 
int32_t nros_cdr_write_string_n (uint8_t **ptr, const uint8_t *end, const uint8_t *origin, const char *data, size_t data_len)
 
int32_t nros_cdr_write_u16 (uint8_t **ptr, const uint8_t *end, const uint8_t *origin, uint16_t value)
 
int32_t nros_cdr_write_u32 (uint8_t **ptr, const uint8_t *end, const uint8_t *origin, uint32_t value)
 
int32_t nros_cdr_write_u64 (uint8_t **ptr, const uint8_t *end, const uint8_t *origin, uint64_t value)
 
int32_t nros_cdr_write_u8 (uint8_t **ptr, const uint8_t *end, const uint8_t *origin, uint8_t value)
 
nros_ret_t nros_clear_custom_transport (void)
 
nros_ret_t nros_client_call (struct nros_client_t *client, const uint8_t *request_data, size_t request_len, uint8_t *response_data, size_t response_capacity, size_t *response_len)
 
nros_ret_t nros_client_fini (struct nros_client_t *client)
 
struct nros_client_options_t nros_client_get_default_options (void)
 
const char * nros_client_get_service_name (const struct nros_client_t *client)
 
struct nros_client_t nros_client_get_zero_initialized (void)
 
nros_ret_t nros_client_init (struct nros_client_t *client, const struct nros_node_t *node, const struct nros_service_type_t *type_info, const char *service_name)
 
nros_ret_t nros_client_init_polling (struct nros_client_t *client, const struct nros_node_t *node, const struct nros_service_type_t *type_info, const char *service_name)
 
nros_ret_t nros_client_init_with_options (struct nros_client_t *client, const struct nros_node_t *node, const struct nros_service_type_t *type_info, const char *service_name, const struct nros_qos_t *qos, const struct nros_client_options_t *options)
 
nros_ret_t nros_client_init_with_qos (struct nros_client_t *client, const struct nros_node_t *node, const struct nros_service_type_t *type_info, const char *service_name, const struct nros_qos_t *qos)
 
bool nros_client_is_valid (const struct nros_client_t *client)
 
nros_ret_t nros_client_send_request_async (struct nros_client_t *client, const uint8_t *request_data, size_t request_len)
 
nros_ret_t nros_client_send_request_raw (struct nros_client_t *client, const uint8_t *data, size_t len)
 
nros_ret_t nros_client_server_available (struct nros_client_t *client, int32_t *out)
 
bool nros_client_service_is_ready (const struct nros_client_t *client)
 
nros_ret_t nros_client_set_response_callback (struct nros_client_t *client, nros_response_callback_t callback, void *context)
 
nros_ret_t nros_client_set_timeout (struct nros_client_t *client, uint32_t timeout_ms)
 
nros_ret_t nros_client_set_wake_callback (struct nros_client_t *client, struct nros_wake_state_t *state, void(*cb)(void *), void *ctx)
 
int32_t nros_client_try_recv_reply_raw (struct nros_client_t *client, uint8_t *buf, size_t buf_len)
 
nros_ret_t nros_client_try_recv_response (struct nros_client_t *client, uint8_t *response_data, size_t response_capacity, size_t *response_len)
 
nros_ret_t nros_client_wait_for_service (struct nros_client_t *client, uint32_t timeout_ms)
 
nros_ret_t nros_clock_fini (struct nros_clock_t *clock)
 
nros_ret_t nros_clock_get_now (const struct nros_clock_t *clock, struct nros_time_t *time_out)
 
nros_ret_t nros_clock_get_now_ns (const struct nros_clock_t *clock, int64_t *nanoseconds)
 
enum nros_clock_type_t nros_clock_get_type (const struct nros_clock_t *clock)
 
struct nros_clock_t nros_clock_get_zero_initialized (void)
 
nros_ret_t nros_clock_init (struct nros_clock_t *clock, enum nros_clock_type_t clock_type)
 
bool nros_clock_is_valid (const struct nros_clock_t *clock)
 
nros_ret_t nros_executor_add_client (struct nros_executor_t *executor, struct nros_client_t *client)
 
nros_ret_t nros_executor_bind_handle_to_sched_context (struct nros_executor_t *executor, size_t handle, nros_sched_context_id_t sc_id)
 
nros_ret_t nros_executor_create_sched_context (struct nros_executor_t *executor, const struct nros_sched_context_t *cfg, nros_sched_context_id_t *out_sc_id)
 
nros_ret_t nros_executor_declare_param_string (struct nros_executor_t *executor, const char *name, const char *value)
 
nros_sched_context_id_t nros_executor_default_sched_context_id (void)
 
nros_ret_t nros_executor_fini (struct nros_executor_t *executor)
 
int nros_executor_get_handle_count (const struct nros_executor_t *executor)
 
nros_ret_t nros_executor_get_param_string (struct nros_executor_t *executor, const char *name, char *out_value, size_t max_len)
 
int nros_executor_get_remaining_handles (const struct nros_executor_t *executor)
 
struct nros_executor_t nros_executor_get_zero_initialized (void)
 
bool nros_executor_has_param (struct nros_executor_t *executor, const char *name)
 
nros_ret_t nros_executor_init (struct nros_executor_t *executor, const struct nros_support_t *support, size_t max_handles)
 
bool nros_executor_is_valid (const struct nros_executor_t *executor)
 
nros_ret_t nros_executor_lifecycle_change_state (struct nros_executor_t *executor, uint8_t transition_id)
 
uint8_t nros_executor_lifecycle_get_state (struct nros_executor_t *executor)
 
nros_ret_t nros_executor_lifecycle_register_on_activate (struct nros_executor_t *executor, struct Option_LifecycleCallbackFnCtx cb, void *context)
 
nros_ret_t nros_executor_lifecycle_register_on_cleanup (struct nros_executor_t *executor, struct Option_LifecycleCallbackFnCtx cb, void *context)
 
nros_ret_t nros_executor_lifecycle_register_on_configure (struct nros_executor_t *executor, struct Option_LifecycleCallbackFnCtx cb, void *context)
 
nros_ret_t nros_executor_lifecycle_register_on_deactivate (struct nros_executor_t *executor, struct Option_LifecycleCallbackFnCtx cb, void *context)
 
nros_ret_t nros_executor_lifecycle_register_on_error (struct nros_executor_t *executor, struct Option_LifecycleCallbackFnCtx cb, void *context)
 
nros_ret_t nros_executor_lifecycle_register_on_shutdown (struct nros_executor_t *executor, struct Option_LifecycleCallbackFnCtx cb, void *context)
 
nros_ret_t nros_executor_node_init (struct nros_executor_t *executor, struct nros_node_t *node, const char *name, const struct nros_node_options_t *options)
 
nros_ret_t nros_executor_ping (struct nros_executor_t *executor, int32_t timeout_ms)
 
nros_ret_t nros_executor_register_action_client (struct nros_executor_t *executor, struct nros_action_client_t *client)
 
nros_ret_t nros_executor_register_action_server (struct nros_executor_t *executor, struct nros_action_server_t *server)
 
nros_ret_t nros_executor_register_guard_condition (struct nros_executor_t *executor, struct nros_guard_condition_t *guard)
 
nros_ret_t nros_executor_register_lifecycle_services (struct nros_executor_t *executor)
 
nros_ret_t nros_executor_register_parameter_services (struct nros_executor_t *executor)
 
nros_ret_t nros_executor_register_service (struct nros_executor_t *executor, struct nros_service_t *service)
 
nros_ret_t nros_executor_register_subscription (struct nros_executor_t *executor, struct nros_subscription_t *subscription, enum nros_executor_invocation_t invocation)
 
nros_ret_t nros_executor_register_subscription_raw_with_info (struct nros_executor_t *executor, const struct nros_node_t *node, const char *topic_name, const char *type_name, const char *type_hash, const struct nros_qos_t *qos, nros_subscription_info_callback_t callback, void *context)
 
nros_ret_t nros_executor_register_time_triggered_dispatcher (struct nros_executor_t *executor, uint32_t major_frame_us)
 
nros_ret_t nros_executor_register_timer (struct nros_executor_t *executor, struct nros_timer_t *timer)
 
nros_ret_t nros_executor_set_param_string (struct nros_executor_t *executor, const char *name, const char *value)
 
nros_ret_t nros_executor_set_semantics (struct nros_executor_t *executor, enum nros_executor_semantics_t semantics)
 
nros_ret_t nros_executor_set_timeout (struct nros_executor_t *executor, uint64_t timeout_ns)
 
nros_ret_t nros_executor_set_trigger (struct nros_executor_t *executor, nros_executor_trigger_t trigger, void *context)
 
nros_ret_t nros_executor_spin (struct nros_executor_t *executor)
 
nros_ret_t nros_executor_spin_one_period (struct nros_executor_t *executor, uint64_t period_ns)
 
nros_ret_t nros_executor_spin_period (struct nros_executor_t *executor, uint64_t period_ns)
 
nros_ret_t nros_executor_spin_some (struct nros_executor_t *executor, uint64_t timeout_ns)
 
nros_ret_t nros_executor_stop (struct nros_executor_t *executor)
 
bool nros_executor_trigger_all (const bool *ready, size_t count, void *context)
 
bool nros_executor_trigger_always (const bool *ready, size_t count, void *context)
 
bool nros_executor_trigger_any (const bool *ready, size_t count, void *context)
 
bool nros_executor_trigger_one (const bool *ready, size_t count, void *context)
 
const char * nros_goal_status_to_string (enum nros_goal_status_t status)
 
bool nros_goal_uuid_equal (const struct nros_goal_uuid_t *a, const struct nros_goal_uuid_t *b)
 
nros_ret_t nros_goal_uuid_generate (struct nros_goal_uuid_t *uuid)
 
nros_ret_t nros_guard_condition_clear (struct nros_guard_condition_t *guard)
 
nros_ret_t nros_guard_condition_fini (struct nros_guard_condition_t *guard)
 
struct nros_guard_condition_t nros_guard_condition_get_zero_initialized (void)
 
nros_ret_t nros_guard_condition_init (struct nros_guard_condition_t *guard, const struct nros_support_t *support)
 
bool nros_guard_condition_is_triggered (const struct nros_guard_condition_t *guard)
 
bool nros_guard_condition_is_valid (const struct nros_guard_condition_t *guard)
 
nros_ret_t nros_guard_condition_set_callback (struct nros_guard_condition_t *guard, nros_guard_condition_callback_t callback, void *context)
 
nros_ret_t nros_guard_condition_trigger (struct nros_guard_condition_t *guard)
 
nros_ret_t nros_has_custom_transport (void)
 
size_t nros_heap_peak_bytes (void)
 
size_t nros_heap_platform_used_bytes (void)
 
size_t nros_heap_total_bytes (void)
 
size_t nros_heap_used_bytes (void)
 
nros_ret_t nros_lifecycle_change_state (struct nros_lifecycle_state_machine_t *sm, uint8_t transition_id)
 
nros_ret_t nros_lifecycle_fini (struct nros_lifecycle_state_machine_t *sm)
 
uint8_t nros_lifecycle_get_state (const struct nros_lifecycle_state_machine_t *sm)
 
struct nros_lifecycle_state_machine_t nros_lifecycle_get_zero_initialized (void)
 
nros_ret_t nros_lifecycle_init (struct nros_lifecycle_state_machine_t *sm, const struct nros_node_t *node)
 
nros_ret_t nros_lifecycle_register_on_activate (struct nros_lifecycle_state_machine_t *sm, struct Option_LifecycleCallbackFnCtx cb, void *context)
 
nros_ret_t nros_lifecycle_register_on_cleanup (struct nros_lifecycle_state_machine_t *sm, struct Option_LifecycleCallbackFnCtx cb, void *context)
 
nros_ret_t nros_lifecycle_register_on_configure (struct nros_lifecycle_state_machine_t *sm, struct Option_LifecycleCallbackFnCtx cb, void *context)
 
nros_ret_t nros_lifecycle_register_on_deactivate (struct nros_lifecycle_state_machine_t *sm, struct Option_LifecycleCallbackFnCtx cb, void *context)
 
nros_ret_t nros_lifecycle_register_on_error (struct nros_lifecycle_state_machine_t *sm, struct Option_LifecycleCallbackFnCtx cb, void *context)
 
nros_ret_t nros_lifecycle_register_on_shutdown (struct nros_lifecycle_state_machine_t *sm, struct Option_LifecycleCallbackFnCtx cb, void *context)
 
nros_ret_t nros_make_node_a_lifecycle_node (struct nros_lifecycle_state_machine_t *sm, const struct nros_node_t *node)
 
nros_ret_t nros_node_fini (struct nros_node_t *node)
 
struct nros_node_options_t nros_node_get_default_options (void)
 
const void * nros_node_get_logger (const struct nros_node_t *node)
 
const char * nros_node_get_name (const struct nros_node_t *node)
 
const char * nros_node_get_namespace (const struct nros_node_t *node)
 
struct nros_node_t nros_node_get_zero_initialized (void)
 
nros_ret_t nros_node_init (struct nros_node_t *node, const struct nros_support_t *support, const char *name, const char *namespace_)
 
nros_ret_t nros_node_init_ex (struct nros_node_t *node, const struct nros_support_t *support, const char *name, const struct nros_node_options_t *options)
 
nros_ret_t nros_node_set_qos_overrides (struct nros_node_t *node, const struct nros_qos_override_t *overrides, size_t len)
 
nros_ret_t nros_param_declare_string (struct nros_param_server_t *server, const char *name, const char *default_value)
 
nros_ret_t nros_param_get_string (const struct nros_param_server_t *server, const char *name, char *value, size_t max_len)
 
enum nros_parameter_type_t nros_param_get_type (const struct nros_param_server_t *server, const char *name)
 
bool nros_param_has (const struct nros_param_server_t *server, const char *name)
 
nros_ret_t nros_param_server_fini (struct nros_param_server_t *server)
 
size_t nros_param_server_get_count (const struct nros_param_server_t *server)
 
struct nros_param_server_t nros_param_server_get_zero_initialized (void)
 
nros_ret_t nros_param_server_init (struct nros_param_server_t *server, struct nros_parameter_t *storage, size_t capacity)
 
nros_ret_t nros_param_server_set_callback (struct nros_param_server_t *server, nros_param_callback_t callback, void *context)
 
nros_ret_t nros_param_set_string (struct nros_param_server_t *server, const char *name, const char *value)
 
void * nros_platform_alloc (size_t size)
 
uint64_t nros_platform_clock_us (void)
 
uint32_t nros_platform_critical_section_acquire (void)
 
void nros_platform_critical_section_release (uint32_t token)
 
void nros_platform_dealloc (void *ptr)
 
size_t nros_platform_heap_total_bytes (void)
 
size_t nros_platform_heap_used_bytes (void)
 
void nros_platform_sleep_us (size_t us)
 
nros_ret_t nros_publish_raw (const struct nros_publisher_t *publisher, const uint8_t *data, size_t len)
 
nros_ret_t nros_publisher_assert_liveliness (const struct nros_publisher_t *publisher)
 
nros_ret_t nros_publisher_commit (const struct nros_publisher_t *publisher, void *token, size_t actual_len)
 
nros_ret_t nros_publisher_discard (const struct nros_publisher_t *publisher, void *token)
 
nros_ret_t nros_publisher_fini (struct nros_publisher_t *publisher)
 
struct nros_publisher_options_t nros_publisher_get_default_options (void)
 
const char * nros_publisher_get_topic_name (const struct nros_publisher_t *publisher)
 
struct nros_publisher_t nros_publisher_get_zero_initialized (void)
 
nros_ret_t nros_publisher_init (struct nros_publisher_t *publisher, const struct nros_node_t *node, const struct nros_message_type_t *type_info, const char *topic_name)
 
nros_ret_t nros_publisher_init_with_options (struct nros_publisher_t *publisher, const struct nros_node_t *node, const struct nros_message_type_t *type_info, const char *topic_name, const struct nros_qos_t *qos, const struct nros_publisher_options_t *options)
 
nros_ret_t nros_publisher_init_with_qos (struct nros_publisher_t *publisher, const struct nros_node_t *node, const struct nros_message_type_t *type_info, const char *topic_name, const struct nros_qos_t *qos)
 
bool nros_publisher_is_valid (const struct nros_publisher_t *publisher)
 
nros_ret_t nros_publisher_loan (const struct nros_publisher_t *publisher, size_t requested_len, uint8_t **out_buf, size_t *out_cap, void **out_token)
 
nros_ret_t nros_publisher_publish_streamed (const struct nros_publisher_t *publisher, void(*size_cb)(size_t *out_total_len, void *user_ctx), void(*chunk_cb)(uint8_t *out_buf, size_t cap, size_t *out_written, void *user_ctx), void *user_ctx)
 
nros_ret_t nros_publisher_set_liveliness_lost_callback (struct nros_publisher_t *_pub_, nros_event_publisher_count_cb_t _cb, void *_user_context)
 
nros_ret_t nros_publisher_set_offered_deadline_missed_callback (struct nros_publisher_t *_pub_, uint32_t _deadline_ms, nros_event_publisher_count_cb_t _cb, void *_user_context)
 
nros_ret_t nros_service_fini (struct nros_service_t *service)
 
struct nros_service_options_t nros_service_get_default_options (void)
 
const char * nros_service_get_service_name (const struct nros_service_t *service)
 
struct nros_service_t nros_service_get_zero_initialized (void)
 
nros_ret_t nros_service_init (struct nros_service_t *service, const struct nros_node_t *node, const struct nros_service_type_t *type_info, const char *service_name, nros_service_callback_t callback, void *context)
 
nros_ret_t nros_service_init_polling (struct nros_service_t *service, const struct nros_node_t *node, const struct nros_service_type_t *type_info, const char *service_name)
 
nros_ret_t nros_service_init_with_options (struct nros_service_t *service, const struct nros_node_t *node, const struct nros_service_type_t *type_info, const char *service_name, nros_service_callback_t callback, void *context, const struct nros_qos_t *qos, const struct nros_service_options_t *options)
 
nros_ret_t nros_service_init_with_qos (struct nros_service_t *service, const struct nros_node_t *node, const struct nros_service_type_t *type_info, const char *service_name, nros_service_callback_t callback, void *context, const struct nros_qos_t *qos)
 
bool nros_service_is_valid (const struct nros_service_t *service)
 
nros_ret_t nros_service_send_reply_raw (struct nros_service_t *service, int64_t sequence_number, const uint8_t *data, size_t len)
 
nros_ret_t nros_service_send_response (struct nros_service_t *service, int64_t _sequence_number, const uint8_t *_response_data, size_t _response_len)
 
nros_ret_t nros_service_set_wake_callback (struct nros_service_t *service, struct nros_wake_state_t *state, void(*cb)(void *), void *ctx)
 
nros_ret_t nros_service_take_request (struct nros_service_t *service, uint8_t *_request_data, size_t _request_capacity, size_t *_request_len, int64_t *_sequence_number)
 
int32_t nros_service_try_recv_request_raw (struct nros_service_t *service, uint8_t *buf, size_t buf_len, int64_t *sequence_number)
 
nros_ret_t nros_set_custom_transport (const struct nros_transport_ops_t *ops)
 
int32_t nros_subscription_borrow (struct nros_subscription_t *subscription, const uint8_t **out_buf, size_t *out_len, void **out_token)
 
nros_ret_t nros_subscription_fini (struct nros_subscription_t *subscription)
 
struct nros_subscription_options_t nros_subscription_get_default_options (void)
 
const char * nros_subscription_get_topic_name (const struct nros_subscription_t *subscription)
 
struct nros_subscription_t nros_subscription_get_zero_initialized (void)
 
nros_ret_t nros_subscription_init (struct nros_subscription_t *subscription, const struct nros_node_t *node, const struct nros_message_type_t *type_info, const char *topic_name, nros_subscription_callback_t callback, void *context)
 
nros_ret_t nros_subscription_init_polling (struct nros_subscription_t *subscription, const struct nros_node_t *node, const struct nros_message_type_t *type_info, const char *topic_name)
 
nros_ret_t nros_subscription_init_polling_with_qos (struct nros_subscription_t *subscription, const struct nros_node_t *node, const struct nros_message_type_t *type_info, const char *topic_name, const struct nros_qos_t *qos)
 
nros_ret_t nros_subscription_init_with_options (struct nros_subscription_t *subscription, const struct nros_node_t *node, const struct nros_message_type_t *type_info, const char *topic_name, nros_subscription_callback_t callback, void *context, const struct nros_qos_t *qos, const struct nros_subscription_options_t *options)
 
nros_ret_t nros_subscription_init_with_qos (struct nros_subscription_t *subscription, const struct nros_node_t *node, const struct nros_message_type_t *type_info, const char *topic_name, nros_subscription_callback_t callback, void *context, const struct nros_qos_t *qos)
 
bool nros_subscription_is_valid (const struct nros_subscription_t *subscription)
 
nros_ret_t nros_subscription_release (struct nros_subscription_t *subscription, void *token)
 
nros_ret_t nros_subscription_set_liveliness_changed_callback (struct nros_subscription_t *_sub, nros_event_liveliness_changed_cb_t _cb, void *_user_context)
 
nros_ret_t nros_subscription_set_message_lost_callback (struct nros_subscription_t *_sub, nros_event_subscriber_count_cb_t _cb, void *_user_context)
 
nros_ret_t nros_subscription_set_requested_deadline_missed_callback (struct nros_subscription_t *_sub, uint32_t _deadline_ms, nros_event_subscriber_count_cb_t _cb, void *_user_context)
 
nros_ret_t nros_subscription_set_wake_callback (struct nros_subscription_t *subscription, struct nros_wake_state_t *state, void(*cb)(void *), void *ctx)
 
int32_t nros_subscription_try_recv_raw (struct nros_subscription_t *subscription, uint8_t *buf, size_t buf_len)
 
int32_t nros_subscription_try_recv_sequence (struct nros_subscription_t *subscription, uint8_t *buf, size_t per_msg_cap, size_t max_msgs, size_t *out_lens)
 
int32_t nros_subscription_try_recv_validated (struct nros_subscription_t *subscription, uint8_t *buf, size_t buf_len, struct nros_integrity_status_t *out_status)
 
nros_ret_t nros_support_fini (struct nros_support_t *support)
 
struct nros_support_t nros_support_get_zero_initialized (void)
 
nros_ret_t nros_support_init (struct nros_support_t *support, const char *locator, uint8_t domain_id)
 
nros_ret_t nros_support_init_named (struct nros_support_t *support, const char *locator, uint8_t domain_id, const char *session_name)
 
bool nros_support_is_valid (const struct nros_support_t *support)
 
struct nros_time_t nros_time_add (struct nros_time_t time, struct nros_duration_t duration)
 
int nros_time_compare (struct nros_time_t a, struct nros_time_t b)
 
struct nros_time_t nros_time_from_nanoseconds (int64_t nanoseconds)
 
struct nros_time_t nros_time_sub (struct nros_time_t time, struct nros_duration_t duration)
 
int64_t nros_time_to_nanoseconds (const struct nros_time_t *time)
 
nros_ret_t nros_timer_cancel (struct nros_timer_t *timer)
 
nros_ret_t nros_timer_fini (struct nros_timer_t *timer)
 
uint64_t nros_timer_get_period (const struct nros_timer_t *timer)
 
uint64_t nros_timer_get_time_until_next_call (const struct nros_timer_t *timer, uint64_t current_time_ns)
 
struct nros_timer_t nros_timer_get_zero_initialized (void)
 
nros_ret_t nros_timer_init (struct nros_timer_t *timer, const struct nros_support_t *support, uint64_t period_ns, nros_timer_callback_t callback, void *context)
 
bool nros_timer_is_valid (const struct nros_timer_t *timer)
 
nros_ret_t nros_timer_reset (struct nros_timer_t *timer)
 
struct nros_wake_state_t nros_wake_state_get_zero_initialized (void)
 

Variables

const struct nros_qos_t NROS_QOS_DEFAULT
 
const struct nros_qos_t NROS_QOS_SENSOR_DATA
 
const struct nros_qos_t NROS_QOS_SERVICES
 
const uint32_t NROS_TRANSPORT_OPS_ABI_VERSION_V1
 

Macro Definition Documentation

◆ MAX_RMW_NAME_LEN

#define MAX_RMW_NAME_LEN   32

Maximum length of an RMW backend name (e.g., "zenoh", "cyclonedds", "xrce").

Matches BACKEND_NAME_MAX in nros-rmw-cffi/src/lib.rs. Lifted to a public constant here so nros_node_options_t can declare a fixed-size buffer that round-trips through the registry without truncation.

◆ NROS_DOMAIN_ID_INHERIT

#define NROS_DOMAIN_ID_INHERIT   UINT32_MAX

Sentinel value for domain_id_override. When set, the support context's domain_id is used instead of the per-Node override.

◆ NROS_GENERATED_H

#define NROS_GENERATED_H

◆ NROS_MAX_ACTION_NAME_LEN

#define NROS_MAX_ACTION_NAME_LEN   256

Maximum length of an action name

◆ NROS_MAX_CONCURRENT_GOALS

#define NROS_MAX_CONCURRENT_GOALS   4

Maximum number of concurrent goals per action server.

This is a fixed constant (not configurable via env var) because it affects nros_action_server_t struct layout. Changing it requires rebuilding the runtime and the consuming application together.

◆ NROS_MAX_LOCATOR_LEN

#define NROS_MAX_LOCATOR_LEN   128

Maximum length of a zenoh locator string (e.g., "tcp/127.0.0.1:7447")

◆ NROS_MAX_NAME_LEN

#define NROS_MAX_NAME_LEN   64

Maximum length of a node name

◆ NROS_MAX_NAMESPACE_LEN

#define NROS_MAX_NAMESPACE_LEN   128

Maximum length of a node namespace

◆ NROS_MAX_PARAM_NAME_LEN

#define NROS_MAX_PARAM_NAME_LEN   64

Maximum length of a parameter name

◆ NROS_MAX_PARAM_STRING_LEN

#define NROS_MAX_PARAM_STRING_LEN   128

Maximum length of a string parameter value

◆ NROS_MAX_SERVICE_NAME_LEN

#define NROS_MAX_SERVICE_NAME_LEN   256

Maximum length of a service name

◆ NROS_MAX_TOPIC_LEN

#define NROS_MAX_TOPIC_LEN   256

Maximum length of a topic name

◆ NROS_MAX_TYPE_HASH_LEN

#define NROS_MAX_TYPE_HASH_LEN   128

Maximum length of a type hash (RIHS format)

◆ NROS_MAX_TYPE_NAME_LEN

#define NROS_MAX_TYPE_NAME_LEN   256

Maximum length of a type name (e.g., "std_msgs::msg::dds_::Int32_")

◆ NROS_RET_ALREADY_EXISTS

#define NROS_RET_ALREADY_EXISTS   -5

Resource already exists

◆ NROS_RET_BAD_SEQUENCE

#define NROS_RET_BAD_SEQUENCE   -8

Bad sequence (e.g., wrong order of operations)

◆ NROS_RET_ERROR

#define NROS_RET_ERROR   -1

Generic error

◆ NROS_RET_FULL

#define NROS_RET_FULL   -6

Resource limit reached (e.g., max handles)

◆ NROS_RET_INVALID_ARGUMENT

#define NROS_RET_INVALID_ARGUMENT   -3

Invalid argument passed

◆ NROS_RET_NOT_ALLOWED

#define NROS_RET_NOT_ALLOWED   -12

Operation not allowed (e.g., goal not in correct state)

◆ NROS_RET_NOT_FOUND

#define NROS_RET_NOT_FOUND   -4

Resource not found

◆ NROS_RET_NOT_INIT

#define NROS_RET_NOT_INIT   -7

Not initialized

◆ NROS_RET_OK

#define NROS_RET_OK   0

Success

◆ NROS_RET_PUBLISH_FAILED

#define NROS_RET_PUBLISH_FAILED   -10

Publish failed

◆ NROS_RET_REENTRANT

#define NROS_RET_REENTRANT   -15

Reentrant call detected — a blocking helper (nros_client_call, nros_action_send_goal, nros_action_get_result) was called from inside a dispatch callback. These functions internally call nros_executor_spin_some, which is not reentrant.

◆ NROS_RET_REJECTED

#define NROS_RET_REJECTED   -13

Request was rejected (e.g., goal rejected by server)

◆ NROS_RET_SERVICE_FAILED

#define NROS_RET_SERVICE_FAILED   -9

Service call failed

◆ NROS_RET_SUBSCRIPTION_FAILED

#define NROS_RET_SUBSCRIPTION_FAILED   -11

Subscription failed

◆ NROS_RET_TIMEOUT

#define NROS_RET_TIMEOUT   -2

Timeout occurred

◆ NROS_RET_TRY_AGAIN

#define NROS_RET_TRY_AGAIN   -14

Operation not yet ready (e.g., async response still pending). Caller should spin the executor and try again.

◆ NROS_RET_UNSUPPORTED

#define NROS_RET_UNSUPPORTED   -16

The active backend does not implement this operation. Phase 108 status-event setters return this until backend wiring lands per phase (109+).

Typedef Documentation

◆ nros_accepted_callback_t

typedef void(* nros_accepted_callback_t) (struct nros_action_server_t *server, const struct nros_goal_handle_t *goal, void *context)

Goal accepted callback type.

Invoked after the arena has sent the accept reply to the client. Use this to kick off goal execution.

◆ nros_cancel_callback_t

typedef enum nros_cancel_response_t(* nros_cancel_callback_t) (struct nros_action_server_t *server, const struct nros_goal_handle_t *goal, void *context)

Cancel request callback type.

Invoked when a client requests cancellation of an accepted goal. Return NROS_CANCEL_ACCEPT or NROS_CANCEL_REJECT.

◆ nros_deadline_policy_t

typedef uint8_t nros_deadline_policy_t

◆ nros_event_liveliness_changed_cb_t

typedef void(* nros_event_liveliness_changed_cb_t) (struct nros_subscription_t *sub, struct nros_liveliness_changed_status_t status, void *user_context)

Callback for NROS_EVENT_LIVELINESS_CHANGED.

◆ nros_event_publisher_count_cb_t

typedef void(* nros_event_publisher_count_cb_t) (struct nros_publisher_t *pub_, struct nros_count_status_t status, void *user_context)

Callback for NROS_EVENT_LIVELINESS_LOST, NROS_EVENT_OFFERED_DEADLINE_MISSED (publisher side).

◆ nros_event_subscriber_count_cb_t

typedef void(* nros_event_subscriber_count_cb_t) (struct nros_subscription_t *sub, struct nros_count_status_t status, void *user_context)

Callback for NROS_EVENT_REQUESTED_DEADLINE_MISSED, NROS_EVENT_MESSAGE_LOST (subscriber side).

◆ nros_executor_trigger_t

typedef bool(* nros_executor_trigger_t) (const bool *ready, size_t count, void *context)

Trigger function type for executor.

A trigger function receives a boolean array indicating which handles have data ready, along with the count of handles. It returns true if the executor should process callbacks.

Parameters

  • ready - Pointer to boolean array (one per handle)
  • count - Number of elements in the array
  • context - User-provided context pointer

Returns

  • true if executor should process callbacks
  • false if executor should skip processing

◆ nros_feedback_callback_t

typedef void(* nros_feedback_callback_t) (const struct nros_goal_uuid_t *goal_uuid, const uint8_t *feedback, size_t feedback_len, void *context)

Feedback callback type (for client).

◆ nros_goal_callback_t

typedef enum nros_goal_response_t(* nros_goal_callback_t) (struct nros_action_server_t *server, const struct nros_goal_handle_t *goal, const uint8_t *goal_request, size_t goal_len, void *context)

Goal request callback type.

Invoked when a client sends a new goal. Return NROS_GOAL_REJECT, NROS_GOAL_ACCEPT_AND_EXECUTE, or NROS_GOAL_ACCEPT_AND_DEFER.

◆ nros_goal_response_callback_t

typedef void(* nros_goal_response_callback_t) (const struct nros_goal_uuid_t *goal_uuid, bool accepted, void *context)

Goal response callback type (for async client). Called when the action server accepts or rejects a goal.

◆ nros_guard_condition_callback_t

typedef void(* nros_guard_condition_callback_t) (void *context)

Guard condition callback type.

◆ nros_param_callback_t

typedef bool(* nros_param_callback_t) (const char *name, const struct nros_parameter_t *param, void *context)

Parameter change callback type.

◆ nros_response_callback_t

typedef void(* nros_response_callback_t) (const uint8_t *response, size_t response_len, void *context)

Service-client response callback type (Phase 82).

Invoked by the executor's spin_some dispatch when a previously-sent request has its response delivered. The CDR bytes are owned by the arena entry's reply buffer for the duration of the call — copy if you need to keep them.

◆ nros_result_callback_t

typedef void(* nros_result_callback_t) (const struct nros_goal_uuid_t *goal_uuid, enum nros_goal_status_t status, const uint8_t *result, size_t result_len, void *context)

Result callback type (for client).

◆ nros_ret_t

typedef int nros_ret_t

Return type for nros C API functions.

Compatible with rcl_ret_t for familiarity.

◆ nros_sched_class_t

typedef uint8_t nros_sched_class_t

◆ nros_sched_context_id_t

typedef uint8_t nros_sched_context_id_t

Identifier of a registered scheduling context. 0 is the auto-created default Fifo SC. Mirrors nros_node::executor::sched_context::SchedContextId.

◆ nros_sched_priority_t

typedef uint8_t nros_sched_priority_t

◆ nros_service_callback_t

typedef bool(* nros_service_callback_t) (const uint8_t *request_data, size_t request_len, uint8_t *response_data, size_t response_capacity, size_t *response_len, void *context)

Service server callback function type.

Parameters

  • request_data - Pointer to CDR-serialized request data
  • request_len - Length of request data in bytes
  • response_data - Pointer to buffer for CDR-serialized response
  • response_capacity - Capacity of response buffer
  • response_len - Output: actual length of response data written
  • context - User-provided context pointer

Returns

  • true if the request was handled successfully
  • false if there was an error handling the request

◆ nros_subscription_callback_t

typedef void(* nros_subscription_callback_t) (const uint8_t *data, size_t len, void *context)

Subscription callback function type.

Parameters

  • data - Pointer to received CDR-serialized message data
  • len - Length of data in bytes
  • context - User-provided context pointer

◆ nros_subscription_info_callback_t

typedef void(* nros_subscription_info_callback_t) (const uint8_t *data, size_t len, const uint8_t *attachment, size_t attachment_len, void *context)

Subscription callback that also receives the sample's wire attachment (Phase 189.M3.4 — the C analog of the Rust node.subscription(t).generic(..).message_info() builder path). Used by [nros_executor_register_subscription_raw_with_info].

Parameters

  • data / len — received CDR bytes.
  • attachment / attachment_len — the sample's wire attachment (attachment_len == 0 ⇒ none). Cross-RMW bridges read the bridge_origin tag from it. Valid only during the call.
  • context — user-provided context pointer.

◆ nros_timer_callback_t

typedef void(* nros_timer_callback_t) (struct nros_timer_t *timer, void *context)

Timer callback function type.

Parameters

  • timer - Pointer to the timer that triggered
  • context - User-provided context pointer

◆ Option_LifecycleCallbackFnCtx

Enumeration Type Documentation

◆ nros_action_client_state_t

Action client state.

Enumerator
NROS_ACTION_CLIENT_STATE_UNINITIALIZED 

Not initialized

NROS_ACTION_CLIENT_STATE_INITIALIZED 

L2 callback-mode: initialized via nros_action_client_init; transport creation deferred to nros_executor_register_action_client.

NROS_ACTION_CLIENT_STATE_SHUTDOWN 

Shutdown

NROS_ACTION_CLIENT_STATE_POLLING 

Phase 122.3.c.6.b — L1 polling-mode: ActionClientCore lives inline in _opaque; caller drives via the nros_action_client_*_raw family. No executor registration.

◆ nros_action_server_state_t

Action server state.

Enumerator
NROS_ACTION_SERVER_STATE_UNINITIALIZED 

Not initialized

NROS_ACTION_SERVER_STATE_INITIALIZED 

L2 callback-mode: initialized via nros_action_server_init; transport creation deferred to nros_executor_register_action_server.

NROS_ACTION_SERVER_STATE_SHUTDOWN 

Shutdown

NROS_ACTION_SERVER_STATE_POLLING 

Phase 122.3.c.6.b — L1 polling-mode: ActionServerCore lives inline in _opaque; caller drives via the nros_action_server_*_raw family. No executor registration.

◆ nros_cancel_response_t

Cancel response codes.

Enumerator
NROS_CANCEL_REJECT 

Reject the cancel request

NROS_CANCEL_ACCEPT 

Accept the cancel request

◆ nros_cancel_return_code_t

Phase 122.3.c.6.d — overall cancel-RPC return code. Distinct from the per-goal nros_cancel_response_t (ACCEPT/REJECT) used by the L2 callback path. These four discriminants mirror nros_core::CancelResponse and the action_msgs/srv/CancelGoal wire-CDR return_code field.

Enumerator
NROS_CANCEL_RC_OK 
NROS_CANCEL_RC_REJECTED 
NROS_CANCEL_RC_UNKNOWN_GOAL 
NROS_CANCEL_RC_GOAL_TERMINATED 

◆ nros_client_state_t

Client state

Enumerator
NROS_CLIENT_STATE_UNINITIALIZED 

Not initialized

NROS_CLIENT_STATE_INITIALIZED 

Initialized — metadata stored, not yet registered with an executor.

NROS_CLIENT_STATE_REGISTERED 

Registered with an executor and ready for send_request_async / call.

NROS_CLIENT_STATE_SHUTDOWN 

Shutdown

NROS_CLIENT_STATE_POLLING 

Phase 122.3.c.5 — L1 polling-mode: transport entity lives inline in _opaque; caller drives via nros_client_send_request_raw and nros_client_try_recv_reply_raw. No executor registration.

◆ nros_clock_state_t

Clock state enumeration.

Enumerator
NROS_CLOCK_STATE_UNINITIALIZED 

Not initialized

NROS_CLOCK_STATE_READY 

Initialized and ready

NROS_CLOCK_STATE_SHUTDOWN 

Shutdown

◆ nros_clock_type_t

Clock type enumeration.

Enumerator
NROS_CLOCK_UNINITIALIZED 

Uninitialized clock

NROS_CLOCK_ROS_TIME 

ROS time - follows /clock topic if available, otherwise system time

NROS_CLOCK_SYSTEM_TIME 

System time - wall clock time from the operating system

NROS_CLOCK_STEADY_TIME 

Steady time - monotonic clock, not affected by system time changes

◆ nros_deadline_policy_t

Deadline interpretation policy. Mirrors nros_node::executor::sched_context::DeadlinePolicy.

Enumerator
NROS_DEADLINE_POLICY_RELEASED 
NROS_DEADLINE_POLICY_ACTIVATED 
NROS_DEADLINE_POLICY_INHERITED 

◆ nros_executor_invocation_t

Callback invocation mode

Enumerator
NROS_EXECUTOR_ON_NEW_DATA 

Only invoke callback when new data is available

NROS_EXECUTOR_ALWAYS 

Always invoke callback (even with NULL data)

◆ nros_executor_semantics_t

Executor data communication semantics

Defines when data is taken from DDS during spin operations.

Enumerator
NROS_SEMANTICS_RCLCPP_EXECUTOR 

RCLCPP executor semantics: Data is taken from DDS just before the corresponding callback is called.

NROS_SEMANTICS_LOGICAL_EXECUTION_TIME 

Logical Execution Time (LET) semantics: At one sampling point, new data of all ready subscriptions are taken from DDS. During sequential processing, the data from that sampling point is used. New data arriving after the sampling point is not considered until the next spin iteration.

◆ nros_executor_state_t

Executor state

Enumerator
NROS_EXECUTOR_STATE_UNINITIALIZED 

Not initialized

NROS_EXECUTOR_STATE_INITIALIZED 

Initialized and ready

NROS_EXECUTOR_STATE_SPINNING 

Currently spinning

NROS_EXECUTOR_STATE_SHUTDOWN 

Shutdown

◆ nros_goal_response_t

Goal response codes for goal request handling.

Enumerator
NROS_GOAL_REJECT 

Reject the goal

NROS_GOAL_ACCEPT_AND_EXECUTE 

Accept the goal and start executing immediately

NROS_GOAL_ACCEPT_AND_DEFER 

Accept the goal but defer execution

◆ nros_goal_status_t

Goal status enumeration.

Compatible with action_msgs/msg/GoalStatus values.

Enumerator
NROS_GOAL_STATUS_UNKNOWN 

Goal state is unknown

NROS_GOAL_STATUS_ACCEPTED 

Goal was accepted and is pending execution

NROS_GOAL_STATUS_EXECUTING 

Goal is currently being executed

NROS_GOAL_STATUS_CANCELING 

Goal is being canceled

NROS_GOAL_STATUS_SUCCEEDED 

Goal completed successfully

NROS_GOAL_STATUS_CANCELED 

Goal was canceled

NROS_GOAL_STATUS_ABORTED 

Goal was aborted (failed)

◆ nros_guard_condition_state_t

Guard condition state.

Enumerator
NROS_GUARD_CONDITION_STATE_UNINITIALIZED 

Not initialized

NROS_GUARD_CONDITION_STATE_INITIALIZED 

Initialized and ready

NROS_GUARD_CONDITION_STATE_SHUTDOWN 

Shutdown

◆ nros_node_state_t

Node state

Enumerator
NROS_NODE_STATE_UNINITIALIZED 

Not initialized

NROS_NODE_STATE_INITIALIZED 

Initialized and ready

NROS_NODE_STATE_SHUTDOWN 

Shutdown

◆ nros_param_server_state_t

Parameter server state.

Enumerator
NROS_PARAM_SERVER_STATE_UNINITIALIZED 

Not initialized

NROS_PARAM_SERVER_STATE_READY 

Initialized and ready

NROS_PARAM_SERVER_STATE_SHUTDOWN 

Shutdown

◆ nros_parameter_type_t

Parameter type enumeration.

Enumerator
NROS_PARAMETER_NOT_SET 

Parameter not set

NROS_PARAMETER_BOOL 

Boolean parameter

NROS_PARAMETER_INTEGER 

64-bit signed integer parameter

NROS_PARAMETER_DOUBLE 

64-bit floating point parameter

NROS_PARAMETER_STRING 

String parameter

NROS_PARAMETER_BYTE_ARRAY 

Byte array parameter

NROS_PARAMETER_BOOL_ARRAY 

Boolean array parameter

NROS_PARAMETER_INTEGER_ARRAY 

Integer array parameter

NROS_PARAMETER_DOUBLE_ARRAY 

Double array parameter

NROS_PARAMETER_STRING_ARRAY 

String array parameter

◆ nros_publisher_state_t

Publisher state

Enumerator
NROS_PUBLISHER_STATE_UNINITIALIZED 

Not initialized

NROS_PUBLISHER_STATE_INITIALIZED 

Initialized and ready

NROS_PUBLISHER_STATE_SHUTDOWN 

Shutdown

◆ nros_qos_durability_t

QoS durability policy

Enumerator
NROS_QOS_DURABILITY_VOLATILE 

Volatile - no persistence

NROS_QOS_DURABILITY_TRANSIENT_LOCAL 

Transient local - persist for late joiners

◆ nros_qos_history_t

QoS history policy

Enumerator
NROS_QOS_HISTORY_KEEP_LAST 

Keep last N samples

NROS_QOS_HISTORY_KEEP_ALL 

Keep all samples

◆ nros_qos_liveliness_t

QoS liveliness policy. Phase 109 — matches DDS LIVELINESS.

Enumerator
NROS_QOS_LIVELINESS_NONE 

No liveliness assertion or tracking.

NROS_QOS_LIVELINESS_AUTOMATIC 

Backend's keepalive task asserts liveliness automatically.

NROS_QOS_LIVELINESS_MANUAL_BY_TOPIC 

Application calls assert_liveliness() per topic explicitly.

NROS_QOS_LIVELINESS_MANUAL_BY_NODE 

Application calls assert_liveliness() at the node level.

◆ nros_qos_reliability_t

QoS reliability policy

Enumerator
NROS_QOS_RELIABILITY_BEST_EFFORT 

Best effort delivery - no guarantees

NROS_QOS_RELIABILITY_RELIABLE 

Reliable delivery - retransmit if needed

◆ nros_sched_class_t

Scheduling class — picks the runtime queue + selection policy. Mirrors nros_node::executor::sched_context::SchedClass.

Enumerator
NROS_SCHED_CLASS_FIFO 
NROS_SCHED_CLASS_EDF 
NROS_SCHED_CLASS_SPORADIC 
NROS_SCHED_CLASS_BEST_EFFORT 
NROS_SCHED_CLASS_TIME_TRIGGERED 

◆ nros_sched_priority_t

Criticality bucket. Lower numeric value = higher priority. Mirrors nros_node::executor::sched_context::Priority.

Enumerator
NROS_SCHED_PRIORITY_CRITICAL 
NROS_SCHED_PRIORITY_NORMAL 
NROS_SCHED_PRIORITY_BEST_EFFORT 

◆ nros_service_state_t

Service server state

Enumerator
NROS_SERVICE_STATE_UNINITIALIZED 

Not initialized

NROS_SERVICE_STATE_INITIALIZED 

L2 callback-mode: initialized via nros_service_init, transport creation deferred to nros_executor_register_service.

NROS_SERVICE_STATE_SHUTDOWN 

Shutdown

NROS_SERVICE_STATE_POLLING 

Phase 122.3.c.4 — L1 polling-mode: transport entity lives inline in _opaque; caller drains via nros_service_try_recv_request_raw and replies via nros_service_send_reply_raw. No executor registration.

◆ nros_subscription_state_t

Subscription state

Enumerator
NROS_SUBSCRIPTION_STATE_UNINITIALIZED 

Not initialized

NROS_SUBSCRIPTION_STATE_INITIALIZED 

Initialized for callback dispatch (Layer 2). Subscriber entity creation is deferred to nros_executor_register_subscription.

NROS_SUBSCRIPTION_STATE_SHUTDOWN 

Shutdown

NROS_SUBSCRIPTION_STATE_POLLING 

Phase 122.3.b — initialized for primitive-mode polling (Layer 1). Subscriber entity created at init time and stored inline in _opaque; caller drains via nros_subscription_try_recv_raw. No executor registration.

◆ nros_support_state_t

Support context state

Enumerator
NROS_SUPPORT_STATE_UNINITIALIZED 

Not initialized

NROS_SUPPORT_STATE_INITIALIZED 

Initialized and ready

NROS_SUPPORT_STATE_SHUTDOWN 

Shutdown

◆ nros_timer_state_t

Timer state

Enumerator
NROS_TIMER_STATE_UNINITIALIZED 

Not initialized

NROS_TIMER_STATE_RUNNING 

Initialized and running

NROS_TIMER_STATE_CANCELED 

Initialized but canceled

NROS_TIMER_STATE_SHUTDOWN 

Shutdown

Function Documentation

◆ nros_action_abort()

nros_ret_t nros_action_abort ( struct nros_action_server_t server,
const struct nros_goal_handle_t goal,
const uint8_t *  result,
size_t  result_len 
)

Mark a goal as aborted with an optional result.

Delegates to ActionServerRawHandle::complete_goal_raw.

◆ nros_action_cancel_goal()

nros_ret_t nros_action_cancel_goal ( struct nros_action_client_t client,
const struct nros_goal_uuid_t goal_uuid 
)

Request cancellation of a goal.

◆ nros_action_canceled()

nros_ret_t nros_action_canceled ( struct nros_action_server_t server,
const struct nros_goal_handle_t goal,
const uint8_t *  result,
size_t  result_len 
)

Mark a goal as canceled with an optional result.

Delegates to ActionServerRawHandle::complete_goal_raw.

◆ nros_action_client_action_server_is_ready()

bool nros_action_client_action_server_is_ready ( const struct nros_action_client_t client,
struct nros_executor_t executor 
)

Non-blocking snapshot of action-server visibility. Mirrors rclcpp_action::Client::action_server_is_ready. Takes executor for the same reason as [nros_action_client_wait_for_action_server].

◆ nros_action_client_fini()

nros_ret_t nros_action_client_fini ( struct nros_action_client_t client)

Finalize an action client.

◆ nros_action_client_get_default_options()

struct nros_action_client_options_t nros_action_client_get_default_options ( void  )

Get a zero-initialised [nros_action_client_options_t] (sched_context = 0).

◆ nros_action_client_get_zero_initialized()

struct nros_action_client_t nros_action_client_get_zero_initialized ( void  )

Get a zero-initialized action client.

◆ nros_action_client_init()

nros_ret_t nros_action_client_init ( struct nros_action_client_t client,
const struct nros_node_t node,
const char *  action_name,
const struct nros_action_type_t type_info 
)

Initialize an action client.

◆ nros_action_client_init_polling()

nros_ret_t nros_action_client_init_polling ( struct nros_action_client_t client,
const struct nros_node_t node,
const struct nros_action_type_t type_info,
const char *  action_name 
)

Phase 122.3.c.6.b — initialize an L1 polling-mode action client.

Creates the 4 transport channels (3 service clients + feedback subscriber) immediately and stores the ActionClientCore inline in _opaque. The caller drives the goal lifecycle via:

  • nros_action_client_send_goal_raw — start a new goal; returns the generated 16-byte UUID.
  • nros_action_client_try_recv_goal_response_raw — poll for the send_goal RPC reply (accepted / rejected).
  • nros_action_client_send_get_result_request_raw + _try_recv_result_raw — fetch the terminal result.
  • nros_action_client_send_cancel_request_raw + _try_recv_cancel_response_raw — cancel a goal.
  • nros_action_client_try_recv_feedback_raw — drain feedback.

Safety

All pointers must be valid; action_name must be a valid null-terminated string.

◆ nros_action_client_init_with_options()

nros_ret_t nros_action_client_init_with_options ( struct nros_action_client_t client,
const struct nros_node_t node,
const char *  action_name,
const struct nros_action_type_t type_info,
const struct nros_action_client_options_t options 
)

Phase 189.M3.3.b — initialize an action client with named options. Like [nros_action_client_init] except a non-zero options->sched_context is stashed so [nros_executor_register_action_client] binds the resulting executor handle to that scheduling context once known.

Safety

All non-NULL pointers must be valid + the node initialized; options may be NULL.

◆ nros_action_client_poll()

nros_ret_t nros_action_client_poll ( struct nros_action_client_t client)

Poll the action client for pending async replies (non-blocking).

Note: In the unified design (77.6+), nros_executor_spin_some already dispatches action_client_raw_try_process which invokes callbacks. This function is provided for manual polling outside the executor loop.

Safety

client must be a valid pointer.

◆ nros_action_client_send_cancel_request_raw()

nros_ret_t nros_action_client_send_cancel_request_raw ( struct nros_action_client_t client,
const uint8_t(*)  goal_id[16] 
)

Phase 122.3.c.6.b — L1 polling: send a cancel request.

◆ nros_action_client_send_get_result_request_raw()

nros_ret_t nros_action_client_send_get_result_request_raw ( struct nros_action_client_t client,
const uint8_t(*)  goal_id[16] 
)

Phase 122.3.c.6.b — L1 polling: send a get_result request for the given goal. Reply lands via _try_recv_result_raw.

◆ nros_action_client_send_goal_raw()

nros_ret_t nros_action_client_send_goal_raw ( struct nros_action_client_t client,
const uint8_t *  goal_cdr,
size_t  goal_len,
uint8_t(*)  goal_id_out[16] 
)

Phase 122.3.c.6.b — L1 polling: send a goal. Writes the generated 16-byte UUID into goal_id_out. Poll for the accept/reject reply via nros_action_client_try_recv_goal_response_raw.

◆ nros_action_client_set_cancel_response_wake_callback()

nros_ret_t nros_action_client_set_cancel_response_wake_callback ( struct nros_action_client_t client,
struct nros_wake_state_t state,
void(*)(void *)  cb,
void *  ctx 
)

Phase 122.3.c.6.e — wake on the cancel-reply channel.

◆ nros_action_client_set_feedback_callback()

nros_ret_t nros_action_client_set_feedback_callback ( struct nros_action_client_t client,
nros_feedback_callback_t  callback,
void *  context 
)

Set feedback callback.

◆ nros_action_client_set_feedback_wake_callback()

nros_ret_t nros_action_client_set_feedback_wake_callback ( struct nros_action_client_t client,
struct nros_wake_state_t state,
void(*)(void *)  cb,
void *  ctx 
)

Phase 122.3.c.6.e — wake on the feedback channel.

◆ nros_action_client_set_goal_response_callback()

nros_ret_t nros_action_client_set_goal_response_callback ( struct nros_action_client_t client,
nros_goal_response_callback_t  callback,
void *  context 
)

Set the goal response callback for async goal sending.

Called during nros_executor_spin_some when the server accepts or rejects a goal sent via nros_action_send_goal_async.

Safety

client must be valid.

◆ nros_action_client_set_goal_response_wake_callback()

nros_ret_t nros_action_client_set_goal_response_wake_callback ( struct nros_action_client_t client,
struct nros_wake_state_t state,
void(*)(void *)  cb,
void *  ctx 
)

Phase 122.3.c.6.e — register a C wake callback on the send_goal-reply channel of an L1 polling-mode action client.

◆ nros_action_client_set_result_callback()

nros_ret_t nros_action_client_set_result_callback ( struct nros_action_client_t client,
nros_result_callback_t  callback,
void *  context 
)

Set result callback.

◆ nros_action_client_set_result_wake_callback()

nros_ret_t nros_action_client_set_result_wake_callback ( struct nros_action_client_t client,
struct nros_wake_state_t state,
void(*)(void *)  cb,
void *  ctx 
)

Phase 122.3.c.6.e — wake on the get_result-reply channel.

◆ nros_action_client_try_recv_cancel_response_raw()

int32_t nros_action_client_try_recv_cancel_response_raw ( struct nros_action_client_t client,
uint8_t *  buf,
size_t  buf_len 
)

Phase 122.3.c.6.c — L1 polling: try to receive the cancel-RPC reply. Returns 0 when no reply yet, >0 bytes copied into buf, negative on error.

◆ nros_action_client_try_recv_feedback_raw()

int32_t nros_action_client_try_recv_feedback_raw ( struct nros_action_client_t client,
uint8_t *  buf,
size_t  buf_len,
uint8_t(*)  goal_id_out[16] 
)

Phase 122.3.c.6.b — L1 polling: try to receive feedback for any goal. Returns 0 when no feedback yet, >0 bytes copied (with goal_id_out filled), negative on error.

◆ nros_action_client_try_recv_goal_response_raw()

int32_t nros_action_client_try_recv_goal_response_raw ( struct nros_action_client_t client,
uint8_t *  buf,
size_t  buf_len 
)

Phase 122.3.c.6.b — L1 polling: try to receive a send_goal reply (the accept/reject response). Returns 0 when no reply yet, >0 bytes when one was copied into buf, negative on error.

◆ nros_action_client_try_recv_result_raw()

int32_t nros_action_client_try_recv_result_raw ( struct nros_action_client_t client,
uint8_t *  buf,
size_t  buf_len 
)

Phase 122.3.c.6.b — L1 polling: try to receive a get_result reply. Returns 0 when no reply yet, >0 bytes copied, negative on error.

◆ nros_action_client_wait_for_action_server()

nros_ret_t nros_action_client_wait_for_action_server ( struct nros_action_client_t client,
struct nros_executor_t executor,
uint32_t  timeout_ms 
)

Block until the action server's send-goal queryable is discoverable on the network, or timeout_ms elapses.

Mirrors rclcpp_action::Client::wait_for_action_server and the the underlying ActionClient::wait_for_action_server. Internally probes the action's send_goal service-server liveliness keyexpr (the goal queryable is the load-bearing entity for the first nros_action_send_goal call) via the same primitive as the service-client equivalent. See packages/core/nros-c/src/service.rsnros_client_wait_for_service for the re-probe rationale.

Returns

  • NROS_RET_OK — server visible.
  • NROS_RET_TIMEOUTtimeout_ms elapsed without seeing a token.
  • NROS_RET_NOT_INIT — client not registered with an executor.
  • NROS_RET_ERROR — transport-level failure.

◆ nros_action_execute()

nros_ret_t nros_action_execute ( struct nros_action_server_t server,
const struct nros_goal_handle_t goal 
)

Execute a goal (transition to Executing).

Idempotent: delegates to ActionServerRawHandle::set_goal_status which is a no-op if the goal isn't in the active-goals vector. Returns NROS_RET_OK on success, NROS_RET_NOT_INIT if the server isn't registered.

◆ nros_action_get_goal_status()

nros_ret_t nros_action_get_goal_status ( const struct nros_action_server_t server,
const struct nros_goal_handle_t goal,
enum nros_goal_status_t status 
)

Look up a goal's current status in the arena by UUID.

Returns NROS_RET_OK and writes the arena-sourced status on success. Returns NROS_RET_NOT_FOUND if the arena has already retired the goal (completed + result delivered, or cancelled + acknowledged).

This is the authoritative successor to the removed goal->status field: lifecycle transitions are driven by ActionServerArenaEntry::active_goals and read back through this function.

◆ nros_action_get_result()

nros_ret_t nros_action_get_result ( struct nros_action_client_t client,
struct nros_executor_t executor,
const struct nros_goal_uuid_t goal_uuid,
enum nros_goal_status_t status,
uint8_t *  result,
size_t  result_capacity,
size_t *  result_len 
)

Request result of a goal (blocking convenience).

Calls nros_action_get_result_async then spins the executor until the result arrives or timeout. Never calls zpico_get directly.

◆ nros_action_get_result_async()

nros_ret_t nros_action_get_result_async ( struct nros_action_client_t client,
const struct nros_goal_uuid_t goal_uuid 
)

Request a goal result asynchronously (non-blocking).

Sends the get_result request and returns immediately. The result arrives via the result_callback registered with nros_action_client_set_result_callback, invoked during nros_executor_spin_some.

Safety

All pointers must be valid.

◆ nros_action_publish_feedback()

nros_ret_t nros_action_publish_feedback ( struct nros_action_server_t server,
const struct nros_goal_handle_t goal,
const uint8_t *  feedback,
size_t  feedback_len 
)

Publish feedback for an active goal.

Delegates to ActionServerRawHandle::publish_feedback_raw; the arena enforces goal liveness and is the sole source of truth for lifecycle state.

◆ nros_action_send_goal()

nros_ret_t nros_action_send_goal ( struct nros_action_client_t client,
struct nros_executor_t executor,
const uint8_t *  goal,
size_t  goal_len,
struct nros_goal_uuid_t goal_uuid 
)

Send a goal request. Send a goal (blocking convenience).

Calls nros_action_send_goal_async then spins the executor until the goal is accepted/rejected or timeout. Never calls zpico_get directly — all I/O is driven by the executor's spin_once.

Like the runtime's Promise::wait, this is syntactic sugar over async + spin.

◆ nros_action_send_goal_async()

nros_ret_t nros_action_send_goal_async ( struct nros_action_client_t client,
const uint8_t *  goal,
size_t  goal_len,
struct nros_goal_uuid_t goal_uuid 
)

Send a goal asynchronously (non-blocking).

Sends the goal request and returns immediately. The goal response (accepted/rejected) arrives via the goal_response_callback registered with nros_action_client_set_goal_response_callback, invoked during nros_executor_spin_some.

The goal_uuid output is filled with the generated goal UUID on success.

Safety

All pointers must be valid. goal must point to goal_len bytes of CDR-serialized goal data (with CDR header).

◆ nros_action_server_accept_goal_raw()

nros_ret_t nros_action_server_accept_goal_raw ( struct nros_action_server_t server,
const uint8_t(*)  goal_id[16],
int64_t  sequence_number 
)

Phase 122.3.c.6.b — L1 polling: accept a goal received via try_recv_goal_request_raw.

◆ nros_action_server_active_goal_count_raw()

int32_t nros_action_server_active_goal_count_raw ( struct nros_action_server_t server)

Phase 122.3.c.6.b — L1 polling: get the number of active goals.

◆ nros_action_server_complete_goal_raw()

nros_ret_t nros_action_server_complete_goal_raw ( struct nros_action_server_t server,
const uint8_t(*)  goal_id[16],
enum nros_goal_status_t  status,
const uint8_t *  result_cdr,
size_t  result_len 
)

Phase 122.3.c.6.b — L1 polling: mark a goal terminal.

status must be one of SUCCEEDED / ABORTED / CANCELED. result_cdr is the CDR-encoded <Action>_Result_ payload (the core handles the status wrapper before storing in the slab).

◆ nros_action_server_fini()

nros_ret_t nros_action_server_fini ( struct nros_action_server_t server)

Finalize an action server.

◆ nros_action_server_get_active_goal_count()

size_t nros_action_server_get_active_goal_count ( const struct nros_action_server_t server)

Get the number of currently active goals.

Reads from the arena via ActionServerRawHandle::active_goal_count. Returns 0 if the server isn't registered or has been finalised.

◆ nros_action_server_get_default_options()

struct nros_action_server_options_t nros_action_server_get_default_options ( void  )

Get a zero-initialised [nros_action_server_options_t] (sched_context = 0).

◆ nros_action_server_get_zero_initialized()

struct nros_action_server_t nros_action_server_get_zero_initialized ( void  )

Get a zero-initialized action server.

improper_ctypes_definitions is silenced because the inline opaque handle stores a function-pointer field whose parameter signature references a runtime-internal type. The pointer itself is C-ABI safe; the C API never lets callers invoke through it directly.

◆ nros_action_server_init()

nros_ret_t nros_action_server_init ( struct nros_action_server_t server,
const struct nros_node_t node,
const char *  action_name,
const struct nros_action_type_t type_info,
nros_goal_callback_t  goal_callback,
nros_cancel_callback_t  cancel_callback,
nros_accepted_callback_t  accepted_callback,
void *  context 
)

Initialize an action server.

Stores metadata (name, type, callbacks). RMW entity creation is deferred to nros_executor_register_action_server().

◆ nros_action_server_init_polling()

nros_ret_t nros_action_server_init_polling ( struct nros_action_server_t server,
const struct nros_node_t node,
const struct nros_action_type_t type_info,
const char *  action_name 
)

Phase 122.3.c.6.b — initialize an L1 polling-mode action server.

Creates the 5 transport channels immediately and stores the ActionServerCore inline in _opaque. The caller drives the goal lifecycle via:

  • nros_action_server_try_recv_goal_request_raw — poll for new goal requests (returns goal_id + sequence + payload).
  • nros_action_server_accept_goal_raw / _reject_goal_raw — reply to the send_goal RPC.
  • nros_action_server_publish_feedback_raw — push feedback.
  • nros_action_server_complete_goal_raw — terminate (SUCCEEDED / ABORTED / CANCELED).
  • nros_action_server_try_handle_cancel_raw / _try_handle_get_result_raw — service cancel / get_result RPCs.

Safety

All pointers must be valid; action_name must be a valid null-terminated string.

◆ nros_action_server_init_with_options()

nros_ret_t nros_action_server_init_with_options ( struct nros_action_server_t server,
const struct nros_node_t node,
const char *  action_name,
const struct nros_action_type_t type_info,
nros_goal_callback_t  goal_callback,
nros_cancel_callback_t  cancel_callback,
nros_accepted_callback_t  accepted_callback,
void *  context,
const struct nros_qos_t qos,
const struct nros_action_server_options_t options 
)

Phase 189.M3.3.b — initialize an action server with custom QoS + named options. Like [nros_action_server_init_with_qos] except a non-zero options->sched_context is stashed so [nros_executor_register_action_server] binds the resulting executor handle to that scheduling context once known.

Safety

All non-NULL pointers must be valid + the node initialized; qos / options may be NULL.

◆ nros_action_server_init_with_qos()

nros_ret_t nros_action_server_init_with_qos ( struct nros_action_server_t server,
const struct nros_node_t node,
const char *  action_name,
const struct nros_action_type_t type_info,
nros_goal_callback_t  goal_callback,
nros_cancel_callback_t  cancel_callback,
nros_accepted_callback_t  accepted_callback,
void *  context,
const struct nros_qos_t qos 
)

Phase 193.4b — initialize an action server with an explicit QoS profile (rclc's _with_options). The profile applies to the three underlying service servers (send_goal / cancel_goal / get_result); the feedback + status publishers keep their own profiles. qos NULL ⇒ the services default. Same as [nros_action_server_init] otherwise.

Safety

All non-NULL pointers must be valid + the node initialized.

◆ nros_action_server_publish_feedback_raw()

nros_ret_t nros_action_server_publish_feedback_raw ( struct nros_action_server_t server,
const uint8_t(*)  goal_id[16],
const uint8_t *  feedback_cdr,
size_t  feedback_len 
)

Phase 122.3.c.6.b — L1 polling: publish a feedback message.

feedback_cdr is the CDR-encoded <Action>_Feedback_ payload (without the goal_id prefix — the core wraps it).

◆ nros_action_server_reject_goal_raw()

nros_ret_t nros_action_server_reject_goal_raw ( struct nros_action_server_t server,
int64_t  sequence_number 
)

Phase 122.3.c.6.b — L1 polling: reject a goal received via try_recv_goal_request_raw.

◆ nros_action_server_send_cancel_reply_raw()

nros_ret_t nros_action_server_send_cancel_reply_raw ( struct nros_action_server_t server,
int64_t  sequence_number,
enum nros_cancel_return_code_t  return_code,
const uint8_t(*)  accepted[16],
size_t  accepted_count 
)

Phase 122.3.c.6.d — L1 polling: reply to a cancel-goal request previously peeked via _try_recv_cancel_request_raw. accepted points to accepted_count goal-ID byte arrays that will transition to CANCELING. Pass an empty list (accepted=NULL, accepted_count=0) with return_code=NROS_CANCEL_RC_REJECTED to refuse the request entirely.

◆ nros_action_server_set_cancel_wake_callback()

nros_ret_t nros_action_server_set_cancel_wake_callback ( struct nros_action_server_t server,
struct nros_wake_state_t state,
void(*)(void *)  cb,
void *  ctx 
)

Phase 122.3.c.6.e — register a C wake callback on the cancel_goal channel of an L1 polling-mode action server. The primary use case from the .c.6.e design discussion — RTOS / event-driven cancel handling.

◆ nros_action_server_set_get_result_wake_callback()

nros_ret_t nros_action_server_set_get_result_wake_callback ( struct nros_action_server_t server,
struct nros_wake_state_t state,
void(*)(void *)  cb,
void *  ctx 
)

Phase 122.3.c.6.e — register a C wake callback on the get_result channel of an L1 polling-mode action server.

◆ nros_action_server_set_goal_wake_callback()

nros_ret_t nros_action_server_set_goal_wake_callback ( struct nros_action_server_t server,
struct nros_wake_state_t state,
void(*)(void *)  cb,
void *  ctx 
)

Phase 122.3.c.6.e — register a C wake callback on the send_goal channel of an L1 polling-mode action server. state is a caller-owned nros_wake_state_t that must outlive the server and not move.

◆ nros_action_server_try_handle_get_result_raw()

int32_t nros_action_server_try_handle_get_result_raw ( struct nros_action_server_t server,
const uint8_t *  default_result_cdr,
size_t  default_result_len 
)

Phase 122.3.c.6.b — L1 polling: serve a pending get_result query.

default_result_cdr is the default serialized result (without status byte / CDR header) returned to the client when no complete_goal_raw has been called for the queried goal yet.

Returns 0 when no query is pending; 1 when one was served; negative nros_ret_t on error.

◆ nros_action_server_try_recv_cancel_request_raw()

int32_t nros_action_server_try_recv_cancel_request_raw ( struct nros_action_server_t server,
uint8_t(*)  goal_id_out[16],
int64_t *  sequence_number_out,
enum nros_goal_status_t current_status_out 
)

Phase 122.3.c.6.d — L1 polling: peek a pending cancel-goal request. Writes the named goal_id, the matching service sequence number, and the goal's current status (matches the nros_goal_status_t discriminants — pass it back unchanged).

Returns 1 when a request was peeked, 0 when none pending, negative nros_ret_t on error.

After a successful peek, call nros_action_server_send_cancel_reply_raw with the recorded sequence_number and the list of goals to accept-cancel.

◆ nros_action_server_try_recv_goal_request_raw()

int32_t nros_action_server_try_recv_goal_request_raw ( struct nros_action_server_t server,
uint8_t *  buf,
size_t  buf_len,
uint8_t(*)  goal_id_out[16],
int64_t *  sequence_number_out 
)

Phase 122.3.c.6.b — L1 polling: try to receive a goal request.

On success writes the goal payload bytes (already stripped of CDR framing) into buf, returns the number of bytes copied (>= 0), and fills goal_id_out (16 bytes) + sequence_number_out. Use the sequence number with nros_action_server_accept_goal_raw / _reject_goal_raw.

Returns 0 when no request is pending; negative nros_ret_t on error.

◆ nros_action_succeed()

nros_ret_t nros_action_succeed ( struct nros_action_server_t server,
const struct nros_goal_handle_t goal,
const uint8_t *  result,
size_t  result_len 
)

Mark a goal as succeeded with a result.

Delegates to ActionServerRawHandle::complete_goal_raw; the arena owns the active-goals vector and retires the goal there.

◆ nros_action_try_recv_feedback()

nros_ret_t nros_action_try_recv_feedback ( struct nros_action_client_t client)

Try to receive feedback for an active goal (non-blocking).

If feedback is available, invokes the feedback callback (if set). Returns NROS_RET_OK if feedback was received and dispatched, NROS_RET_TIMEOUT if no feedback is available.

◆ nros_cdr_read_bool()

int32_t nros_cdr_read_bool ( const uint8_t **  ptr,
const uint8_t *  end,
const uint8_t *  origin,
bool *  value 
)

Read a CDR-encoded bool (1 byte) into *value and advance the cursor.

Returns 0 on success, -1 if the cursor would overrun end, the payload is malformed, or any pointer is null.

◆ nros_cdr_read_f32()

int32_t nros_cdr_read_f32 ( const uint8_t **  ptr,
const uint8_t *  end,
const uint8_t *  origin,
float *  value 
)

Read a CDR-encoded IEEE-754 float into *value.

◆ nros_cdr_read_f64()

int32_t nros_cdr_read_f64 ( const uint8_t **  ptr,
const uint8_t *  end,
const uint8_t *  origin,
double *  value 
)

Read a CDR-encoded IEEE-754 double into *value.

◆ nros_cdr_read_i16()

int32_t nros_cdr_read_i16 ( const uint8_t **  ptr,
const uint8_t *  end,
const uint8_t *  origin,
int16_t *  value 
)

Read a CDR-encoded int16_t into *value.

◆ nros_cdr_read_i32()

int32_t nros_cdr_read_i32 ( const uint8_t **  ptr,
const uint8_t *  end,
const uint8_t *  origin,
int32_t *  value 
)

Read a CDR-encoded int32_t into *value.

◆ nros_cdr_read_i64()

int32_t nros_cdr_read_i64 ( const uint8_t **  ptr,
const uint8_t *  end,
const uint8_t *  origin,
int64_t *  value 
)

Read a CDR-encoded int64_t into *value.

◆ nros_cdr_read_i8()

int32_t nros_cdr_read_i8 ( const uint8_t **  ptr,
const uint8_t *  end,
const uint8_t *  origin,
int8_t *  value 
)

Read a CDR-encoded int8_t into *value and advance the cursor.

◆ nros_cdr_read_string()

int32_t nros_cdr_read_string ( const uint8_t **  ptr,
const uint8_t *  end,
const uint8_t *  origin,
char *  value,
size_t  max_len 
)

Read a CDR string into a fixed-size C buffer. Fails if the encoded length exceeds max_len. Always null-terminates the output on success.

◆ nros_cdr_read_u16()

int32_t nros_cdr_read_u16 ( const uint8_t **  ptr,
const uint8_t *  end,
const uint8_t *  origin,
uint16_t *  value 
)

Read a CDR-encoded uint16_t (2-byte aligned) into *value.

◆ nros_cdr_read_u32()

int32_t nros_cdr_read_u32 ( const uint8_t **  ptr,
const uint8_t *  end,
const uint8_t *  origin,
uint32_t *  value 
)

Read a CDR-encoded uint32_t (4-byte aligned) into *value.

◆ nros_cdr_read_u64()

int32_t nros_cdr_read_u64 ( const uint8_t **  ptr,
const uint8_t *  end,
const uint8_t *  origin,
uint64_t *  value 
)

Read a CDR-encoded uint64_t (8-byte aligned) into *value.

◆ nros_cdr_read_u8()

int32_t nros_cdr_read_u8 ( const uint8_t **  ptr,
const uint8_t *  end,
const uint8_t *  origin,
uint8_t *  value 
)

Read a CDR-encoded uint8_t into *value and advance the cursor. See [nros_cdr_read_bool] for the buffer contract.

◆ nros_cdr_write_bool()

int32_t nros_cdr_write_bool ( uint8_t **  ptr,
const uint8_t *  end,
const uint8_t *  origin,
bool  value 
)

Write a CDR-encoded bool (1 byte) and advance the cursor.

Returns 0 on success, -1 if the cursor would overrun end or any pointer is null.

◆ nros_cdr_write_f32()

int32_t nros_cdr_write_f32 ( uint8_t **  ptr,
const uint8_t *  end,
const uint8_t *  origin,
float  value 
)

Write a CDR-encoded IEEE-754 float (4-byte aligned) and advance the cursor.

◆ nros_cdr_write_f64()

int32_t nros_cdr_write_f64 ( uint8_t **  ptr,
const uint8_t *  end,
const uint8_t *  origin,
double  value 
)

Write a CDR-encoded IEEE-754 double (8-byte aligned) and advance the cursor.

◆ nros_cdr_write_i16()

int32_t nros_cdr_write_i16 ( uint8_t **  ptr,
const uint8_t *  end,
const uint8_t *  origin,
int16_t  value 
)

Write a CDR-encoded int16_t and advance the cursor.

◆ nros_cdr_write_i32()

int32_t nros_cdr_write_i32 ( uint8_t **  ptr,
const uint8_t *  end,
const uint8_t *  origin,
int32_t  value 
)

Write a CDR-encoded int32_t and advance the cursor.

◆ nros_cdr_write_i64()

int32_t nros_cdr_write_i64 ( uint8_t **  ptr,
const uint8_t *  end,
const uint8_t *  origin,
int64_t  value 
)

Write a CDR-encoded int64_t and advance the cursor.

◆ nros_cdr_write_i8()

int32_t nros_cdr_write_i8 ( uint8_t **  ptr,
const uint8_t *  end,
const uint8_t *  origin,
int8_t  value 
)

Write a CDR-encoded int8_t and advance the cursor.

◆ nros_cdr_write_string()

int32_t nros_cdr_write_string ( uint8_t **  ptr,
const uint8_t *  end,
const uint8_t *  origin,
const char *  value 
)

Write a null-terminated string (CDR: u32 length inc. null + bytes + null).

◆ nros_cdr_write_string_n()

int32_t nros_cdr_write_string_n ( uint8_t **  ptr,
const uint8_t *  end,
const uint8_t *  origin,
const char *  data,
size_t  data_len 
)

Write a ptr+len string (CDR: u32 length inc. null + bytes + null).

◆ nros_cdr_write_u16()

int32_t nros_cdr_write_u16 ( uint8_t **  ptr,
const uint8_t *  end,
const uint8_t *  origin,
uint16_t  value 
)

Write a CDR-encoded uint16_t (2 bytes, little-endian, 2-byte aligned) and advance the cursor.

◆ nros_cdr_write_u32()

int32_t nros_cdr_write_u32 ( uint8_t **  ptr,
const uint8_t *  end,
const uint8_t *  origin,
uint32_t  value 
)

Write a CDR-encoded uint32_t (4 bytes, little-endian, 4-byte aligned) and advance the cursor.

◆ nros_cdr_write_u64()

int32_t nros_cdr_write_u64 ( uint8_t **  ptr,
const uint8_t *  end,
const uint8_t *  origin,
uint64_t  value 
)

Write a CDR-encoded uint64_t (8 bytes, little-endian, 8-byte aligned) and advance the cursor.

◆ nros_cdr_write_u8()

int32_t nros_cdr_write_u8 ( uint8_t **  ptr,
const uint8_t *  end,
const uint8_t *  origin,
uint8_t  value 
)

Write a CDR-encoded uint8_t and advance the cursor. See [nros_cdr_write_bool] for the buffer contract.

◆ nros_clear_custom_transport()

nros_ret_t nros_clear_custom_transport ( void  )

Phase 115.C — clear any previously-registered custom transport. Equivalent to nros_set_custom_transport(NULL). Convenience for teardown paths.

◆ nros_client_call()

nros_ret_t nros_client_call ( struct nros_client_t client,
const uint8_t *  request_data,
size_t  request_len,
uint8_t *  response_data,
size_t  response_capacity,
size_t *  response_len 
)

Call a service (blocking convenience over the async pair).

Phase 82: signature unchanged, but no longer blocks at the transport layer. Internally calls nros_client_send_request_async and spins the registered executor via nros_executor_spin_some until the response arrives or the client's timeout_ms elapses. The client must have been registered with nros_executor_add_client.

Parameters

  • client - Pointer to a registered client
  • request_data - CDR-serialized request data
  • request_len - Length of request data
  • response_data - Buffer to receive CDR-serialized response
  • response_capacity - Capacity of response buffer
  • response_len - Output: actual length of response data

Returns

  • NROS_RET_OK on success
  • NROS_RET_INVALID_ARGUMENT if any pointer is NULL
  • NROS_RET_NOT_INIT if the client isn't registered with an executor
  • NROS_RET_TIMEOUT if no response within timeout_ms
  • NROS_RET_ERROR on call failure

◆ nros_client_fini()

nros_ret_t nros_client_fini ( struct nros_client_t client)

Finalize a service client.

Phase 82: the underlying transport handle lives in the executor's arena and is dropped automatically when the executor is finalised. This function only resets the C-side metadata + internal blob.

Parameters

  • client - Pointer to an initialized client

Returns

  • NROS_RET_OK on success
  • NROS_RET_INVALID_ARGUMENT if client is NULL
  • NROS_RET_NOT_INIT if not initialized

◆ nros_client_get_default_options()

struct nros_client_options_t nros_client_get_default_options ( void  )

Get a zero-initialised [nros_client_options_t] (sched_context = 0).

◆ nros_client_get_service_name()

const char * nros_client_get_service_name ( const struct nros_client_t client)

Get the service name of a client.

Parameters

  • client - Pointer to a client

Returns

  • Pointer to service name (null-terminated), or NULL if invalid

◆ nros_client_get_zero_initialized()

struct nros_client_t nros_client_get_zero_initialized ( void  )

Get a zero-initialized client.

◆ nros_client_init()

nros_ret_t nros_client_init ( struct nros_client_t client,
const struct nros_node_t node,
const struct nros_service_type_t type_info,
const char *  service_name 
)

Initialize a service client (Phase 82: metadata-only).

Stores the service name/type metadata and a ServiceClientInternal blob; the actual transport handle (RmwServiceClient) is created later by nros_executor_add_client. This deferred lifecycle matches nros_service_init (server side) and the action client.

Parameters

  • client - Pointer to a zero-initialized client
  • node - Pointer to an initialized node
  • type_info - Pointer to service type information
  • service_name - Service name (null-terminated string)

Returns

  • NROS_RET_OK on success
  • NROS_RET_INVALID_ARGUMENT if any required pointer is NULL
  • NROS_RET_NOT_INIT if node is not initialized

◆ nros_client_init_polling()

nros_ret_t nros_client_init_polling ( struct nros_client_t client,
const struct nros_node_t node,
const struct nros_service_type_t type_info,
const char *  service_name 
)

Phase 122.3.c.5 — initialize an L1 polling-mode service client.

Creates the underlying RMW client immediately and stores it inline in the client's _opaque field. The caller drives the request/reply cycle via nros_client_send_request_raw + nros_client_try_recv_reply_raw.

Parameters

  • client - Pointer to a zero-initialized client
  • node - Pointer to an initialized node
  • type_info - Pointer to service type information
  • service_name - Service name (null-terminated)

Returns

  • NROS_RET_OK on success
  • NROS_RET_INVALID_ARGUMENT if any pointer is NULL or name empty
  • NROS_RET_NOT_INIT if node / support not initialized
  • NROS_RET_ERROR if client creation failed

Safety

All pointers must be valid; service_name must be a valid null-terminated string.

◆ nros_client_init_with_options()

nros_ret_t nros_client_init_with_options ( struct nros_client_t client,
const struct nros_node_t node,
const struct nros_service_type_t type_info,
const char *  service_name,
const struct nros_qos_t qos,
const struct nros_client_options_t options 
)

Phase 189.M3.3.a — initialize a service client with custom QoS + named options. Like [nros_client_init_with_qos] except a non-zero options->sched_context is stashed so [nros_executor_register_client] binds the resulting executor handle to that scheduling context once known.

Safety

All non-NULL pointers must be valid + the node initialized; qos / options may be NULL.

◆ nros_client_init_with_qos()

nros_ret_t nros_client_init_with_qos ( struct nros_client_t client,
const struct nros_node_t node,
const struct nros_service_type_t type_info,
const char *  service_name,
const struct nros_qos_t qos 
)

Phase 193.4b — initialize a service client with an explicit QoS profile (rclc's _with_options; the profile applies to both the request + reply endpoints). qos NULL ⇒ the services default. Same as [nros_client_init] otherwise.

Safety

All non-NULL pointers must be valid + the node initialized.

◆ nros_client_is_valid()

bool nros_client_is_valid ( const struct nros_client_t client)

Check if client is valid (initialized).

Parameters

  • client - Pointer to a client

Returns

  • true if valid, false if invalid or NULL

◆ nros_client_send_request_async()

nros_ret_t nros_client_send_request_async ( struct nros_client_t client,
const uint8_t *  request_data,
size_t  request_len 
)

Send a service request asynchronously (Phase 82).

Non-blocking. The reply is delivered via the registered response_callback during nros_executor_spin_some. The user must have previously registered the client with nros_executor_add_client.

Returns

  • NROS_RET_OK on success
  • NROS_RET_NOT_INIT if the client is not registered with an executor
  • NROS_RET_BAD_SEQUENCE if a previous request is still pending
  • NROS_RET_ERROR on transport failure

◆ nros_client_send_request_raw()

nros_ret_t nros_client_send_request_raw ( struct nros_client_t client,
const uint8_t *  data,
size_t  len 
)

Phase 122.3.c.5 — send a raw request on an L1 polling-mode client. Non-blocking. Poll for the reply via nros_client_try_recv_reply_raw.

Safety

client must be in POLLING state. data readable for len bytes.

◆ nros_client_server_available()

nros_ret_t nros_client_server_available ( struct nros_client_t client,
int32_t *  out 
)

Phase 124.C.3 — synchronous, graph-aware "is the matching server up?" probe. Unlike [nros_client_wait_for_service] this never spins the executor: it asks the active RMW backend whether at least one matching server has been observed on the RMW graph and returns immediately.

out receives 1 if a server is visible, 0 if none is yet, -1 if the backend cannot answer (e.g. XRCE without participant enumeration). Callers that want the same answer rounded to a hard yes/no should treat -1 as "unknown — assume yes" or use [nros_client_wait_for_service] instead.

Returns

  • NROS_RET_OK*out was written (0, 1, or -1).
  • NROS_RET_INVALID_ARGUMENTclient or out is null.
  • NROS_RET_NOT_INIT — client not registered with an executor.
  • NROS_RET_ERROR — transport-level failure.

◆ nros_client_service_is_ready()

bool nros_client_service_is_ready ( const struct nros_client_t client)

Non-blocking snapshot of whether a matching service server is currently visible. Mirrors rclcpp::ClientBase::service_is_ready and rcl's rcl_service_server_is_available. Returns false when the client isn't registered with an executor or the backend lacks liveliness discovery (in which case use nros_client_wait_for_service instead, which handles those cases conservatively).

◆ nros_client_set_response_callback()

nros_ret_t nros_client_set_response_callback ( struct nros_client_t client,
nros_response_callback_t  callback,
void *  context 
)

Set the response callback fired by nros_executor_spin_some when an async request has its reply delivered.

◆ nros_client_set_timeout()

nros_ret_t nros_client_set_timeout ( struct nros_client_t client,
uint32_t  timeout_ms 
)

Set the default timeout used by nros_client_call.

◆ nros_client_set_wake_callback()

nros_ret_t nros_client_set_wake_callback ( struct nros_client_t client,
struct nros_wake_state_t state,
void(*)(void *)  cb,
void *  ctx 
)

Phase 122.3.c.6.e — register a C wake callback on an L1 polling-mode service client. Wakes when a reply lands. See nros_service_set_wake_callback for the lifetime contract.

◆ nros_client_try_recv_reply_raw()

int32_t nros_client_try_recv_reply_raw ( struct nros_client_t client,
uint8_t *  buf,
size_t  buf_len 
)

Phase 122.3.c.5 — non-blocking poll for a reply on an L1 polling-mode client. Writes reply bytes into the caller's buf.

Returns

  • >= 0 — number of bytes written to buf (0 = no reply yet)
  • NROS_RET_INVALID_ARGUMENT if pointers / state wrong
  • NROS_RET_ERROR on transport failure

Safety

client must be in POLLING state. buf writable for buf_len bytes.

◆ nros_client_try_recv_response()

nros_ret_t nros_client_try_recv_response ( struct nros_client_t client,
uint8_t *  response_data,
size_t  response_capacity,
size_t *  response_len 
)

Poll for the reply to the most recently sent async request.

Returns

  • NROS_RET_OK if the reply was filled into response_data
  • NROS_RET_TRY_AGAIN if no reply yet (caller should spin and retry)
  • NROS_RET_NOT_INIT if the client isn't registered or has no pending request
  • NROS_RET_ERROR on transport failure

◆ nros_client_wait_for_service()

nros_ret_t nros_client_wait_for_service ( struct nros_client_t client,
uint32_t  timeout_ms 
)

Block until a matching service server is discoverable, or timeout_ms elapses. Mirrors rclcpp::ClientBase::wait_for_service and the the underlying Client::wait_for_service.

The client must already have been registered with the executor via nros_executor_add_client. Internally fires liveliness queries against the matching service-server's wildcard liveliness keyexpr and spins the executor cooperatively while the probe is in flight. 1-second per-probe timeout, looped until either a token reply lands or the outer wall-clock budget expires — see the runtime API for the rationale (a single liveliness_get samples the router's current token list and terminates, so a server that comes up after we start waiting needs to be re-probed).

Returns

  • NROS_RET_OK — server is visible (proceed with nros_client_call).
  • NROS_RET_TIMEOUTtimeout_ms elapsed without seeing a token.
  • NROS_RET_NOT_INIT — client not registered with an executor.
  • NROS_RET_ERROR — transport-level failure.

◆ nros_clock_fini()

nros_ret_t nros_clock_fini ( struct nros_clock_t clock)

Finalize a clock.

◆ nros_clock_get_now()

nros_ret_t nros_clock_get_now ( const struct nros_clock_t clock,
struct nros_time_t time_out 
)

Get the current time from a clock.

◆ nros_clock_get_now_ns()

nros_ret_t nros_clock_get_now_ns ( const struct nros_clock_t clock,
int64_t *  nanoseconds 
)

Get the current time from a clock as nanoseconds.

◆ nros_clock_get_type()

enum nros_clock_type_t nros_clock_get_type ( const struct nros_clock_t clock)

Get the clock type.

◆ nros_clock_get_zero_initialized()

struct nros_clock_t nros_clock_get_zero_initialized ( void  )

Get a zero-initialized clock.

◆ nros_clock_init()

nros_ret_t nros_clock_init ( struct nros_clock_t clock,
enum nros_clock_type_t  clock_type 
)

Initialize a clock.

◆ nros_clock_is_valid()

bool nros_clock_is_valid ( const struct nros_clock_t clock)

Check if a clock is valid.

◆ nros_executor_add_client()

nros_ret_t nros_executor_add_client ( struct nros_executor_t executor,
struct nros_client_t client 
)

Add a service client to the executor (Phase 82).

Creates the underlying RmwServiceClient inside the executor's arena and stashes the executor pointer + arena entry index into the client's _internal blob so subsequent calls to nros_client_call, nros_client_send_request_async, and friends can drive the executor without taking it as an explicit argument.

Must be called exactly once after nros_client_init and before any send/call. Calling it twice on the same client returns NROS_RET_BAD_SEQUENCE.

Safety

  • Both pointers must reference initialized objects.

◆ nros_executor_bind_handle_to_sched_context()

nros_ret_t nros_executor_bind_handle_to_sched_context ( struct nros_executor_t executor,
size_t  handle,
nros_sched_context_id_t  sc_id 
)

Bind a registered callback to a scheduling context. The next spin_once cycle dispatches that callback through the SC's queue (FIFO bitmap or EDF heap, in the SC's priority bucket). Phase 110.B.

handle is the index returned by the corresponding nros_executor_add_* call. sc_id must be a value previously returned from [nros_executor_create_sched_context] (or 0 for the auto-created default Fifo SC).

Returns NROS_RET_INVALID_ARGUMENT for an out-of-range handle, an empty entry slot, or an unknown sc_id.

Safety

executor must be a valid pointer to an initialized executor.

◆ nros_executor_create_sched_context()

nros_ret_t nros_executor_create_sched_context ( struct nros_executor_t executor,
const struct nros_sched_context_t cfg,
nros_sched_context_id_t out_sc_id 
)

Register a new scheduling context with the executor. Phase 110.B.

On success writes the new SchedContextId through out_sc_id and returns NROS_RET_OK. Returns NROS_RET_FULL when no slot is available (build-time NROS_EXECUTOR_MAX_SC exhausted).

Safety

All pointers must be valid and the executor initialized.

◆ nros_executor_declare_param_string()

nros_ret_t nros_executor_declare_param_string ( struct nros_executor_t executor,
const char *  name,
const char *  value 
)

Declare a string parameter on the executor's server.

◆ nros_executor_default_sched_context_id()

nros_sched_context_id_t nros_executor_default_sched_context_id ( void  )

Identifier of the auto-created default Fifo-class SC. Every callback registered without an explicit binding maps to it. Phase 110.B.

◆ nros_executor_fini()

nros_ret_t nros_executor_fini ( struct nros_executor_t executor)

Finalize an executor.

Safety

  • executor must be a valid pointer

◆ nros_executor_get_handle_count()

int nros_executor_get_handle_count ( const struct nros_executor_t executor)

Get the number of handles in the executor.

◆ nros_executor_get_param_string()

nros_ret_t nros_executor_get_param_string ( struct nros_executor_t executor,
const char *  name,
char *  out_value,
size_t  max_len 
)

Get a string parameter from the executor's server into a fixed buffer.

◆ nros_executor_get_remaining_handles()

int nros_executor_get_remaining_handles ( const struct nros_executor_t executor)

Get remaining total handle capacity.

◆ nros_executor_get_zero_initialized()

struct nros_executor_t nros_executor_get_zero_initialized ( void  )

Get a zero-initialized executor.

◆ nros_executor_has_param()

bool nros_executor_has_param ( struct nros_executor_t executor,
const char *  name 
)

Check if a parameter exists on the executor's server.

◆ nros_executor_init()

nros_ret_t nros_executor_init ( struct nros_executor_t executor,
const struct nros_support_t support,
size_t  max_handles 
)

Initialize an executor.

Parameters

  • executor - Pointer to a zero-initialized executor
  • support - Pointer to an initialized support context
  • max_handles - Maximum number of handles (capped at NROS_EXECUTOR_MAX_HANDLES)

Returns

  • NROS_RET_OK on success
  • NROS_RET_INVALID_ARGUMENT if any pointer is NULL or max_handles is 0
  • NROS_RET_NOT_INIT if support is not initialized

Safety

  • All pointers must be valid

◆ nros_executor_is_valid()

bool nros_executor_is_valid ( const struct nros_executor_t executor)

Check if executor is valid (initialized).

◆ nros_executor_lifecycle_change_state()

nros_ret_t nros_executor_lifecycle_change_state ( struct nros_executor_t executor,
uint8_t  transition_id 
)

Trigger a lifecycle transition on the executor's state machine.

Safety

Invokes the user's registered C callback through a raw function pointer. The caller must ensure the callback and any context it captures are live.

◆ nros_executor_lifecycle_get_state()

uint8_t nros_executor_lifecycle_get_state ( struct nros_executor_t executor)

Get the current lifecycle state of the executor's state machine.

Returns NROS_LIFECYCLE_STATE_UNCONFIGURED if services are not registered yet.

Takes *mut rather than *const because get_executor returns &mut CExecutor — reading the state is logically read-only but the executor accessor shares storage with the services loop that needs &mut during spin.

◆ nros_executor_lifecycle_register_on_activate()

nros_ret_t nros_executor_lifecycle_register_on_activate ( struct nros_executor_t executor,
struct Option_LifecycleCallbackFnCtx  cb,
void *  context 
)

Register the on-activate callback on the executor's state machine.

◆ nros_executor_lifecycle_register_on_cleanup()

nros_ret_t nros_executor_lifecycle_register_on_cleanup ( struct nros_executor_t executor,
struct Option_LifecycleCallbackFnCtx  cb,
void *  context 
)

Register the on-cleanup callback on the executor's state machine.

◆ nros_executor_lifecycle_register_on_configure()

nros_ret_t nros_executor_lifecycle_register_on_configure ( struct nros_executor_t executor,
struct Option_LifecycleCallbackFnCtx  cb,
void *  context 
)

Register the on-configure callback on the executor's state machine.

◆ nros_executor_lifecycle_register_on_deactivate()

nros_ret_t nros_executor_lifecycle_register_on_deactivate ( struct nros_executor_t executor,
struct Option_LifecycleCallbackFnCtx  cb,
void *  context 
)

Register the on-deactivate callback on the executor's state machine.

◆ nros_executor_lifecycle_register_on_error()

nros_ret_t nros_executor_lifecycle_register_on_error ( struct nros_executor_t executor,
struct Option_LifecycleCallbackFnCtx  cb,
void *  context 
)

Register the on-error callback on the executor's state machine.

◆ nros_executor_lifecycle_register_on_shutdown()

nros_ret_t nros_executor_lifecycle_register_on_shutdown ( struct nros_executor_t executor,
struct Option_LifecycleCallbackFnCtx  cb,
void *  context 
)

Register the on-shutdown callback on the executor's state machine.

◆ nros_executor_node_init()

nros_ret_t nros_executor_node_init ( struct nros_executor_t executor,
struct nros_node_t node,
const char *  name,
const struct nros_node_options_t options 
)

Phase 104.C.8.b — initialize a Node via the executor's [node_builder](nros_node::Executor::node_builder) chain.

Thin wrapper over Rust's executor.node_builder(name).rmw(...).locator(...).domain_id(...). namespace(...).sched(...).build(). Materialises a Node inside the executor's node table and stores the returned NodeId in node.node_id so subsequent [nros_executor_register_subscription] / _service / _client / _action_* calls route through register_*_on(NodeId, ...) instead of the legacy single-Node path.

Replaces the pre-104.C ordering of support_init → node_init → executor_init with the rclcpp-aligned support_init → executor_init → executor_node_init. The old nros_node_init / nros_node_init_ex entry points are preserved for source compatibility — they still drive the single-Node legacy path and leave node.node_id = 0.

Parameters

  • executor — Pointer to an initialised executor.
  • node — Pointer to a zero-initialised node. Populated on success.
  • name — Node name (null-terminated). Must not be NULL.
  • options — Pointer to populated nros_node_options_t. NULL = default options (no rmw override, inherits executor's locator
    • domain, executor-default SchedContext).

Returns

  • NROS_RET_OK on success.
  • NROS_RET_INVALID_ARGUMENT on NULL pointers / bad strings.
  • NROS_RET_BAD_SEQUENCE if node is already initialised.
  • NROS_RET_NOT_INIT if executor isn't initialised.
  • NROS_RET_ERROR if the executor's node table is full (NROS_EXECUTOR_MAX_NODES) or the backend session open failed.

Safety

All pointer arguments must satisfy their per-parameter rules. options length fields must not overrun their buffers.

◆ nros_executor_ping()

nros_ret_t nros_executor_ping ( struct nros_executor_t executor,
int32_t  timeout_ms 
)

Phase 124.F.3 — session-level connectivity probe.

Sends a wire-level round-trip ("is the peer / agent / router reachable?") and waits up to timeout_ms. Mirrors micro-ROS's rmw_uros_ping_agent. Useful for reconnect-on-link-loss patterns: bare-metal code calls ping(100) periodically and tears down / re-opens the session on timeout.

Returns

  • NROS_RET_OK — peer responded within budget.
  • NROS_RET_TIMEOUT — no reply before timeout_ms.
  • NROS_RET_UNSUPPORTED — active backend can't probe.
  • NROS_RET_NOT_INIT — executor not initialised.
  • NROS_RET_INVALID_ARGUMENTexecutor is NULL.

Safety

  • executor must be a valid pointer to an initialized executor.

◆ nros_executor_register_action_client()

nros_ret_t nros_executor_register_action_client ( struct nros_executor_t executor,
struct nros_action_client_t client 
)

Register an action client with the executor for async (non-blocking) operation.

After registration, nros_executor_spin_some polls the action client's pending requests (goal response, feedback, result) and invokes the registered callbacks.

The action client must already be initialized via nros_action_client_init. Callbacks should be set via nros_action_client_set_goal_response_callback, nros_action_client_set_feedback_callback, and nros_action_client_set_result_callback before or after this call.

Safety

  • executor and client must be valid pointers to initialized structs.

◆ nros_executor_register_action_server()

nros_ret_t nros_executor_register_action_server ( struct nros_executor_t executor,
struct nros_action_server_t server 
)

Add an action server to the executor.

Extracts metadata from the action server struct, creates callback trampolines, and registers with the internal executor.

Safety

  • All pointers must be valid and point to initialized objects

◆ nros_executor_register_guard_condition()

nros_ret_t nros_executor_register_guard_condition ( struct nros_executor_t executor,
struct nros_guard_condition_t guard 
)

Add a guard condition to the executor.

Safety

  • All pointers must be valid and point to initialized objects

◆ nros_executor_register_lifecycle_services()

nros_ret_t nros_executor_register_lifecycle_services ( struct nros_executor_t executor)

Register the five REP-2002 lifecycle services on the executor's node.

After this call, ros2 lifecycle set|get|list|nodes can drive the executor-owned state machine. Register transition callbacks via nros_executor_lifecycle_register_on_* and inspect the state via nros_executor_lifecycle_get_state.

◆ nros_executor_register_parameter_services()

nros_ret_t nros_executor_register_parameter_services ( struct nros_executor_t executor)

Register the 6 ROS 2 parameter services on the executor's node.

After this call, parameters declared via nros_executor_declare_param_* are visible to ros2 param list, ros2 param get, ros2 param set, etc.

◆ nros_executor_register_service()

nros_ret_t nros_executor_register_service ( struct nros_executor_t executor,
struct nros_service_t service 
)

Add a service to the executor.

Extracts metadata from the service struct and registers a raw-bytes service callback with the internal nros-node executor.

Safety

  • All pointers must be valid and point to initialized objects

◆ nros_executor_register_subscription()

nros_ret_t nros_executor_register_subscription ( struct nros_executor_t executor,
struct nros_subscription_t subscription,
enum nros_executor_invocation_t  invocation 
)

Add a subscription to the executor.

Extracts metadata from the subscription struct and registers a raw-bytes callback with the internal nros-node executor. The RMW subscriber handle is created here (moved from subscription init).

Safety

  • All pointers must be valid and point to initialized objects

◆ nros_executor_register_subscription_raw_with_info()

nros_ret_t nros_executor_register_subscription_raw_with_info ( struct nros_executor_t executor,
const struct nros_node_t node,
const char *  topic_name,
const char *  type_name,
const char *  type_hash,
const struct nros_qos_t qos,
nros_subscription_info_callback_t  callback,
void *  context 
)

Phase 189.M3.4 — register a raw subscription whose callback also receives the sample's wire attachment (the C analog of the Rust node.subscription(t).generic(..).message_info() builder; rclc's generic-with-info subscription). Direct-arg form (no nros_subscription_t struct): the callback signature differs from the plain [nros_subscription_callback_t], so this is its own entry point rather than a flag on nros_executor_register_subscription.

node may be NULL (legacy single-Node path) or a Node created via nros_executor_node_init (routes to that Node's session). qos may be NULL (defaults). Cross-RMW bridges read the bridge_origin tag from the attachment for echo suppression.

Safety

All non-NULL pointers must be valid; the C strings must be NUL-terminated UTF-8 valid for the duration of the call.

◆ nros_executor_register_time_triggered_dispatcher()

nros_ret_t nros_executor_register_time_triggered_dispatcher ( struct nros_executor_t executor,
uint32_t  major_frame_us 
)

Phase 110.G — enable TT dispatch on this executor by setting the major-frame length in microseconds. 0 disables the gate.

Safety

executor must be a valid pointer to an initialized executor.

◆ nros_executor_register_timer()

nros_ret_t nros_executor_register_timer ( struct nros_executor_t executor,
struct nros_timer_t timer 
)

Add a timer to the executor.

Wraps the C timer callback in a closure and registers it with the internal nros-node executor.

Safety

  • All pointers must be valid and point to initialized objects

◆ nros_executor_set_param_string()

nros_ret_t nros_executor_set_param_string ( struct nros_executor_t executor,
const char *  name,
const char *  value 
)

Set a string parameter on the executor's server.

◆ nros_executor_set_semantics()

nros_ret_t nros_executor_set_semantics ( struct nros_executor_t executor,
enum nros_executor_semantics_t  semantics 
)

Set data communication semantics.

Safety

  • executor must be a valid pointer to an initialized executor

◆ nros_executor_set_timeout()

nros_ret_t nros_executor_set_timeout ( struct nros_executor_t executor,
uint64_t  timeout_ns 
)

Set the executor timeout.

Safety

  • executor must be a valid pointer to an initialized executor

◆ nros_executor_set_trigger()

nros_ret_t nros_executor_set_trigger ( struct nros_executor_t executor,
nros_executor_trigger_t  trigger,
void *  context 
)

Set the trigger condition for the executor.

Safety

  • executor must be a valid pointer to an initialized executor

◆ nros_executor_spin()

nros_ret_t nros_executor_spin ( struct nros_executor_t executor)

Spin the executor forever.

Safety

  • executor must be a valid pointer to an initialized executor

◆ nros_executor_spin_one_period()

nros_ret_t nros_executor_spin_one_period ( struct nros_executor_t executor,
uint64_t  period_ns 
)

Spin the executor for one period.

Safety

  • executor must be a valid pointer to an initialized executor

◆ nros_executor_spin_period()

nros_ret_t nros_executor_spin_period ( struct nros_executor_t executor,
uint64_t  period_ns 
)

Spin the executor with a fixed period.

Safety

  • executor must be a valid pointer to an initialized executor

◆ nros_executor_spin_some()

nros_ret_t nros_executor_spin_some ( struct nros_executor_t executor,
uint64_t  timeout_ns 
)

Spin the executor once.

Drives middleware I/O, then dispatches ready callbacks.

Safety

  • executor must be a valid pointer to an initialized executor

◆ nros_executor_stop()

nros_ret_t nros_executor_stop ( struct nros_executor_t executor)

Stop a spinning executor.

Safety

  • executor must be a valid pointer

◆ nros_executor_trigger_all()

bool nros_executor_trigger_all ( const bool *  ready,
size_t  count,
void *  context 
)

Built-in trigger: fire when ALL handles have data ready.

Safety

  • ready must point to a valid array of at least count booleans

◆ nros_executor_trigger_always()

bool nros_executor_trigger_always ( const bool *  ready,
size_t  count,
void *  context 
)

Built-in trigger: always fire (unconditionally).

Safety

  • ready and count are unused

◆ nros_executor_trigger_any()

bool nros_executor_trigger_any ( const bool *  ready,
size_t  count,
void *  context 
)

Built-in trigger: fire when ANY handle has data ready.

Safety

  • ready must point to a valid array of at least count booleans

◆ nros_executor_trigger_one()

bool nros_executor_trigger_one ( const bool *  ready,
size_t  count,
void *  context 
)

Built-in trigger: fire when the handle at the index stored in context has data.

context must point to a caller-owned size_t holding the handle index. Passing (void*)(size_t)idx directly is NOT supported — that pattern is UB on strict-alignment targets and CHERI, and the function will dereference the pointer.

Recommended usage:

static size_t my_trigger_index = 2;
nros_ret_t nros_executor_set_trigger(struct nros_executor_t *executor, nros_executor_trigger_t trigger, void *context)
bool nros_executor_trigger_one(const bool *ready, size_t count, void *context)

Safety

  • ready must point to a valid array of at least count booleans.
  • context must point to a valid size_t alive for the trigger's lifetime.

◆ nros_goal_status_to_string()

const char * nros_goal_status_to_string ( enum nros_goal_status_t  status)

Get status name as string.

◆ nros_goal_uuid_equal()

bool nros_goal_uuid_equal ( const struct nros_goal_uuid_t a,
const struct nros_goal_uuid_t b 
)

Compare two goal UUIDs.

◆ nros_goal_uuid_generate()

nros_ret_t nros_goal_uuid_generate ( struct nros_goal_uuid_t uuid)

Generate a new random goal UUID.

◆ nros_guard_condition_clear()

nros_ret_t nros_guard_condition_clear ( struct nros_guard_condition_t guard)

Clear the triggered flag.

◆ nros_guard_condition_fini()

nros_ret_t nros_guard_condition_fini ( struct nros_guard_condition_t guard)

Finalize a guard condition.

◆ nros_guard_condition_get_zero_initialized()

struct nros_guard_condition_t nros_guard_condition_get_zero_initialized ( void  )

Get a zero-initialized guard condition.

◆ nros_guard_condition_init()

nros_ret_t nros_guard_condition_init ( struct nros_guard_condition_t guard,
const struct nros_support_t support 
)

Initialize a guard condition.

◆ nros_guard_condition_is_triggered()

bool nros_guard_condition_is_triggered ( const struct nros_guard_condition_t guard)

Check if the guard condition is triggered.

◆ nros_guard_condition_is_valid()

bool nros_guard_condition_is_valid ( const struct nros_guard_condition_t guard)

Check if guard condition is valid (initialized).

◆ nros_guard_condition_set_callback()

nros_ret_t nros_guard_condition_set_callback ( struct nros_guard_condition_t guard,
nros_guard_condition_callback_t  callback,
void *  context 
)

Set the guard condition callback.

◆ nros_guard_condition_trigger()

nros_ret_t nros_guard_condition_trigger ( struct nros_guard_condition_t guard)

Trigger a guard condition.

This function is designed to be thread-safe. When registered with an executor, it triggers via the executor's guard handle (atomic flag in the arena). Otherwise falls back to the local triggered flag.

◆ nros_has_custom_transport()

nros_ret_t nros_has_custom_transport ( void  )

Phase 115.C — query whether a custom transport is currently registered. Returns 1 if a transport is registered, 0 otherwise. Useful for board crates that want to fall back to a static transport when no runtime override has been provided.

◆ nros_heap_peak_bytes()

size_t nros_heap_peak_bytes ( void  )

Peak outstanding bytes through the Rust global allocator since boot.

◆ nros_heap_platform_used_bytes()

size_t nros_heap_platform_used_bytes ( void  )

Bytes currently outstanding from the platform's unified heap — the true figure spanning both the Rust global allocator and the C side (zenoh-pico etc.), where the port owns one shared kernel heap. 0 if the port does not instrument heap usage.

◆ nros_heap_total_bytes()

size_t nros_heap_total_bytes ( void  )

Total managed heap size in bytes (used + free) reported by the platform, or 0 if unknown.

◆ nros_heap_used_bytes()

size_t nros_heap_used_bytes ( void  )

Bytes currently outstanding through the Rust global allocator.

◆ nros_lifecycle_change_state()

nros_ret_t nros_lifecycle_change_state ( struct nros_lifecycle_state_machine_t sm,
uint8_t  transition_id 
)

Trigger a lifecycle state transition.

◆ nros_lifecycle_fini()

nros_ret_t nros_lifecycle_fini ( struct nros_lifecycle_state_machine_t sm)

Finalize a lifecycle state machine.

◆ nros_lifecycle_get_state()

uint8_t nros_lifecycle_get_state ( const struct nros_lifecycle_state_machine_t sm)

Get the current lifecycle state.

◆ nros_lifecycle_get_zero_initialized()

struct nros_lifecycle_state_machine_t nros_lifecycle_get_zero_initialized ( void  )

Get a zero-initialized lifecycle state machine.

◆ nros_lifecycle_init()

nros_ret_t nros_lifecycle_init ( struct nros_lifecycle_state_machine_t sm,
const struct nros_node_t node 
)

Initialize a lifecycle state machine for a node.

◆ nros_lifecycle_register_on_activate()

nros_ret_t nros_lifecycle_register_on_activate ( struct nros_lifecycle_state_machine_t sm,
struct Option_LifecycleCallbackFnCtx  cb,
void *  context 
)

Register a callback for the activate transition.

◆ nros_lifecycle_register_on_cleanup()

nros_ret_t nros_lifecycle_register_on_cleanup ( struct nros_lifecycle_state_machine_t sm,
struct Option_LifecycleCallbackFnCtx  cb,
void *  context 
)

Register a callback for the cleanup transition.

◆ nros_lifecycle_register_on_configure()

nros_ret_t nros_lifecycle_register_on_configure ( struct nros_lifecycle_state_machine_t sm,
struct Option_LifecycleCallbackFnCtx  cb,
void *  context 
)

Register a callback for the configure transition.

◆ nros_lifecycle_register_on_deactivate()

nros_ret_t nros_lifecycle_register_on_deactivate ( struct nros_lifecycle_state_machine_t sm,
struct Option_LifecycleCallbackFnCtx  cb,
void *  context 
)

Register a callback for the deactivate transition.

◆ nros_lifecycle_register_on_error()

nros_ret_t nros_lifecycle_register_on_error ( struct nros_lifecycle_state_machine_t sm,
struct Option_LifecycleCallbackFnCtx  cb,
void *  context 
)

Register a callback for the error transition (error recovery).

◆ nros_lifecycle_register_on_shutdown()

nros_ret_t nros_lifecycle_register_on_shutdown ( struct nros_lifecycle_state_machine_t sm,
struct Option_LifecycleCallbackFnCtx  cb,
void *  context 
)

Register a callback for the shutdown transition.

◆ nros_make_node_a_lifecycle_node()

nros_ret_t nros_make_node_a_lifecycle_node ( struct nros_lifecycle_state_machine_t sm,
const struct nros_node_t node 
)

Convenience: alias for nros_lifecycle_init matching rclc's rclc_make_node_a_lifecycle_node.

◆ nros_node_fini()

nros_ret_t nros_node_fini ( struct nros_node_t node)

Finalize a node.

Parameters

  • node - Pointer to an initialized node

Returns

  • NROS_RET_OK on success
  • NROS_RET_INVALID_ARGUMENT if node is NULL
  • NROS_RET_NOT_INIT if not initialized

Safety

  • node must be a valid pointer to an initialized nros_node_t

◆ nros_node_get_default_options()

struct nros_node_options_t nros_node_get_default_options ( void  )

Get a zero-initialised nros_node_options_t.

All fields default to "inherit" — rmw_name_len = 0, locator_len = 0, domain_id_override = NROS_DOMAIN_ID_INHERIT, sched_context_id = 0. Callers populate only the fields they want to override.

◆ nros_node_get_logger()

const void * nros_node_get_logger ( const struct nros_node_t node)

Phase 88.12 — return the nros::Logger keyed on this node's name.

The returned handle is opaque from the C side; pass it to nros_log_info(...) / nros_log_warn(...) / etc. (declared in <nros/log.h>). The lifetime is 'static — loggers live for the process; callers must NOT free the returned pointer.

Parameters

  • node - Pointer to an initialized node.

Returns

  • Opaque nros_logger_t * (= &'static nros_log::Logger), or NULL if node is NULL / uninitialised.

Safety

  • node must be a valid pointer.

◆ nros_node_get_name()

const char * nros_node_get_name ( const struct nros_node_t node)

Get the node name.

Parameters

  • node - Pointer to an initialized node

Returns

  • Pointer to the node name (null-terminated), or NULL if invalid

Safety

  • node must be a valid pointer

◆ nros_node_get_namespace()

const char * nros_node_get_namespace ( const struct nros_node_t node)

Get the node namespace.

Parameters

  • node - Pointer to an initialized node

Returns

  • Pointer to the node namespace (null-terminated), or NULL if invalid

Safety

  • node must be a valid pointer

◆ nros_node_get_zero_initialized()

struct nros_node_t nros_node_get_zero_initialized ( void  )

Get a zero-initialized node.

Safety

Returns a stack-allocated struct that must be initialized before use.

◆ nros_node_init()

nros_ret_t nros_node_init ( struct nros_node_t node,
const struct nros_support_t support,
const char *  name,
const char *  namespace_ 
)

Initialize a node with default options.

Equivalent to building a [nros_node_options_t] via [nros_node_get_default_options], copying namespace_ into its namespace field, and calling [nros_node_init_ex]. The shim is kept for source-compatibility with rclc-style callers that pre-date Phase 104.C.8.

Parameters

  • node - Pointer to a zero-initialized node
  • support - Pointer to an initialized support context
  • name - Node name (null-terminated string)
  • namespace_ - Node namespace (null-terminated string, use "/" for root)

Returns

  • NROS_RET_OK on success
  • NROS_RET_INVALID_ARGUMENT if any pointer is NULL or strings are invalid
  • NROS_RET_NOT_INIT if support is not initialized
  • NROS_RET_ERROR on initialization failure

Safety

  • All pointers must be valid
  • name and namespace_ must be valid null-terminated strings

◆ nros_node_init_ex()

nros_ret_t nros_node_init_ex ( struct nros_node_t node,
const struct nros_support_t support,
const char *  name,
const struct nros_node_options_t options 
)

Phase 104.C.8 — initialize a Node with extended options.

Thin C wrapper over the Rust Executor::node_builder(name).rmw(...) .locator(...).domain_id(...).namespace(...).sched(...).build() chain. Options fields with *_len == 0 (or domain_id_override == NROS_DOMAIN_ID_INHERIT) inherit from the support context, matching the legacy single-Node behaviour nros_node_init provides.

The rmw_name selector drives Phase 104 multi-RMW Node binding: a bridge node can be initialised with options.rmw_name = "cyclonedds" while the support context's primary backend is "zenoh", and subsequent publishers/subscribers created via this Node route through the named backend's session. (Internal multi-Session dispatch piggy-backs on the executor's extra_sessions cache; see Phase 104.C.3.)

Currently the inline node_id slot stays 0; per-Node multi-RMW dispatch in C lands once the C executor surfaces Executor::node_builder (Phase 104.C.8 follow-up). Options fields round-trip into the node struct today so users can write code against the final API surface without waiting for that follow-up.

Parameters

  • node - Pointer to a zero-initialized node
  • support - Pointer to an initialized support context
  • name - Node name (null-terminated string)
  • options - Pointer to an [nros_node_options_t] (must be non-NULL)

Returns

  • NROS_RET_OK on success
  • NROS_RET_INVALID_ARGUMENT on NULL / invalid strings / overrun buffers
  • NROS_RET_BAD_SEQUENCE if the node is already initialized
  • NROS_RET_NOT_INIT if support is not initialized

Safety

  • All pointers must be valid
  • name must be a valid NUL-terminated UTF-8 string
  • options fields must satisfy their declared length invariants

◆ nros_node_set_qos_overrides()

nros_ret_t nros_node_set_qos_overrides ( struct nros_node_t node,
const struct nros_qos_override_t overrides,
size_t  len 
)

Install the per-topic QoS override table the deploy plan lowered from qos_overrides.<topic>.<role>.<policy> launch params (issue #52). Every entity created on node afterwards folds the matching (topic, role) entries into its QoS before the backend-compat check — the C/C++ mirror of Rust's NodeHandle::set_qos_overrides. Call once, after nros_node_init* and before creating publishers/subscriptions (a generated entry does this before configure(node)).

overrides must outlive the node (a static array in the generated entry). Pass len == 0 (or a null overrides) to clear.

Safety

  • node must point to an initialised nros_node_t.
  • overrides must be null or point to len valid nros_qos_override_t (each topic a valid NUL-terminated UTF-8 C string), living at least as long as the node.

◆ nros_param_declare_string()

nros_ret_t nros_param_declare_string ( struct nros_param_server_t server,
const char *  name,
const char *  default_value 
)

Declare a string parameter.

◆ nros_param_get_string()

nros_ret_t nros_param_get_string ( const struct nros_param_server_t server,
const char *  name,
char *  value,
size_t  max_len 
)

Get a string parameter value.

◆ nros_param_get_type()

enum nros_parameter_type_t nros_param_get_type ( const struct nros_param_server_t server,
const char *  name 
)

Get the type of a parameter.

◆ nros_param_has()

bool nros_param_has ( const struct nros_param_server_t server,
const char *  name 
)

Check if a parameter exists.

◆ nros_param_server_fini()

nros_ret_t nros_param_server_fini ( struct nros_param_server_t server)

Finalize a parameter server.

◆ nros_param_server_get_count()

size_t nros_param_server_get_count ( const struct nros_param_server_t server)

Get the number of declared parameters.

◆ nros_param_server_get_zero_initialized()

struct nros_param_server_t nros_param_server_get_zero_initialized ( void  )

Get a zero-initialized parameter server.

◆ nros_param_server_init()

nros_ret_t nros_param_server_init ( struct nros_param_server_t server,
struct nros_parameter_t storage,
size_t  capacity 
)

Initialize a parameter server with user-provided storage.

◆ nros_param_server_set_callback()

nros_ret_t nros_param_server_set_callback ( struct nros_param_server_t server,
nros_param_callback_t  callback,
void *  context 
)

Set a parameter change callback.

◆ nros_param_set_string()

nros_ret_t nros_param_set_string ( struct nros_param_server_t server,
const char *  name,
const char *  value 
)

Set a string parameter value.

◆ nros_platform_alloc()

void * nros_platform_alloc ( size_t  size)
extern

◆ nros_platform_clock_us()

uint64_t nros_platform_clock_us ( void  )
extern

Monotonic microseconds since a platform-defined epoch.

◆ nros_platform_critical_section_acquire()

uint32_t nros_platform_critical_section_acquire ( void  )
extern

◆ nros_platform_critical_section_release()

void nros_platform_critical_section_release ( uint32_t  token)
extern

◆ nros_platform_dealloc()

void nros_platform_dealloc ( void *  ptr)
extern

◆ nros_platform_heap_total_bytes()

size_t nros_platform_heap_total_bytes ( void  )
extern

◆ nros_platform_heap_used_bytes()

size_t nros_platform_heap_used_bytes ( void  )
extern

◆ nros_platform_sleep_us()

void nros_platform_sleep_us ( size_t  us)
extern

Sleep at least us microseconds.

◆ nros_publish_raw()

nros_ret_t nros_publish_raw ( const struct nros_publisher_t publisher,
const uint8_t *  data,
size_t  len 
)

Publish raw CDR-serialized data.

Parameters

  • publisher - Pointer to an initialized publisher
  • data - Pointer to CDR-serialized message data
  • len - Length of data in bytes

Returns

  • NROS_RET_OK on success
  • NROS_RET_INVALID_ARGUMENT if any pointer is NULL or len is 0
  • NROS_RET_NOT_INIT if publisher is not initialized
  • NROS_RET_PUBLISH_FAILED on publish failure

Safety

  • publisher must be a valid pointer to an initialized publisher
  • data must be a valid pointer to len bytes

◆ nros_publisher_assert_liveliness()

nros_ret_t nros_publisher_assert_liveliness ( const struct nros_publisher_t publisher)

Phase 108.B.7 — manually assert this publisher's liveliness.

Required for entities created with QoS liveliness_kind = NROS_QOS_LIVELINESS_MANUAL_BY_TOPIC or MANUAL_BY_NODE. No-op for AUTOMATIC / NONE. Backends that don't implement manual assertion (XRCE-DDS, zenoh-pico, uORB today) treat this as a no-op and return NROS_RET_OK.

Parameters

  • publisher - Pointer to an initialized publisher

Returns

  • NROS_RET_OK on success
  • NROS_RET_INVALID_ARGUMENT if publisher is NULL
  • NROS_RET_NOT_INIT if not initialized
  • NROS_RET_PUBLISH_FAILED on backend failure

Safety

  • publisher must be a valid pointer to an initialized publisher

◆ nros_publisher_commit()

nros_ret_t nros_publisher_commit ( const struct nros_publisher_t publisher,
void *  token,
size_t  actual_len 
)

Phase 124.A.6 — commit a previously-loaned slot. Sends the slot's actual_len bytes via the active backend.

token MUST come from a prior nros_publisher_loan on the SAME publisher; consuming it (commit OR discard) is mandatory.

Safety

  • publisher must be the same publisher the token was loaned from.
  • token must not be NULL and must not be reused after this call.

◆ nros_publisher_discard()

nros_ret_t nros_publisher_discard ( const struct nros_publisher_t publisher,
void *  token 
)

Phase 124.A.6 — abandon a previously-loaned slot without sending.

token MUST come from a prior nros_publisher_loan on the SAME publisher; consuming it (commit OR discard) is mandatory.

Safety

  • publisher must be the same publisher the token was loaned from.
  • token must not be NULL and must not be reused after this call.

◆ nros_publisher_fini()

nros_ret_t nros_publisher_fini ( struct nros_publisher_t publisher)

Finalize a publisher.

Parameters

  • publisher - Pointer to an initialized publisher

Returns

  • NROS_RET_OK on success
  • NROS_RET_INVALID_ARGUMENT if publisher is NULL
  • NROS_RET_NOT_INIT if not initialized

Safety

  • publisher must be a valid pointer

◆ nros_publisher_get_default_options()

struct nros_publisher_options_t nros_publisher_get_default_options ( void  )

Get a zero-initialised [nros_publisher_options_t].

All fields default to "inherit"/"none". Callers populate only the fields they want to override before passing the struct to [nros_publisher_init_with_options].

◆ nros_publisher_get_topic_name()

const char * nros_publisher_get_topic_name ( const struct nros_publisher_t publisher)

Get the topic name of a publisher.

Parameters

  • publisher - Pointer to a publisher

Returns

  • Pointer to topic name (null-terminated), or NULL if invalid

◆ nros_publisher_get_zero_initialized()

struct nros_publisher_t nros_publisher_get_zero_initialized ( void  )

Get a zero-initialized publisher.

◆ nros_publisher_init()

nros_ret_t nros_publisher_init ( struct nros_publisher_t publisher,
const struct nros_node_t node,
const struct nros_message_type_t type_info,
const char *  topic_name 
)

Initialize a publisher with default QoS (RELIABLE, KEEP_LAST(10)).

This is the recommended initialization function for most use cases. Uses QOS_PROFILE_DEFAULT which provides reliable delivery.

Parameters

  • publisher - Pointer to a zero-initialized publisher
  • node - Pointer to an initialized node
  • type_info - Pointer to message type information
  • topic_name - Topic name (null-terminated string)

Returns

  • NROS_RET_OK on success
  • NROS_RET_INVALID_ARGUMENT if any pointer is NULL
  • NROS_RET_NOT_INIT if node is not initialized
  • NROS_RET_ERROR on initialization failure

Safety

  • All pointers must be valid
  • topic_name must be a valid null-terminated string

◆ nros_publisher_init_with_options()

nros_ret_t nros_publisher_init_with_options ( struct nros_publisher_t publisher,
const struct nros_node_t node,
const struct nros_message_type_t type_info,
const char *  topic_name,
const struct nros_qos_t qos,
const struct nros_publisher_options_t options 
)

Phase 189.M3 — initialize a publisher with custom QoS + named options.

rclc-style entry point: QoS is passed separately (qos, NULL = default) and the non-QoS axes ride in options (NULL = defaults). Equivalent to [nros_publisher_init_with_qos] today — [nros_publisher_options_t] is currently a reserved, thin struct (publishers have no scheduling-context binding) — but kept as a distinct, additive entry point for rclc symmetry and forward ABI headroom.

Parameters

  • publisher - Pointer to a zero-initialized publisher
  • node - Pointer to an initialized node
  • type_info - Pointer to message type information
  • topic_name - Topic name (null-terminated string)
  • qos - Pointer to QoS settings (NULL for default)
  • options - Pointer to publisher options (NULL for defaults)

Returns

  • NROS_RET_OK on success
  • NROS_RET_INVALID_ARGUMENT if any required pointer is NULL
  • NROS_RET_NOT_INIT if node is not initialized
  • NROS_RET_ERROR on initialization failure

Safety

  • All required pointers must be valid
  • topic_name must be a valid null-terminated string
  • qos / options may be NULL or point to valid structs

◆ nros_publisher_init_with_qos()

nros_ret_t nros_publisher_init_with_qos ( struct nros_publisher_t publisher,
const struct nros_node_t node,
const struct nros_message_type_t type_info,
const char *  topic_name,
const struct nros_qos_t qos 
)

Initialize a publisher with custom QoS.

Parameters

  • publisher - Pointer to a zero-initialized publisher
  • node - Pointer to an initialized node
  • type_info - Pointer to message type information
  • topic_name - Topic name (null-terminated string)
  • qos - Pointer to QoS settings (NULL for default)

Returns

  • NROS_RET_OK on success
  • NROS_RET_INVALID_ARGUMENT if any required pointer is NULL
  • NROS_RET_NOT_INIT if node is not initialized
  • NROS_RET_ERROR on initialization failure

Safety

  • All required pointers must be valid
  • topic_name must be a valid null-terminated string

◆ nros_publisher_is_valid()

bool nros_publisher_is_valid ( const struct nros_publisher_t publisher)

Check if publisher is valid (initialized).

Parameters

  • publisher - Pointer to a publisher

Returns

  • true if valid, false if invalid or NULL

◆ nros_publisher_loan()

nros_ret_t nros_publisher_loan ( const struct nros_publisher_t publisher,
size_t  requested_len,
uint8_t **  out_buf,
size_t *  out_cap,
void **  out_token 
)

Phase 124.A.6 — loan a writable slot from the publisher's outbound buffer (zero-copy publish path).

On success, *out_buf points at *out_cap writable bytes the caller fills in place. Pass *out_token back to [nros_publisher_commit] (to send) or [nros_publisher_discard] (to abandon). The slot's bytes are valid until commit / discard runs OR the publisher is finalised — whichever comes first. The caller is responsible for matching every loan with exactly one commit OR discard.

Falls back to a heap-allocated staging buffer when the active backend's vtable doesn't expose a native loan slot — the wire payload still takes a single memcpy at commit time. requested_len is the minimum capacity; *out_cap may exceed it.

Returns

  • NROS_RET_OK — slot reserved.
  • NROS_RET_TRY_AGAIN (-15) — backend has no slot available; retry later or use a non-loan publish path.
  • NROS_RET_INVALID_ARGUMENT on NULL pointers or zero requested_len.
  • NROS_RET_NOT_INIT if publisher isn't initialised.

Safety

  • All pointers must be valid.

◆ nros_publisher_publish_streamed()

nros_ret_t nros_publisher_publish_streamed ( const struct nros_publisher_t publisher,
void(*)(size_t *out_total_len, void *user_ctx)  size_cb,
void(*)(uint8_t *out_buf, size_t cap, size_t *out_written, void *user_ctx)  chunk_cb,
void *  user_ctx 
)

Phase 124.E.1 — streamed publish.

Two callbacks: size_cb reports the total payload length once, chunk_cb fills the slot in chunks. Backends that support streaming land each chunk directly in their outbound buffer; backends that don't fall through to a stack-allocated staging buffer (capped at ~4 KiB) + a single publish_raw.

Parameters

  • publisher — initialized publisher
  • size_cb — invoked once; writes the total byte count to *out_total_len
  • chunk_cb — invoked repeatedly; writes up to cap bytes starting at out_buf, reports the count via *out_written. *out_written == 0 signals EOF
  • user_ctx — opaque pointer passed through to both callbacks

Returns

  • NROS_RET_OK on success
  • NROS_RET_INVALID_ARGUMENT if any required pointer is NULL
  • NROS_RET_NOT_INIT if not initialised
  • NROS_RET_PUBLISH_FAILED on backend failure
  • NROS_RET_BUFFER_TOO_SMALL if the fallback's staging buffer is exceeded

Safety

  • publisher must be a valid pointer to an initialised publisher.
  • The callbacks MUST NOT return references that outlive the call; user_ctx is valid only for the duration of the call.

◆ nros_publisher_set_liveliness_lost_callback()

nros_ret_t nros_publisher_set_liveliness_lost_callback ( struct nros_publisher_t _pub_,
nros_event_publisher_count_cb_t  _cb,
void *  _user_context 
)

Register a callback for NROS_EVENT_LIVELINESS_LOST.

Safety

pub_ must point to a valid, initialised nros_publisher_t. cb must be a valid function pointer or None.

◆ nros_publisher_set_offered_deadline_missed_callback()

nros_ret_t nros_publisher_set_offered_deadline_missed_callback ( struct nros_publisher_t _pub_,
uint32_t  _deadline_ms,
nros_event_publisher_count_cb_t  _cb,
void *  _user_context 
)

Register a callback for NROS_EVENT_OFFERED_DEADLINE_MISSED.

deadline_ms is the publisher's offered minimum-rate window.

Safety

See [nros_publisher_set_liveliness_lost_callback].

◆ nros_service_fini()

nros_ret_t nros_service_fini ( struct nros_service_t service)

Finalize a service server.

Parameters

  • service - Pointer to an initialized service

Returns

  • NROS_RET_OK on success
  • NROS_RET_INVALID_ARGUMENT if service is NULL
  • NROS_RET_NOT_INIT if not initialized

◆ nros_service_get_default_options()

struct nros_service_options_t nros_service_get_default_options ( void  )

Get a zero-initialised [nros_service_options_t] (sched_context = 0).

◆ nros_service_get_service_name()

const char * nros_service_get_service_name ( const struct nros_service_t service)

Get the service name.

Parameters

  • service - Pointer to a service

Returns

  • Pointer to service name (null-terminated), or NULL if invalid

◆ nros_service_get_zero_initialized()

struct nros_service_t nros_service_get_zero_initialized ( void  )

Get a zero-initialized service server.

◆ nros_service_init()

nros_ret_t nros_service_init ( struct nros_service_t service,
const struct nros_node_t node,
const struct nros_service_type_t type_info,
const char *  service_name,
nros_service_callback_t  callback,
void *  context 
)

Initialize a service server.

Parameters

  • service - Pointer to a zero-initialized service
  • node - Pointer to an initialized node
  • type_info - Pointer to service type information
  • service_name - Service name (null-terminated string)
  • callback - Callback function to invoke when requests arrive
  • context - User context pointer passed to callback (can be NULL)

Returns

  • NROS_RET_OK on success
  • NROS_RET_INVALID_ARGUMENT if any required pointer is NULL
  • NROS_RET_NOT_INIT if node is not initialized
  • NROS_RET_ERROR on initialization failure

◆ nros_service_init_polling()

nros_ret_t nros_service_init_polling ( struct nros_service_t service,
const struct nros_node_t node,
const struct nros_service_type_t type_info,
const char *  service_name 
)

Phase 122.3.c.4 — initialize an L1 polling-mode service server.

Creates the underlying RMW server immediately and stores it inline in the service's _opaque field. The caller drains received requests via nros_service_try_recv_request_raw and sends replies via nros_service_send_reply_raw.

Parameters

  • service - Pointer to a zero-initialized service
  • node - Pointer to an initialized node
  • type_info - Pointer to service type information
  • service_name - Service name (null-terminated)

Returns

  • NROS_RET_OK on success
  • NROS_RET_INVALID_ARGUMENT if any pointer is NULL or name empty
  • NROS_RET_NOT_INIT if node / support not initialized
  • NROS_RET_ERROR if server creation failed

Safety

All pointers must be valid; service_name must be a valid null-terminated string.

◆ nros_service_init_with_options()

nros_ret_t nros_service_init_with_options ( struct nros_service_t service,
const struct nros_node_t node,
const struct nros_service_type_t type_info,
const char *  service_name,
nros_service_callback_t  callback,
void *  context,
const struct nros_qos_t qos,
const struct nros_service_options_t options 
)

Phase 189.M3.3.a — initialize a service server with custom QoS + named options. Behaves like [nros_service_init_with_qos] except a non-zero options->sched_context is stashed on the service so that [nros_executor_register_service] binds the resulting executor handle to that scheduling context once the handle is known (server creation is deferred to registration, so the handle does not exist at init time).

Safety

All non-NULL pointers must be valid + the node initialized; qos / options may be NULL.

◆ nros_service_init_with_qos()

nros_ret_t nros_service_init_with_qos ( struct nros_service_t service,
const struct nros_node_t node,
const struct nros_service_type_t type_info,
const char *  service_name,
nros_service_callback_t  callback,
void *  context,
const struct nros_qos_t qos 
)

Phase 193.4 — initialize a service server with an explicit QoS profile (rclc's _with_options; the profile applies to both the request + reply endpoints). qos NULL ⇒ the services default. Same as [nros_service_init] otherwise.

Safety

All non-NULL pointers must be valid + the node initialized.

◆ nros_service_is_valid()

bool nros_service_is_valid ( const struct nros_service_t service)

Check if service is valid (initialized).

Parameters

  • service - Pointer to a service

Returns

  • true if valid, false if invalid or NULL

◆ nros_service_send_reply_raw()

nros_ret_t nros_service_send_reply_raw ( struct nros_service_t service,
int64_t  sequence_number,
const uint8_t *  data,
size_t  len 
)

Phase 122.3.c.4 — send a reply on an L1 polling-mode service.

sequence_number must equal the value returned by the most recent nros_service_try_recv_request_raw for the request being replied to.

Safety

service must be in POLLING state. data readable for len bytes.

◆ nros_service_send_response()

nros_ret_t nros_service_send_response ( struct nros_service_t service,
int64_t  _sequence_number,
const uint8_t *  _response_data,
size_t  _response_len 
)

Send a service response.

Currently not supported — service servers are callback-only through the executor. The callback's return value and response buffer are used to send the response automatically.

Returns

  • NROS_RET_NOT_INIT always (manual poll not supported)

◆ nros_service_set_wake_callback()

nros_ret_t nros_service_set_wake_callback ( struct nros_service_t service,
struct nros_wake_state_t state,
void(*)(void *)  cb,
void *  ctx 
)

Phase 122.3.c.6.e — register a C wake callback on an L1 polling-mode service server. state must point to a nros_wake_state_t allocated by the caller; it must outlive the service (typically declared inline next to the nros_service_t) and must not move after this call. Pass cb = NULL to disable. The backend wakes the callback when a new request arrives.

Safety

All pointers valid; state storage stable for the entity's lifetime.

◆ nros_service_take_request()

nros_ret_t nros_service_take_request ( struct nros_service_t service,
uint8_t *  _request_data,
size_t  _request_capacity,
size_t *  _request_len,
int64_t *  _sequence_number 
)

Take a service request (non-blocking).

Currently not supported — service servers are callback-only through the executor. Use nros_executor_register_service() with a callback instead.

Returns

  • NROS_RET_NOT_INIT always (manual poll not supported)

◆ nros_service_try_recv_request_raw()

int32_t nros_service_try_recv_request_raw ( struct nros_service_t service,
uint8_t *  buf,
size_t  buf_len,
int64_t *  sequence_number 
)

Phase 122.3.c.4 — non-blocking poll for a pending request on an L1 polling-mode service. Writes the request bytes into the caller's buf and the matching sequence_number (required for reply).

Returns

  • >= 0 — number of bytes written to buf (0 = no request)
  • NROS_RET_INVALID_ARGUMENT if pointers / state wrong
  • NROS_RET_ERROR on transport failure

Safety

service must be in POLLING state. buf writable for buf_len bytes. sequence_number writable for i64.

◆ nros_set_custom_transport()

nros_ret_t nros_set_custom_transport ( const struct nros_transport_ops_t ops)

Phase 115.C — register a custom transport vtable.

Must be called BEFORE nros_support_init. Subsequent calls before init overwrite the slot. After init, behaviour is implementation-defined — the active RMW backend may have already consumed the previously-registered vtable.

Pass NULL to clear a previously-registered vtable.

Returns

  • NROS_RET_OK on success.
  • NROS_RET_INVALID_ARGUMENT if ops is non-NULL but any of the four function pointers is NULL.

Safety

The four function pointers in ops must follow the threading contract documented in <nros/transport.h>.

◆ nros_subscription_borrow()

int32_t nros_subscription_borrow ( struct nros_subscription_t subscription,
const uint8_t **  out_buf,
size_t *  out_len,
void **  out_token 
)

Phase 124.A.6 — borrow a read-only view of the next available message in place (zero-copy receive path).

Bypasses the subscription's staging buffer. On success, *out_buf points at *out_len bytes the caller can read directly. Caller MUST pass *out_token back to [nros_subscription_release] before requesting another borrow on the same subscription — only one outstanding view per subscription at a time.

Falls back to a try_recv_raw copy into the staging buffer when the active backend's vtable doesn't expose a native borrow slot.

Returns

  • > 0 — message length written into *out_len; view is ready.
  • 0 — no message ready right now.
  • negative — error (see nros_ret_t).

Safety

  • subscription must be a valid polling subscription.
  • out_buf / out_len / out_token must be valid pointers.

◆ nros_subscription_fini()

nros_ret_t nros_subscription_fini ( struct nros_subscription_t subscription)

Safety

  • subscription must be a valid pointer

◆ nros_subscription_get_default_options()

struct nros_subscription_options_t nros_subscription_get_default_options ( void  )

Get a zero-initialised [nros_subscription_options_t].

All fields default to "inherit"/"off": sched_context = 0 (executor default), message_info = 0 (reserved, off). Callers populate only the fields they want before passing the struct to [nros_subscription_init_with_options].

◆ nros_subscription_get_topic_name()

const char * nros_subscription_get_topic_name ( const struct nros_subscription_t subscription)

Get the topic name of a subscription.

Parameters

  • subscription - Pointer to a subscription

Returns

  • Pointer to topic name (null-terminated), or NULL if invalid

◆ nros_subscription_get_zero_initialized()

struct nros_subscription_t nros_subscription_get_zero_initialized ( void  )

Get a zero-initialized subscription.

◆ nros_subscription_init()

nros_ret_t nros_subscription_init ( struct nros_subscription_t subscription,
const struct nros_node_t node,
const struct nros_message_type_t type_info,
const char *  topic_name,
nros_subscription_callback_t  callback,
void *  context 
)

Initialize a subscription with default QoS (RELIABLE, KEEP_LAST(10)).

This is the recommended initialization function for most use cases. Uses QOS_PROFILE_DEFAULT which provides reliable delivery.

Parameters

  • subscription - Pointer to a zero-initialized subscription
  • node - Pointer to an initialized node
  • type_info - Pointer to message type information
  • topic_name - Topic name (null-terminated string)
  • callback - Callback function to invoke when messages arrive
  • context - User context pointer passed to callback (can be NULL)

Returns

  • NROS_RET_OK on success
  • NROS_RET_INVALID_ARGUMENT if any required pointer is NULL
  • NROS_RET_NOT_INIT if node is not initialized
  • NROS_RET_ERROR on initialization failure

Safety

  • All required pointers must be valid
  • topic_name must be a valid null-terminated string
  • callback must be a valid function pointer

◆ nros_subscription_init_polling()

nros_ret_t nros_subscription_init_polling ( struct nros_subscription_t subscription,
const struct nros_node_t node,
const struct nros_message_type_t type_info,
const char *  topic_name 
)

Phase 122.3.b — initialize an L1 polling-mode subscription.

Creates the underlying RMW subscriber immediately and stores it inline in the subscription's _opaque field. The caller drains received messages via nros_subscription_try_recv_raw.

Uses default QoS (RELIABLE, KEEP_LAST(10)). For custom QoS, use nros_subscription_init_polling_with_qos.

Parameters

  • subscription - Pointer to a zero-initialized subscription
  • node - Pointer to an initialized node
  • type_info - Pointer to message type information
  • topic_name - Topic name (null-terminated)

Returns

  • NROS_RET_OK on success
  • NROS_RET_INVALID_ARGUMENT if any pointer is NULL or topic empty
  • NROS_RET_NOT_INIT if node / support not initialized
  • NROS_RET_ERROR if subscriber creation failed

Safety

  • All pointers must be valid
  • topic_name must be a valid null-terminated string

◆ nros_subscription_init_polling_with_qos()

nros_ret_t nros_subscription_init_polling_with_qos ( struct nros_subscription_t subscription,
const struct nros_node_t node,
const struct nros_message_type_t type_info,
const char *  topic_name,
const struct nros_qos_t qos 
)

Phase 122.3.b — initialize an L1 polling-mode subscription with custom QoS.

See nros_subscription_init_polling for the threading + lifecycle contract.

Safety

See nros_subscription_init_polling.

◆ nros_subscription_init_with_options()

nros_ret_t nros_subscription_init_with_options ( struct nros_subscription_t subscription,
const struct nros_node_t node,
const struct nros_message_type_t type_info,
const char *  topic_name,
nros_subscription_callback_t  callback,
void *  context,
const struct nros_qos_t qos,
const struct nros_subscription_options_t options 
)

Phase 189.M3 — initialize a subscription with custom QoS + named options.

rclc-style entry point: QoS is passed separately (qos, NULL = default) and the non-QoS axes ride in options (NULL = defaults). Behaves exactly like [nros_subscription_init_with_qos] except that a non-zero options->sched_context is stashed on the subscription so that [nros_executor_register_subscription] binds the resulting executor handle to that scheduling context once the handle is known (entity creation is deferred to registration, so the handle does not exist at init time). options->message_info is RESERVED and ignored (Phase 189.M3.4).

Parameters

  • subscription - Pointer to a zero-initialized subscription
  • node - Pointer to an initialized node
  • type_info - Pointer to message type information
  • topic_name - Topic name (null-terminated string)
  • callback - Callback function to invoke when messages arrive
  • context - User context pointer passed to callback (can be NULL)
  • qos - Pointer to QoS settings (NULL for default)
  • options - Pointer to subscription options (NULL for defaults)

Returns

  • NROS_RET_OK on success
  • NROS_RET_INVALID_ARGUMENT if any required pointer is NULL
  • NROS_RET_NOT_INIT if node is not initialized
  • NROS_RET_ERROR on initialization failure

Safety

  • All required pointers must be valid
  • topic_name must be a valid null-terminated string
  • qos / options may be NULL or point to valid structs

◆ nros_subscription_init_with_qos()

nros_ret_t nros_subscription_init_with_qos ( struct nros_subscription_t subscription,
const struct nros_node_t node,
const struct nros_message_type_t type_info,
const char *  topic_name,
nros_subscription_callback_t  callback,
void *  context,
const struct nros_qos_t qos 
)

Initialize a subscription with custom QoS.

Safety

See nros_subscription_init for safety requirements.

◆ nros_subscription_is_valid()

bool nros_subscription_is_valid ( const struct nros_subscription_t subscription)

Check if subscription is valid (initialized).

Parameters

  • subscription - Pointer to a subscription

Returns

  • true if valid, false if invalid or NULL

◆ nros_subscription_release()

nros_ret_t nros_subscription_release ( struct nros_subscription_t subscription,
void *  token 
)

Phase 124.A.6 — release a previously borrowed view.

token MUST come from a prior nros_subscription_borrow on the SAME subscription; consuming it is mandatory before the subscription's next borrow / destroy.

Safety

  • subscription must be the subscription the token was borrowed from.
  • token must not be NULL and must not be reused after this call.

◆ nros_subscription_set_liveliness_changed_callback()

nros_ret_t nros_subscription_set_liveliness_changed_callback ( struct nros_subscription_t _sub,
nros_event_liveliness_changed_cb_t  _cb,
void *  _user_context 
)

Register a callback for NROS_EVENT_LIVELINESS_CHANGED.

Returns NROS_RMW_RET_UNSUPPORTED until the active backend wires up liveliness-event detection (Phase 109+). Applications can call it today; the event fires once the backend gains support.

Safety

sub must point to a valid, initialised nros_subscription_t. cb must be a valid function pointer or None. user_context is opaque to nros and must outlive the subscription.

◆ nros_subscription_set_message_lost_callback()

nros_ret_t nros_subscription_set_message_lost_callback ( struct nros_subscription_t _sub,
nros_event_subscriber_count_cb_t  _cb,
void *  _user_context 
)

Register a callback for NROS_EVENT_MESSAGE_LOST.

Safety

See [nros_subscription_set_liveliness_changed_callback].

◆ nros_subscription_set_requested_deadline_missed_callback()

nros_ret_t nros_subscription_set_requested_deadline_missed_callback ( struct nros_subscription_t _sub,
uint32_t  _deadline_ms,
nros_event_subscriber_count_cb_t  _cb,
void *  _user_context 
)

Register a callback for NROS_EVENT_REQUESTED_DEADLINE_MISSED.

deadline_ms is the maximum acceptable inter-arrival time for expected samples. When a sample doesn't arrive within this window, the callback fires.

Safety

See [nros_subscription_set_liveliness_changed_callback].

◆ nros_subscription_set_wake_callback()

nros_ret_t nros_subscription_set_wake_callback ( struct nros_subscription_t subscription,
struct nros_wake_state_t state,
void(*)(void *)  cb,
void *  ctx 
)

Phase 122.3.c.6.e — register a C wake callback on an L1 polling-mode subscription. state is a caller-owned nros_wake_state_t (declared next to the subscription) that must outlive the subscription and not move. Pass cb = NULL to disable. The backend wakes the callback when a new message arrives.

Safety

All pointers valid; state storage stable for the subscription's lifetime.

◆ nros_subscription_try_recv_raw()

int32_t nros_subscription_try_recv_raw ( struct nros_subscription_t subscription,
uint8_t *  buf,
size_t  buf_len 
)

Phase 122.3.b — non-blocking poll on an L1 polling-mode subscription. Returns the number of bytes received on success (may be 0 if no data available), or a negative nros_ret_t on error.

Parameters

  • subscription - Pointer to a POLLING-state subscription
  • buf - Caller-supplied buffer to receive the message bytes
  • buf_len - Capacity of buf

Returns

  • >= 0 — number of bytes copied into buf
  • NROS_RET_INVALID_ARGUMENT if any pointer is NULL or state is wrong
  • NROS_RET_ERROR on transport failure

Safety

  • subscription must be in POLLING state
  • buf must point to writable memory of at least buf_len bytes

◆ nros_subscription_try_recv_sequence()

int32_t nros_subscription_try_recv_sequence ( struct nros_subscription_t subscription,
uint8_t *  buf,
size_t  per_msg_cap,
size_t  max_msgs,
size_t *  out_lens 
)

Phase 124.D.1 — burst-take. Drain up to max_msgs queued samples into the contiguous buf block in a single call, with the i-th sample at buf + i * per_msg_cap and length out_lens[i].

buf is a caller-owned contiguous region of at least max_msgs * per_msg_cap bytes. out_lens is a writable array of at least max_msgs size_t slots.

Returns the number of messages delivered (>= 0) on success, or a negative nros_ret_t error code. Partial drains are reported as the count, never as an error.

Safety

  • subscription must be in POLLING state.
  • buf must point to writable memory of at least max_msgs * per_msg_cap bytes.
  • out_lens must point to a writable array of at least max_msgs size_t slots.

◆ nros_subscription_try_recv_validated()

int32_t nros_subscription_try_recv_validated ( struct nros_subscription_t subscription,
uint8_t *  buf,
size_t  buf_len,
struct nros_integrity_status_t out_status 
)

Phase 252 / issue 0073 — non-blocking poll that ALSO returns the E2E integrity status (CRC + sequence gap/dup) of the received sample. The safety-e2e analog of [nros_subscription_try_recv_raw]: it requests validation on the backend (the zenoh shim recomputes + compares the CRC attachment and tracks the sequence) and writes the verdict to *out_status.

Requires the build to enable safety-e2e on both ends (the zenoh backend's own feature, lowered from a declared [safety] axis); otherwise crc_valid reports -1 (no CRC on the wire).

Returns

  • >= 0 — number of bytes copied into buf (0 = no data available)
  • NROS_RET_INVALID_ARGUMENT if subscription/buf is NULL
  • NROS_RET_BAD_SEQUENCE if the subscription is not in POLLING state
  • NROS_RET_ERROR on transport failure

Safety

  • subscription must be a valid POLLING subscription
  • buf must point to writable memory of at least buf_len bytes
  • out_status, if non-NULL, must point to a writable nros_integrity_status_t

◆ nros_support_fini()

nros_ret_t nros_support_fini ( struct nros_support_t support)

Finalize the support context.

This function closes the middleware session and releases all resources.

Parameters

  • support - Pointer to an initialized support context

Returns

  • NROS_RET_OK on success
  • NROS_RET_INVALID_ARGUMENT if support is NULL
  • NROS_RET_NOT_INIT if not initialized

Safety

◆ nros_support_get_zero_initialized()

struct nros_support_t nros_support_get_zero_initialized ( void  )

Get a zero-initialized support context.

Safety

Returns a stack-allocated struct that must be initialized before use.

◆ nros_support_init()

nros_ret_t nros_support_init ( struct nros_support_t support,
const char *  locator,
uint8_t  domain_id 
)

Initialize the support context.

This function initializes the middleware session and prepares the context for creating nodes, publishers, and subscribers.

Parameters

  • support - Pointer to a zero-initialized support context
  • locator - Middleware locator string (e.g., "tcp/127.0.0.1:7447"), or NULL for default
  • domain_id - ROS domain ID (0-232)

Returns

  • NROS_RET_OK on success
  • NROS_RET_INVALID_ARGUMENT if support is NULL
  • NROS_RET_ERROR on initialization failure

Safety

  • support must be a valid pointer to a zero-initialized nros_support_t
  • locator must be a valid null-terminated string or NULL

◆ nros_support_init_named()

nros_ret_t nros_support_init_named ( struct nros_support_t support,
const char *  locator,
uint8_t  domain_id,
const char *  session_name 
)

Initialize the support context with a session name.

Like nros_support_init, but allows specifying a session name for XRCE-DDS. Different XRCE clients on the same agent MUST use different session names; otherwise the agent treats them as the same client and won't relay data between them.

Parameters

  • support - Pointer to a zero-initialized support context
  • locator - Middleware locator string, or NULL for default
  • domain_id - ROS domain ID (0-232)
  • session_name - Session name for XRCE key derivation, or NULL for default

Safety

  • support must be a valid pointer to a zero-initialized nros_support_t
  • locator and session_name must be valid null-terminated strings or NULL

◆ nros_support_is_valid()

bool nros_support_is_valid ( const struct nros_support_t support)

Check if support context is valid (initialized).

Parameters

  • support - Pointer to a support context

Returns

  • true if valid, false if invalid or NULL

◆ nros_time_add()

struct nros_time_t nros_time_add ( struct nros_time_t  time,
struct nros_duration_t  duration 
)

Add a duration to a time.

◆ nros_time_compare()

int nros_time_compare ( struct nros_time_t  a,
struct nros_time_t  b 
)

Compare two times.

◆ nros_time_from_nanoseconds()

struct nros_time_t nros_time_from_nanoseconds ( int64_t  nanoseconds)

Convert nanoseconds to a nros_time_t structure.

◆ nros_time_sub()

struct nros_time_t nros_time_sub ( struct nros_time_t  time,
struct nros_duration_t  duration 
)

Subtract a duration from a time.

◆ nros_time_to_nanoseconds()

int64_t nros_time_to_nanoseconds ( const struct nros_time_t time)

Convert a nros_time_t structure to nanoseconds.

◆ nros_timer_cancel()

nros_ret_t nros_timer_cancel ( struct nros_timer_t timer)

Cancel a timer.

A canceled timer will not fire, but can be reset to start again. If registered with an executor, forwards to the executor's cancel_timer.

Parameters

  • timer - Pointer to an initialized timer

Returns

  • NROS_RET_OK on success
  • NROS_RET_INVALID_ARGUMENT if timer is NULL
  • NROS_RET_NOT_INIT if not initialized

◆ nros_timer_fini()

nros_ret_t nros_timer_fini ( struct nros_timer_t timer)

Finalize a timer.

Parameters

  • timer - Pointer to an initialized timer

Returns

  • NROS_RET_OK on success
  • NROS_RET_INVALID_ARGUMENT if timer is NULL
  • NROS_RET_NOT_INIT if not initialized

◆ nros_timer_get_period()

uint64_t nros_timer_get_period ( const struct nros_timer_t timer)

Get the timer period in nanoseconds.

Parameters

  • timer - Pointer to a timer

Returns

  • Period in nanoseconds, or 0 if invalid

◆ nros_timer_get_time_until_next_call()

uint64_t nros_timer_get_time_until_next_call ( const struct nros_timer_t timer,
uint64_t  current_time_ns 
)

Get the time until next timer firing.

Parameters

  • timer - Pointer to a timer
  • current_time_ns - Current time in nanoseconds

Returns

  • Time until next firing in nanoseconds, or 0 if ready now or invalid

◆ nros_timer_get_zero_initialized()

struct nros_timer_t nros_timer_get_zero_initialized ( void  )

Get a zero-initialized timer.

◆ nros_timer_init()

nros_ret_t nros_timer_init ( struct nros_timer_t timer,
const struct nros_support_t support,
uint64_t  period_ns,
nros_timer_callback_t  callback,
void *  context 
)

Initialize a timer.

Parameters

  • timer - Pointer to a zero-initialized timer
  • support - Pointer to an initialized support context
  • period_ns - Timer period in nanoseconds
  • callback - Callback function to invoke when timer fires
  • context - User context pointer passed to callback (can be NULL)

Returns

  • NROS_RET_OK on success
  • NROS_RET_INVALID_ARGUMENT if any required pointer is NULL or period is 0
  • NROS_RET_NOT_INIT if support is not initialized

Safety

  • All required pointers must be valid
  • callback must be a valid function pointer

◆ nros_timer_is_valid()

bool nros_timer_is_valid ( const struct nros_timer_t timer)

Check if timer is valid (initialized and not shutdown).

Parameters

  • timer - Pointer to a timer

Returns

  • true if valid, false if invalid or NULL

◆ nros_timer_reset()

nros_ret_t nros_timer_reset ( struct nros_timer_t timer)

Reset a timer.

This resets the timer's last call time and starts it running again if it was canceled. If registered with an executor, forwards to the executor's reset_timer.

Parameters

  • timer - Pointer to an initialized timer

Returns

  • NROS_RET_OK on success
  • NROS_RET_INVALID_ARGUMENT if timer is NULL
  • NROS_RET_NOT_INIT if not initialized

◆ nros_wake_state_get_zero_initialized()

struct nros_wake_state_t nros_wake_state_get_zero_initialized ( void  )

Phase 122.3.c.6.e — zero-initialise a wake-state slot.

Variable Documentation

◆ NROS_QOS_DEFAULT

const struct nros_qos_t NROS_QOS_DEFAULT
extern

Default QoS profile (matches rmw_qos_profile_default).

◆ NROS_QOS_SENSOR_DATA

const struct nros_qos_t NROS_QOS_SENSOR_DATA
extern

Sensor data QoS profile (best effort, small depth).

◆ NROS_QOS_SERVICES

const struct nros_qos_t NROS_QOS_SERVICES
extern

Services QoS profile (reliable).

◆ NROS_TRANSPORT_OPS_ABI_VERSION_V1

const uint32_t NROS_TRANSPORT_OPS_ABI_VERSION_V1
extern

Phase 115.A.2 — current ABI version of [nros_transport_ops_t].

C / C++ callers MUST fill in ops.abi_version = NROS_TRANSPORT_OPS_ABI_VERSION_V1 before passing the struct to [nros_set_custom_transport]. Mismatched values are rejected with NROS_RET_ERROR (mapped from TransportError::IncompatibleAbi); cffi consumers see NROS_RMW_RET_INCOMPATIBLE_ABI.