#include <dapp_subscription_state.hpp>
Definition at line 36 of file dapp_subscription_state.hpp.
◆ DAppSubscriptionState() [1/2]
| libe3::DAppSubscriptionState::DAppSubscriptionState |
( |
| ) |
|
|
default |
◆ DAppSubscriptionState() [2/2]
| libe3::DAppSubscriptionState::DAppSubscriptionState |
( |
const DAppSubscriptionState & | | ) |
|
|
delete |
◆ active_subscriptions()
| std::vector< uint32_t > libe3::DAppSubscriptionState::active_subscriptions |
( |
| ) |
const |
|
inline |
◆ clear_session()
| void libe3::DAppSubscriptionState::clear_session |
( |
| ) |
|
|
inline |
◆ expire_subscriptions()
| std::vector< uint32_t > libe3::DAppSubscriptionState::expire_subscriptions |
( |
std::chrono::steady_clock::time_point | now | ) |
|
|
inline |
Forget every subscription whose time is up at now.
- Parameters
-
| now | instant each subscription's deadline is compared against |
- Returns
- the RAN functions whose subscription was forgotten
Definition at line 95 of file dapp_subscription_state.hpp.
◆ operator=()
◆ record_setup_response()
| void libe3::DAppSubscriptionState::record_setup_response |
( |
uint32_t | dapp_id, |
|
|
std::vector< RanFunctionDef > | functions ) |
|
inline |
◆ record_subscription()
| void libe3::DAppSubscriptionState::record_subscription |
( |
uint32_t | ran_function_id, |
|
|
uint32_t | subscription_id, |
|
|
std::optional< std::chrono::steady_clock::time_point > | expires_at = std::nullopt ) |
|
inline |
Record a successful SubscriptionResponse. Idempotent: re-recording the same (rf_id, sub_id) is fine.
- Parameters
-
| ran_function_id | RAN function the subscription is for |
| subscription_id | Subscription id the RAN assigned |
| expires_at | When the subscriptionTime the dApp asked for runs out, unset for no limit. The RAN ends the subscription without a message, so the dApp forgets it too, see expire_subscriptions(). Counted from the response, so it is never earlier than the RAN's. |
Definition at line 77 of file dapp_subscription_state.hpp.
◆ remove_subscription_by_id()
| bool libe3::DAppSubscriptionState::remove_subscription_by_id |
( |
uint32_t | subscription_id | ) |
|
|
inline |
Remove the subscription with a given subscription ID.
- Returns
- true if a subscription was removed; false if none existed.
Definition at line 136 of file dapp_subscription_state.hpp.
◆ remove_subscription_by_rf()
| bool libe3::DAppSubscriptionState::remove_subscription_by_rf |
( |
uint32_t | ran_function_id | ) |
|
|
inline |
Remove the subscription for a given RAN function.
- Returns
- true if a subscription was removed; false if none existed.
Definition at line 119 of file dapp_subscription_state.hpp.
◆ subscribed_ran_functions()
| std::vector< uint32_t > libe3::DAppSubscriptionState::subscribed_ran_functions |
( |
| ) |
const |
|
inline |
◆ subscription_id_for()
| std::optional< uint32_t > libe3::DAppSubscriptionState::subscription_id_for |
( |
uint32_t | ran_function_id | ) |
const |
|
inline |
◆ assigned_dapp_id
| std::optional<uint32_t> libe3::DAppSubscriptionState::assigned_dapp_id |
◆ mu
| std::mutex libe3::DAppSubscriptionState::mu |
|
mutable |
◆ ran_function_expiry
| std::unordered_map<uint32_t, std::chrono::steady_clock::time_point> libe3::DAppSubscriptionState::ran_function_expiry |
◆ ran_function_to_subscription_id
| std::unordered_map<uint32_t, uint32_t> libe3::DAppSubscriptionState::ran_function_to_subscription_id |
◆ remote_ran_functions
| std::vector<RanFunctionDef> libe3::DAppSubscriptionState::remote_ran_functions |
◆ subscription_id_to_ran_function
| std::unordered_map<uint32_t, uint32_t> libe3::DAppSubscriptionState::subscription_id_to_ran_function |
The documentation for this class was generated from the following file: