34 #ifndef _uORBManager_hpp_ 35 #define _uORBManager_hpp_ 47 #define ORBSet std::set<std::string> 50 #ifdef ORB_COMMUNICATOR 65 #ifdef ORB_COMMUNICATOR
165 int priority,
unsigned int queue_size = 1);
302 int orb_check(
int handle,
bool *updated);
313 int orb_stat(
int handle, uint64_t *time);
368 #ifdef ORB_COMMUNICATOR 388 bool is_remote_subscriber_present(
const char *messageName);
411 #ifdef ORB_COMMUNICATOR 415 ORBSet _remote_subscriber_topics;
425 #ifdef ORB_COMMUNICATOR 438 virtual int16_t process_remote_topic(
const char *topic_name,
bool isAdvertisement);
452 virtual int16_t process_add_subscription(
const char *messageName, int32_t msgRateInHz);
464 virtual int16_t process_remove_subscription(
const char *messageName);
480 virtual int16_t process_received_message(
const char *messageName, int32_t length, uint8_t *data);
483 #ifdef ORB_USE_PUBLISHER_RULES 485 struct PublisherRule {
487 const char *module_name;
488 bool ignore_other_topics;
494 bool startsWith(
const char *pre,
const char *str);
499 bool findTopic(
const PublisherRule &rule,
const char *topic_name);
504 void strTrim(
const char **str);
515 int readPublisherRulesFromFile(
const char *file_name, PublisherRule &rule);
517 PublisherRule _publisher_rule;
518 bool _has_publisher_rules =
false;
int node_advertise(const struct orb_metadata *meta, bool is_advertiser, int *instance=nullptr, int priority=ORB_PRIO_DEFAULT)
Advertise a node; don't consider it an error if the node has already been advertised.
DeviceMaster * _device_master
static uORB::Manager * get_instance()
Method to get the singleton instance for the uORB::Manager.
int orb_set_interval(int handle, unsigned interval)
Set the minimum interval between which updates are seen for a subscription.
uORB::DeviceMaster * get_device_master()
Get the DeviceMaster.
static bool initialize()
Initialize the singleton.
int orb_unsubscribe(int handle)
Unsubscribe from a topic.
static bool terminate()
Terminate the singleton.
int orb_subscribe(const struct orb_metadata *meta)
Subscribe to a topic.
int node_open(const struct orb_metadata *meta, bool advertiser, int *instance=nullptr, int priority=ORB_PRIO_DEFAULT)
Common implementation for orb_advertise and orb_subscribe.
orb_advert_t orb_advertise_multi(const struct orb_metadata *meta, const void *data, int *instance, int priority, unsigned int queue_size=1)
Advertise as the publisher of a topic.
int orb_unadvertise(orb_advert_t handle)
Unadvertise a topic.
int orb_priority(int handle, int32_t *priority)
Return the priority of the topic.
__BEGIN_DECLS typedef void * orb_advert_t
ORB topic advertiser handle.
int orb_publish(const struct orb_metadata *meta, orb_advert_t handle, const void *data)
Publish new data to a topic.
Class passed to the communication link implement to provide callback for received messages over a cha...
int orb_subscribe_multi(const struct orb_metadata *meta, unsigned instance)
Subscribe to a multi-instance of a topic.
int orb_copy(const struct orb_metadata *meta, int handle, void *buffer)
Fetch data from a topic.
static Manager * _Instance
int orb_exists(const struct orb_metadata *meta, int instance)
Check if a topic has already been created and published (advertised)
Interface to enable remote subscriptions.
orb_advert_t orb_advertise(const struct orb_metadata *meta, const void *data, unsigned int queue_size=1)
Advertise as the publisher of a topic.
int orb_get_interval(int handle, unsigned *interval)
Get the minimum interval between which updates are seen for a subscription.
Master control device for ObjDev.
int orb_check(int handle, bool *updated)
Check whether a topic has been published to since the last orb_copy.
int orb_stat(int handle, uint64_t *time)
Return the last time that the topic was updated.
This is implemented as a singleton.