What e3_service_model_handle_t points to: a ServiceModel that calls back into C.
More...
What e3_service_model_handle_t points to: a ServiceModel that calls back into C.
Definition at line 32 of file c_api.cpp.
◆ e3_service_model_handle_s()
Copy a descriptor.
- Parameters
-
| desc | What the C caller described |
Definition at line 58 of file c_api.cpp.
◆ answer_control()
| ErrorCode e3_service_model_handle_s::answer_control |
( |
uint32_t | dapp_id, |
|
|
uint32_t | request_id, |
|
|
const ControlResult & | result ) |
|
inline |
◆ control_ids()
| std::vector< uint32_t > e3_service_model_handle_s::control_ids |
( |
| ) |
const |
|
inlineoverridevirtual |
Get control IDs supported by this SM.
- Returns
- The control identifiers the SM supports
Implements libe3::ServiceModel.
Definition at line 86 of file c_api.cpp.
◆ destroy()
| void e3_service_model_handle_s::destroy |
( |
| ) |
|
|
inlineoverridevirtual |
Destroy the SM and release resources.
Called when the SM is being unregistered.
Implements libe3::ServiceModel.
Definition at line 92 of file c_api.cpp.
◆ emit_pdu()
Queue a PDU the SM emits.
- Parameters
-
- Returns
- ErrorCode::SUCCESS if it was queued
Definition at line 137 of file c_api.cpp.
◆ granted_periodicity()
| std::optional< uint32_t > e3_service_model_handle_s::granted_periodicity |
( |
uint32_t | requested_us | ) |
const |
|
inlineoverridevirtual |
The least time between two indications that this SM keeps for a subscription.
Sent to the dApp as the granted periodicity of its SubscriptionResponse. Override it only when the SM itself keeps its indications at least that far apart. The base implementation reports nothing, so the response then carries no periodicity ("not reported").
- Parameters
-
| requested_us | Periodicity the dApp asked for, in microseconds. 0 when it asked for none or for one indication per event. |
- Returns
- Microseconds between two indications. std::nullopt or 0 when the SM keeps no interval or does not say; the response then has none.
Reimplemented from libe3::ServiceModel.
Definition at line 107 of file c_api.cpp.
◆ handle_control_action()
◆ init()
| ErrorCode e3_service_model_handle_s::init |
( |
| ) |
|
|
inlineoverridevirtual |
Initialize the SM.
Called when the SM is first registered.
- Returns
- ErrorCode::SUCCESS on success
Implements libe3::ServiceModel.
Definition at line 88 of file c_api.cpp.
◆ is_running()
| bool e3_service_model_handle_s::is_running |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ name()
| std::string e3_service_model_handle_s::name |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ ran_function_data()
| std::vector< uint8_t > e3_service_model_handle_s::ran_function_data |
( |
| ) |
const |
|
inlineoverridevirtual |
RAN-function-specific opaque data (required, 1..32768 bytes).
Returns the byte vector advertised for this RAN function in the SetupResponse (ranFunctionList->ranFunctionData). E3AP declares the field mandatory and non-empty – OCTET STRING (SIZE (1..262144)), limited to 32768 bytes – so every SM must override this: even the most minimal SM carries at least its own name. An SM with nothing to advertise is not advertisable at all, since ranFunctionList itself is optional but its entries are not.
Registration fails with ErrorCode::INVALID_PARAM if the returned vector is empty or longer than MAX_PROTOCOL_DATA_SIZE. The base implementation returns an empty vector so that failure is a loud diagnostic rather than a compile error in every existing SM; it is not a usable default.
- Returns
- The bytes advertised for this RAN function; registration fails if the vector is empty or oversized.
Reimplemented from libe3::ServiceModel.
Definition at line 87 of file c_api.cpp.
◆ ran_function_id()
| uint32_t e3_service_model_handle_s::ran_function_id |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ start()
| ErrorCode e3_service_model_handle_s::start |
( |
| ) |
|
|
inlineoverridevirtual |
Start the SM processing.
Called when the first dApp subscribes to this SM's RAN function.
- Returns
- ErrorCode::SUCCESS on success
Implements libe3::ServiceModel.
Definition at line 95 of file c_api.cpp.
◆ stop()
| void e3_service_model_handle_s::stop |
( |
| ) |
|
|
inlineoverridevirtual |
Stop the SM processing.
Called when the last dApp unsubscribes from this SM's RAN function.
Implements libe3::ServiceModel.
Definition at line 99 of file c_api.cpp.
◆ telemetry_ids()
| std::vector< uint32_t > e3_service_model_handle_s::telemetry_ids |
( |
| ) |
const |
|
inlineoverridevirtual |
Get telemetry IDs supported by this SM.
- Returns
- The telemetry identifiers the SM supports
Implements libe3::ServiceModel.
Definition at line 85 of file c_api.cpp.
◆ version()
| uint32_t e3_service_model_handle_s::version |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ control_ids_s
| std::vector<uint32_t> e3_service_model_handle_s::control_ids_s |
Control identifiers it supports.
Definition at line 38 of file c_api.cpp.
◆ name_s
| std::string e3_service_model_handle_s::name_s |
Service Model name.
Definition at line 34 of file c_api.cpp.
◆ ran_function_data_s
| std::vector<uint8_t> e3_service_model_handle_s::ran_function_data_s |
Opaque RAN function data.
Definition at line 39 of file c_api.cpp.
◆ ran_function_id_s
| uint32_t e3_service_model_handle_s::ran_function_id_s |
RAN function identifier.
Definition at line 36 of file c_api.cpp.
◆ sm_context
| void* e3_service_model_handle_s::sm_context = nullptr |
Passed to every callback.
Definition at line 49 of file c_api.cpp.
◆ sm_destroy
Called on destruction.
Definition at line 43 of file c_api.cpp.
◆ sm_granted_periodicity
Asked for the interval it keeps.
Definition at line 48 of file c_api.cpp.
◆ sm_init
Called on registration.
Definition at line 42 of file c_api.cpp.
◆ sm_is_running
Called to ask whether the SM runs.
Definition at line 46 of file c_api.cpp.
◆ sm_process_control
Called for each control action.
Definition at line 47 of file c_api.cpp.
◆ sm_start
Called when the SM should start.
Definition at line 44 of file c_api.cpp.
◆ sm_stop
Called when the SM should stop.
Definition at line 45 of file c_api.cpp.
◆ telemetry_ids_s
| std::vector<uint32_t> e3_service_model_handle_s::telemetry_ids_s |
Telemetry identifiers it supports.
Definition at line 37 of file c_api.cpp.
◆ transferred_to_agent
| bool e3_service_model_handle_s::transferred_to_agent = false |
Whether ownership was transferred to an agent.
Definition at line 52 of file c_api.cpp.
◆ version_s
| uint32_t e3_service_model_handle_s::version_s |
Service Model version.
Definition at line 35 of file c_api.cpp.
The documentation for this struct was generated from the following file: