|
libe3 0.2.5
C++ library for E3AP RAN vendor integration
|
E3Interface - Internal protocol coordination. More...
#include <e3_interface.hpp>
Public Member Functions | |
| E3Interface (const E3Config &config) | |
| Construct with configuration. | |
| ~E3Interface () | |
| Destructor - ensures clean shutdown. | |
| E3Interface (const E3Interface &)=delete | |
| E3Interface & | operator= (const E3Interface &)=delete |
| E3Interface (E3Interface &&)=delete | |
| E3Interface & | operator= (E3Interface &&)=delete |
| ErrorCode | init () |
| Initialize the interface. | |
| ErrorCode | start () |
| Start the interface processing loops. | |
| void | stop () |
| Stop the interface. | |
| AgentState | state () const noexcept |
| Get current state. | |
| bool | is_running () const noexcept |
| Check if interface is running. | |
| SubscriptionManager & | subscription_manager () noexcept |
| Get the subscription manager. | |
| LockFreeQueue< Pdu > & | response_queue () noexcept |
| Get the response queue for outbound messages. | |
| ErrorCode | queue_outbound (Pdu pdu) |
| Queue a PDU for outbound transmission. | |
| std::vector< uint32_t > | get_available_ran_functions () const |
| Get available RAN functions. | |
| ErrorCode | register_sm (std::unique_ptr< ServiceModel > sm) |
| Register a Service Model. | |
| void | set_dapp_report_handler (DAppReportHandler handler) |
| void | set_dapp_status_changed_handler (DAppStatusChangedHandler handler) |
| void | set_setup_response_handler (SetupResponseHandler handler) |
| void | set_subscription_response_handler (SubscriptionResponseHandler handler) |
| void | set_indication_handler (IndicationHandler handler) |
| void | set_xapp_control_handler (XAppControlHandler handler) |
| void | set_message_ack_handler (MessageAckHandler handler) |
| std::optional< uint32_t > | dapp_id () const noexcept |
| std::vector< uint32_t > | active_subscription_ids () const |
| std::vector< uint32_t > | subscribed_ran_functions () const |
| std::vector< RanFunctionDef > | remote_ran_functions () const |
| ErrorCode | queue_subscription_request (uint32_t ran_function_id, std::vector< uint32_t > telemetry_ids, std::vector< uint32_t > control_ids, std::optional< uint32_t > sub_time=std::nullopt, std::optional< uint32_t > periodicity=std::nullopt, uint32_t *out_request_id=nullptr) |
| ErrorCode | queue_subscription_delete (uint32_t ran_function_id) |
| ErrorCode | queue_dapp_control_action (uint32_t ran_function_id, uint32_t control_id, std::vector< uint8_t > action_data, uint32_t sequence_id=0, uint32_t *out_message_id=nullptr) |
| ErrorCode | queue_dapp_report (uint32_t ran_function_id, std::vector< uint8_t > report_data, uint32_t sequence_id, uint32_t *out_message_id=nullptr) |
| ErrorCode | queue_release_message () |
| ErrorCode | wait_for_setup (std::chrono::milliseconds timeout) |
| void | notify_dapp_status_changed () |
| uint32_t | generate_message_id () |
| Generate the next message ID, monotonic within 1..4294967295. | |
| uint32_t | sanitize_request_message_id (uint32_t request_id) |
| Return a request id that can be echoed into a response. | |
E3Interface - Internal protocol coordination.
This class is the internal coordination layer that:
This class is NOT directly exposed to library users. Users interact with the E3Agent facade which owns an E3Interface instance.
Definition at line 65 of file e3_interface.hpp.
|
explicit |
Construct with configuration.
Definition at line 157 of file e3_interface.cpp.
| libe3::E3Interface::~E3Interface | ( | ) |
Destructor - ensures clean shutdown.
Definition at line 178 of file e3_interface.cpp.
|
delete |
|
delete |
| std::vector< uint32_t > libe3::E3Interface::active_subscription_ids | ( | ) | const |
Definition at line 1338 of file e3_interface.cpp.
|
noexcept |
Definition at line 1332 of file e3_interface.cpp.
| uint32_t libe3::E3Interface::generate_message_id | ( | ) |
Generate the next message ID, monotonic within 1..4294967295.
Wraps a lock-free counter into the ASN.1 E3-MessageID range, skipping 0. Monotonic (not random) so an id is unique, letting a caller correlate a response by the id it was assigned.
Definition at line 127 of file e3_interface.cpp.
| std::vector< uint32_t > libe3::E3Interface::get_available_ran_functions | ( | ) | const |
Get available RAN functions.
Definition at line 387 of file e3_interface.cpp.
| ErrorCode libe3::E3Interface::init | ( | ) |
Initialize the interface.
Creates connector, encoder, and initializes internal state.
Definition at line 183 of file e3_interface.cpp.
|
inlinenoexcept |
Check if interface is running.
Definition at line 114 of file e3_interface.hpp.
| void libe3::E3Interface::notify_dapp_status_changed | ( | ) |
Definition at line 423 of file e3_interface.cpp.
|
delete |
|
delete |
| ErrorCode libe3::E3Interface::queue_dapp_control_action | ( | uint32_t | ran_function_id, |
| uint32_t | control_id, | ||
| std::vector< uint8_t > | action_data, | ||
| uint32_t | sequence_id = 0, | ||
| uint32_t * | out_message_id = nullptr ) |
Definition at line 1416 of file e3_interface.cpp.
| ErrorCode libe3::E3Interface::queue_dapp_report | ( | uint32_t | ran_function_id, |
| std::vector< uint8_t > | report_data, | ||
| uint32_t | sequence_id, | ||
| uint32_t * | out_message_id = nullptr ) |
Definition at line 1449 of file e3_interface.cpp.
Queue a PDU for outbound transmission.
Definition at line 358 of file e3_interface.cpp.
| ErrorCode libe3::E3Interface::queue_release_message | ( | ) |
Definition at line 1482 of file e3_interface.cpp.
| ErrorCode libe3::E3Interface::queue_subscription_delete | ( | uint32_t | ran_function_id | ) |
Definition at line 1392 of file e3_interface.cpp.
| ErrorCode libe3::E3Interface::queue_subscription_request | ( | uint32_t | ran_function_id, |
| std::vector< uint32_t > | telemetry_ids, | ||
| std::vector< uint32_t > | control_ids, | ||
| std::optional< uint32_t > | sub_time = std::nullopt, | ||
| std::optional< uint32_t > | periodicity = std::nullopt, | ||
| uint32_t * | out_request_id = nullptr ) |
Definition at line 1354 of file e3_interface.cpp.
| ErrorCode libe3::E3Interface::register_sm | ( | std::unique_ptr< ServiceModel > | sm | ) |
Register a Service Model.
Definition at line 391 of file e3_interface.cpp.
| std::vector< RanFunctionDef > libe3::E3Interface::remote_ran_functions | ( | ) | const |
Definition at line 1348 of file e3_interface.cpp.
|
inlinenoexcept |
Get the response queue for outbound messages.
Definition at line 128 of file e3_interface.hpp.
| uint32_t libe3::E3Interface::sanitize_request_message_id | ( | uint32_t | request_id | ) |
Return a request id that can be echoed into a response.
The decoders do not enforce integer range constraints, so a peer-supplied message id of 0, outside E3-MessageID's 1..4294967295, can reach the handlers; echoing it into a response would fail the encode. Every non-zero id passes through unchanged, 0 is replaced with a fresh generated id.
Definition at line 148 of file e3_interface.cpp.
|
inline |
Definition at line 151 of file e3_interface.hpp.
|
inline |
Definition at line 155 of file e3_interface.hpp.
|
inline |
Definition at line 166 of file e3_interface.hpp.
|
inline |
Definition at line 172 of file e3_interface.hpp.
|
inline |
Definition at line 160 of file e3_interface.hpp.
|
inline |
Definition at line 163 of file e3_interface.hpp.
|
inline |
Definition at line 169 of file e3_interface.hpp.
| ErrorCode libe3::E3Interface::start | ( | ) |
Start the interface processing loops.
Spawns the setup, inbound, and outbound threads, plus the report worker on the RAN role.
Definition at line 241 of file e3_interface.cpp.
|
inlinenoexcept |
Get current state.
Definition at line 109 of file e3_interface.hpp.
| void libe3::E3Interface::stop | ( | ) |
Stop the interface.
Signals all threads to stop and waits for them to finish.
Definition at line 289 of file e3_interface.cpp.
| std::vector< uint32_t > libe3::E3Interface::subscribed_ran_functions | ( | ) | const |
Definition at line 1343 of file e3_interface.cpp.
|
inlinenoexcept |
Get the subscription manager.
Definition at line 121 of file e3_interface.hpp.
| ErrorCode libe3::E3Interface::wait_for_setup | ( | std::chrono::milliseconds | timeout | ) |
Definition at line 1495 of file e3_interface.cpp.