|
|
# group `subscribe` {#group__subscribe}
|
|
|
# group `subscribe`
|
|
|
|
|
|
[Subscribe](api-subscribe.md#classmcx__cpp_1_1Subscribe) class is used to receive continuous parameter updates from motorcortex server. It simplifies creating and removing subscription groups.
|
|
|
|
... | ... | @@ -29,24 +29,24 @@ |
|
|
|
|
|
## Members
|
|
|
|
|
|
#### `public `[`Subscribe`](#group__subscribe_1gac12c65d1f31eb82da508703bf2fcf33a)`() = delete` {#group__subscribe_1gac12c65d1f31eb82da508703bf2fcf33a}
|
|
|
#### `public `[`Subscribe`](#group__subscribe_1gac12c65d1f31eb82da508703bf2fcf33a)`() = delete`
|
|
|
|
|
|
#### `public explicit `[`Subscribe`](#group__subscribe_1gaa08311096d99de2bb2a8fa7a5c89868e)`(const Request & request)` {#group__subscribe_1gaa08311096d99de2bb2a8fa7a5c89868e}
|
|
|
#### `public explicit `[`Subscribe`](#group__subscribe_1gaa08311096d99de2bb2a8fa7a5c89868e)`(const Request & request)`
|
|
|
|
|
|
Creates new [Subscribe](api-subscribe.md#classmcx__cpp_1_1Subscribe).
|
|
|
|
|
|
#### Parameters
|
|
|
* `request` - reference to a [Request](api-request.md#classmcx__cpp_1_1Request) instance.
|
|
|
|
|
|
#### `public `[`~Subscribe`](#group__subscribe_1gaa4046923c47d2e34bf98722ec3409765)`()` {#group__subscribe_1gaa4046923c47d2e34bf98722ec3409765}
|
|
|
#### `public `[`~Subscribe`](#group__subscribe_1gaa4046923c47d2e34bf98722ec3409765)`()`
|
|
|
|
|
|
Destructor.
|
|
|
|
|
|
#### `public std::string `[`url`](#group__subscribe_1ga21378cbaf16bcdcd1de51a55fa52769f)`() const` {#group__subscribe_1ga21378cbaf16bcdcd1de51a55fa52769f}
|
|
|
#### `public std::string `[`url`](#group__subscribe_1ga21378cbaf16bcdcd1de51a55fa52769f)`() const`
|
|
|
|
|
|
Returns connection URL.
|
|
|
|
|
|
#### `public StatusReply `[`connect`](#group__subscribe_1ga85535612b83d8198695a04f281485683)`(std::string url)` {#group__subscribe_1ga85535612b83d8198695a04f281485683}
|
|
|
#### `public StatusReply `[`connect`](#group__subscribe_1ga85535612b83d8198695a04f281485683)`(std::string url)`
|
|
|
|
|
|
Opens a subscribe connection.
|
|
|
|
... | ... | @@ -56,7 +56,7 @@ Opens a subscribe connection. |
|
|
#### Returns
|
|
|
status of the connection.
|
|
|
|
|
|
#### `public StatusReply `[`connect`](#group__subscribe_1ga96cae01189b9ae60848cc6dde4466d7b)`(std::string url,ConnectionOptions connection_options)` {#group__subscribe_1ga96cae01189b9ae60848cc6dde4466d7b}
|
|
|
#### `public StatusReply `[`connect`](#group__subscribe_1ga96cae01189b9ae60848cc6dde4466d7b)`(std::string url,ConnectionOptions connection_options)`
|
|
|
|
|
|
Opens a subscribe connection.
|
|
|
|
... | ... | @@ -68,11 +68,11 @@ Opens a subscribe connection. |
|
|
#### Returns
|
|
|
status of the connection.
|
|
|
|
|
|
#### `public void `[`close`](#group__subscribe_1ga9f2a81da4076999ead76c802c8583043)`()` {#group__subscribe_1ga9f2a81da4076999ead76c802c8583043}
|
|
|
#### `public void `[`close`](#group__subscribe_1ga9f2a81da4076999ead76c802c8583043)`()`
|
|
|
|
|
|
Closes connection to the server.
|
|
|
|
|
|
#### `public SubscriptionReply `[`subscribe`](#group__subscribe_1gafb213ffb792de4fc6d3c2656ee64666d)`(std::vector< std::string > path_list,const std::string & group_alias,size_t frequency_divider) const` {#group__subscribe_1gafb213ffb792de4fc6d3c2656ee64666d}
|
|
|
#### `public SubscriptionReply `[`subscribe`](#group__subscribe_1gafb213ffb792de4fc6d3c2656ee64666d)`(std::vector< std::string > path_list,const std::string & group_alias,size_t frequency_divider) const`
|
|
|
|
|
|
Create a subscription group for a list of the parameters.
|
|
|
|
... | ... | @@ -86,7 +86,7 @@ Create a subscription group for a list of the parameters. |
|
|
#### Returns
|
|
|
a subscription handle, which acts as a Promise, it is resolved when subscription is ready or failed. After the subscription is ready the handle is used to retrieve latest data.
|
|
|
|
|
|
#### `public StatusReply `[`unsubscribe`](#group__subscribe_1gaf7b3173f6fbd1ce9128e26e3e3a7e575)`(const Subscription & subscription) const` {#group__subscribe_1gaf7b3173f6fbd1ce9128e26e3e3a7e575}
|
|
|
#### `public StatusReply `[`unsubscribe`](#group__subscribe_1gaf7b3173f6fbd1ce9128e26e3e3a7e575)`(const Subscription & subscription) const`
|
|
|
|
|
|
Unsubscribes from the group.
|
|
|
|
... | ... | @@ -96,21 +96,21 @@ Unsubscribes from the group. |
|
|
#### Returns
|
|
|
a promise, which resolves when the unsubscribe operation is complete, fails otherwise.
|
|
|
|
|
|
#### `public `[`Subscription`](#group__subscribe_1gaa8d1cd42785d3d717f41281aeab0b9e0)`()` {#group__subscribe_1gaa8d1cd42785d3d717f41281aeab0b9e0}
|
|
|
#### `public `[`Subscription`](#group__subscribe_1gaa8d1cd42785d3d717f41281aeab0b9e0)`()`
|
|
|
|
|
|
#### `public explicit `[`Subscription`](#group__subscribe_1ga561e819d903760bbde7aacb10cd450d6)`(Status status)` {#group__subscribe_1ga561e819d903760bbde7aacb10cd450d6}
|
|
|
#### `public explicit `[`Subscription`](#group__subscribe_1ga561e819d903760bbde7aacb10cd450d6)`(Status status)`
|
|
|
|
|
|
#### `public explicit `[`Subscription`](#group__subscribe_1gafb1fc2a9d7827741630b632dc331a9c4)`(const `[`motorcortex_GroupStatusMsg`](api-undefined.md#struct__motorcortex__GroupStatusMsg)` & group_status_msg)` {#group__subscribe_1gafb1fc2a9d7827741630b632dc331a9c4}
|
|
|
#### `public explicit `[`Subscription`](#group__subscribe_1gafb1fc2a9d7827741630b632dc331a9c4)`(const `[`motorcortex_GroupStatusMsg`](api-undefined.md#struct__motorcortex__GroupStatusMsg)` & group_status_msg)`
|
|
|
|
|
|
#### `public std::vector< GetParameter > `[`read`](#group__subscribe_1gacab9468f4efd9f06f01981748b9b1b2c)`() const` {#group__subscribe_1gacab9468f4efd9f06f01981748b9b1b2c}
|
|
|
#### `public std::vector< GetParameter > `[`read`](#group__subscribe_1gacab9468f4efd9f06f01981748b9b1b2c)`() const`
|
|
|
|
|
|
#### `public static void `[`notify`](#group__subscribe_1ga61e648d5109217a424fbe6713b47c05f)`(const std::function< void(std::vector< GetParameter >)> & clb)` {#group__subscribe_1ga61e648d5109217a424fbe6713b47c05f}
|
|
|
#### `public static void `[`notify`](#group__subscribe_1ga61e648d5109217a424fbe6713b47c05f)`(const std::function< void(std::vector< GetParameter >)> & clb)`
|
|
|
|
|
|
#### `public uint32_t `[`id`](#group__subscribe_1ga1efe7e1df7a5b98765e5df2aad7af8c1)`() const` {#group__subscribe_1ga1efe7e1df7a5b98765e5df2aad7af8c1}
|
|
|
#### `public uint32_t `[`id`](#group__subscribe_1ga1efe7e1df7a5b98765e5df2aad7af8c1)`() const`
|
|
|
|
|
|
#### `public std::string `[`alias`](#group__subscribe_1ga8f803530e658663f60c099e14700a9bc)`() const` {#group__subscribe_1ga8f803530e658663f60c099e14700a9bc}
|
|
|
#### `public std::string `[`alias`](#group__subscribe_1ga8f803530e658663f60c099e14700a9bc)`() const`
|
|
|
|
|
|
# class `mcx_cpp::Subscribe` {#classmcx__cpp_1_1Subscribe}
|
|
|
# class `mcx_cpp::Subscribe`
|
|
|
|
|
|
## Summary
|
|
|
|
... | ... | @@ -119,7 +119,7 @@ a promise, which resolves when the unsubscribe operation is complete, fails othe |
|
|
|
|
|
## Members
|
|
|
|
|
|
# class `mcx_cpp::Subscription` {#classmcx__cpp_1_1Subscription}
|
|
|
# class `mcx_cpp::Subscription`
|
|
|
|
|
|
```
|
|
|
class mcx_cpp::Subscription
|
... | ... | |