Class to manage multiple subscriptions to services.
More...
Class to manage multiple subscriptions to services.
ServiceSubscriptionManager is used to manage multiple subscriptions to services. Subscriptions are created using information contained in ServiceSubscriptionManagerDetails structures. The subscriptions can connect using URLs or service types. The subscriptions can be enabled or disabled, and can be closed.
◆ ServiceSubscriptionManager()
◆ AddSubscription()
Add a subscription to the manager.
- Parameters
-
details | The subscription to add |
◆ Close()
void RobotRaconteur::ServiceSubscriptionManager::Close |
( |
bool |
close_subscriptions = true | ) |
|
Close the subscription manager.
- Parameters
-
close_subscriptions | (optional) If true, close all subscriptions |
◆ DisableSubscription()
void RobotRaconteur::ServiceSubscriptionManager::DisableSubscription |
( |
const boost::string_ref & |
name, |
|
|
bool |
close = true |
|
) |
| |
Disable a subscription.
- Parameters
-
name | The local name of the subscription to disable |
close | (optional) If true, close subscription if connected |
◆ EnableSubscription()
void RobotRaconteur::ServiceSubscriptionManager::EnableSubscription |
( |
const boost::string_ref & |
name | ) |
|
Enable a subscription.
- Parameters
-
name | The local name of the subscription to enable |
◆ GetNode()
boost::shared_ptr<RobotRaconteurNode> RobotRaconteur::ServiceSubscriptionManager::GetNode |
( |
| ) |
|
Get the node used by the subscription manager.
- Returns
- RR_SHARED_PTR<RobotRaconteurNode> The node
◆ GetSubscription()
boost::shared_ptr<ServiceSubscription> RobotRaconteur::ServiceSubscriptionManager::GetSubscription |
( |
const boost::string_ref & |
name, |
|
|
bool |
force_create = true |
|
) |
| |
Get a subscription by name.
- Parameters
-
name | The local name of the subscription |
force_create | (optional) If true, create the subscription if it does not exist |
- Returns
- RR_SHARED_PTR<ServiceSubscription> The subscription
◆ GetSubscriptionDetails()
Get the details of all subscriptions.
- Returns
- std::vector<ServiceSubscriptionManagerDetails> The list of subscription details
◆ GetSubscriptionNames()
std::vector<std::string> RobotRaconteur::ServiceSubscriptionManager::GetSubscriptionNames |
( |
| ) |
|
Get the names of all subscriptions.
- Returns
- std::vector<std::string> The list of subscription names
◆ Init()
Initialize the subscription manager with a list of subscriptions.
- Parameters
-
details | The list of subscriptions to initialize |
◆ IsConnected()
bool RobotRaconteur::ServiceSubscriptionManager::IsConnected |
( |
const boost::string_ref & |
name | ) |
|
Get if a subscription is connected.
- Parameters
-
name | The local name of the subscription |
- Returns
- bool True if the subscription is connected
◆ IsEnabled()
bool RobotRaconteur::ServiceSubscriptionManager::IsEnabled |
( |
const boost::string_ref & |
name | ) |
|
Get if a subscription is enabled.
- Parameters
-
name | The local name of the subscription |
- Returns
- bool True if the subscription is enabled
◆ RemoveSubscription()
void RobotRaconteur::ServiceSubscriptionManager::RemoveSubscription |
( |
const boost::string_ref & |
name, |
|
|
bool |
close = true |
|
) |
| |
Remove a subscription from the manager.
- Parameters
-
name | The local name of the subscription to remove |
close | (optional) If true, close the subscription |
The documentation for this class was generated from the following file:
- /home/runner/work/robotraconteur/robotraconteur/robotraconteur/RobotRaconteurCore/include/RobotRaconteur/Subscription.h