nros C++ API
Lightweight ROS 2 client for embedded real-time systems (C++ headers)
Loading...
Searching...
No Matches
Classes | Namespaces | Typedefs | Functions | Variables
subscription.hpp File Reference

nros::Subscription<M> — typed topic subscriber. More...

#include <cstdint>
#include <cstddef>
#include <string.h>
#include "nros/config.hpp"
#include "nros/result.hpp"
#include "nros/stream.hpp"
#include "nros_cpp_ffi.h"
#include "nros/node.hpp"
Include dependency graph for subscription.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  nros::Subscription< M >
 
class  nros::Subscription< M >::View
 

Namespaces

namespace  nros
 

Typedefs

typedef void(* nros_cpp_subscription_message_callback_t) (const uint8_t *data, size_t len, void *ctx)
 
typedef void(* nros_cpp_subscription_message_info_callback_t) (const uint8_t *data, size_t len, const uint8_t *attachment, size_t attachment_len, void *ctx)
 

Functions

nros_cpp_ret_t nros_cpp_subscription_register (const nros_cpp_node_t *node, const char *topic, const char *type_name, const char *type_hash, nros_cpp_qos_t qos, nros_cpp_subscription_message_callback_t callback, void *context, uint8_t sched_context, size_t *out_handle_id)
 
nros_cpp_ret_t nros_cpp_subscription_register_with_info (const nros_cpp_node_t *node, const char *topic, const char *type_name, const char *type_hash, nros_cpp_qos_t qos, nros_cpp_subscription_message_info_callback_t callback, void *context, uint8_t sched_context, size_t *out_handle_id)
 

Variables

static constexpr size_t nros::SUBSCRIPTION_TOPIC_NAME_MAX = 256
 

Detailed Description

nros::Subscription<M> — typed topic subscriber.

Typedef Documentation

◆ nros_cpp_subscription_message_callback_t

typedef void(* nros_cpp_subscription_message_callback_t) (const uint8_t *data, size_t len, void *ctx)

◆ nros_cpp_subscription_message_info_callback_t

typedef void(* nros_cpp_subscription_message_info_callback_t) (const uint8_t *data, size_t len, const uint8_t *attachment, size_t attachment_len, void *ctx)

Function Documentation

◆ nros_cpp_subscription_register()

nros_cpp_ret_t nros_cpp_subscription_register ( const nros_cpp_node_t *  node,
const char *  topic,
const char *  type_name,
const char *  type_hash,
nros_cpp_qos_t  qos,
nros_cpp_subscription_message_callback_t  callback,
void *  context,
uint8_t  sched_context,
size_t *  out_handle_id 
)

◆ nros_cpp_subscription_register_with_info()

nros_cpp_ret_t nros_cpp_subscription_register_with_info ( const nros_cpp_node_t *  node,
const char *  topic,
const char *  type_name,
const char *  type_hash,
nros_cpp_qos_t  qos,
nros_cpp_subscription_message_info_callback_t  callback,
void *  context,
uint8_t  sched_context,
size_t *  out_handle_id 
)