|
libe3 0.2.5
C++ library for E3AP RAN vendor integration
|
Namespaces | |
| namespace | e3ap |
| namespace | py |
Classes | |
| class | DAppSubscriptionState |
| class | E3Agent |
| E3Agent - Main façade for RAN vendor integration. More... | |
| class | E3Connector |
| Abstract base class for E3AP transport connectors. More... | |
| class | E3Encoder |
| Abstract base class for E3AP encoders. More... | |
| class | E3Interface |
| E3Interface - Internal protocol coordination. More... | |
| class | LockFreeQueue |
| Lock-free bounded blocking queue. More... | |
| class | Logger |
| Logger singleton class. More... | |
| class | LogStream |
| Log stream helper for efficient message construction. More... | |
| class | MpmcQueue |
| Lock-free bounded MPMC ring buffer. More... | |
| class | ServiceModel |
| Abstract Service Model interface. More... | |
| class | SmRegistry |
| SM Registry for managing registered Service Models. More... | |
| struct | SubscriptionDetails |
| Per-subscription metadata stored by the SubscriptionManager. More... | |
| class | SubscriptionManager |
| E3 Subscription Manager. More... | |
| struct | EncodedMessage |
| Encoded message wrapper. More... | |
| struct | RanFunctionDefinition |
| RAN Function definition (SM identification). More... | |
| struct | SetupRequest |
| E3AP Setup Request structure. More... | |
| struct | RanFunctionDef |
| RAN Function Definition for Setup Response. More... | |
| struct | SetupResponse |
| E3AP Setup Response structure. More... | |
| struct | SubscriptionRequest |
| E3AP Subscription Request structure. More... | |
| struct | SubscriptionDelete |
| E3AP Subscription Delete structure. More... | |
| struct | SubscriptionResponse |
| E3AP Subscription Response structure. More... | |
| struct | IndicationMessage |
| E3AP Indication Message structure. More... | |
| struct | DAppControlAction |
| E3AP dApp Control Action structure. More... | |
| struct | MessageAck |
| E3AP Message Acknowledgment structure. More... | |
| struct | DAppReport |
| E3AP dApp Report structure. More... | |
| struct | XAppControlAction |
| E3AP xApp Control Action structure. More... | |
| struct | ReleaseMessage |
| E3AP Release Message structure. More... | |
| struct | Pdu |
| Generic E3AP PDU structure. More... | |
| struct | E3Config |
| Configuration for E3Agent. More... | |
| struct | DAppEntry |
| dApp registration entry More... | |
| struct | SubscriptionEntry |
| Subscription entry representing dApp-RAN function association. More... | |
| class | PosixE3Connector |
| POSIX socket-based E3 connector. More... | |
| class | ZmqE3Connector |
| ZeroMQ-based E3 connector. More... | |
| class | Asn1E3Encoder |
| ASN.1 APER encoder implementation. More... | |
| class | JsonE3Encoder |
| JSON encoder for E3AP PDUs. More... | |
| class | ProtobufE3Encoder |
| Protocol Buffers encoder implementation. More... | |
Typedefs | |
| using | DAppReportHandler = std::function<void(const DAppReport&)> |
| using | DAppStatusChangedHandler = std::function<void()> |
| using | SetupResponseHandler = std::function<void(const SetupResponse&)> |
| using | SubscriptionResponseHandler = std::function<void(const SubscriptionResponse&)> |
| using | IndicationHandler = std::function<void(const IndicationMessage&)> |
| using | XAppControlHandler = std::function<void(const XAppControlAction&)> |
| using | MessageAckHandler = std::function<void(const MessageAck&)> |
| template<typename T> | |
| using | EncodeResult = tl::expected<T, ErrorCode> |
| Result type for encoding/decoding operations. | |
| using | SetupRequestHandler = std::function<ResponseCode(const SetupRequest&, SetupResponse&)> |
| Callback types for E3Interface events. | |
| using | SubscriptionRequestHandler = std::function<ResponseCode(const SubscriptionRequest&)> |
| using | LogCallback = std::function<void(LogLevel level, const std::string& component, const std::string& message)> |
| Log callback function type. | |
| using | SmFactory = std::function<std::unique_ptr<ServiceModel>()> |
| Factory function type for creating SM instances. | |
| using | SmLifecycleCallback = std::function<void(uint32_t ran_function_id, bool should_start)> |
| Callback type for SM lifecycle events. | |
| using | PduChoice |
| Generic E3AP PDU using std::variant for type-safe union. | |
| using | Timestamp = std::chrono::time_point<std::chrono::steady_clock> |
| Timestamp type using steady_clock for monotonic time. | |
Enumerations | |
| enum class | LogLevel : int { NONE = 0 , ERROR = 1 , WARN = 2 , INFO = 3 , DEBUG = 4 , TRACE = 5 } |
| Logging levels. More... | |
| enum class | EncodingFormat : uint8_t { ASN1 = 0 , JSON = 1 , PROTOBUF = 2 } |
| E3AP encoding formats supported by the library. More... | |
| enum class | E3LinkLayer : uint8_t { ZMQ = 0 , POSIX = 1 } |
| Link layer types (matches Python E3LinkLayer). More... | |
| enum class | E3Role : uint8_t { RAN = 0 , DAPP = 1 } |
| Role this E3 endpoint plays in the protocol. More... | |
| enum class | E3TransportLayer : uint8_t { SCTP = 0 , TCP = 1 , IPC = 2 } |
| Transport layer types (matches Python E3TransportLayer). More... | |
| enum class | ActionType : uint8_t { INSERT = 0 , UPDATE = 1 , DELETE = 2 } |
| E3AP action types for Setup and Subscription requests. More... | |
| enum class | ResponseCode : uint8_t { POSITIVE = 0 , NEGATIVE = 1 } |
| E3AP response codes. More... | |
| enum class | PduType : uint8_t { SETUP_REQUEST = 0 , SETUP_RESPONSE = 1 , SUBSCRIPTION_REQUEST = 2 , SUBSCRIPTION_DELETE = 3 , SUBSCRIPTION_RESPONSE = 4 , INDICATION_MESSAGE = 5 , DAPP_CONTROL_ACTION = 6 , DAPP_REPORT = 7 , XAPP_CONTROL_ACTION = 8 , RELEASE_MESSAGE = 9 , MESSAGE_ACK = 10 } |
| E3AP PDU types. More... | |
| enum class | AgentState : uint8_t { UNINITIALIZED = 0 , INITIALIZED = 1 , CONNECTING = 2 , CONNECTED = 3 , RUNNING = 4 , STOPPING = 5 , STOPPED = 6 , ERROR = 7 } |
| Agent state machine states. More... | |
| enum class | ErrorCode : int { LIBE3_ERROR_CODE_LIST } |
| Error codes returned by libe3 operations Use shared error-code list (see libe3/error_codes.h). More... | |
Functions | |
| const char * | version () noexcept |
| Get libe3 version string. | |
| void | version (int &major, int &minor, int &patch) noexcept |
| Get libe3 version as components. | |
| std::unique_ptr< E3Connector > | create_connector (E3LinkLayer link_layer, E3TransportLayer transport_layer, const std::string &setup_endpoint, const std::string &inbound_endpoint, const std::string &outbound_endpoint, uint16_t setup_port, uint16_t inbound_port, uint16_t outbound_port, size_t io_threads=2, E3Role role=E3Role::RAN) |
| Factory function to create appropriate connector. | |
| std::unique_ptr< E3Encoder > | create_encoder (EncodingFormat format) |
| Factory function to create appropriate encoder. | |
| void | cpu_relax () noexcept |
| Emit a CPU-level pause/yield hint inside spin-wait loops. | |
| uint64_t | now_realtime_ns () noexcept |
| Current realtime clock reading, in nanoseconds since the Unix epoch. | |
| const char * | ErrorCodeToString (ErrorCode code) |
| Convert ErrorCode to string name (C++ wrapper). | |
| const char * | pdu_type_to_string (PduType type) noexcept |
| Convert PduType to string representation. | |
| const char * | action_type_to_string (ActionType type) noexcept |
| Convert ActionType to string representation. | |
| const char * | response_code_to_string (ResponseCode code) noexcept |
| Convert ResponseCode to string representation. | |
| const char * | error_code_to_string (ErrorCode code) noexcept |
| Convert ErrorCode to string representation. | |
| const char * | agent_state_to_string (AgentState state) noexcept |
| Convert AgentState to string representation. | |
| const char * | role_to_string (E3Role role) noexcept |
| Convert E3Role to string representation. | |
| const char * | link_layer_to_string (E3LinkLayer layer) noexcept |
| Convert E3LinkLayer to string representation. | |
| const char * | transport_layer_to_string (E3TransportLayer layer) noexcept |
| Convert E3TransportLayer to string representation. | |
Variables | |
| static constexpr size_t | CACHE_LINE_SIZE = 64 |
| Assumed cache-line size (bytes) used for alignment padding. | |
| constexpr size_t | MAX_PROTOCOL_DATA_SIZE = 32768 |
| constexpr size_t | MAX_ACTION_DATA_SIZE = 32768 |
| constexpr size_t | MAX_DAPP_REPORT_DATA_SIZE = 32768 |
| constexpr size_t | MAX_XAPP_CTRL_DATA_SIZE = 32768 |
| constexpr size_t | MAX_RAN_FUNCTIONS = 255 |
| constexpr size_t | DEFAULT_BUFFER_SIZE = 60000 |
| constexpr uint32_t | LIBE3_PROTOCOL_VERSION = 1 |
| typedef std::function< void(const DAppReport &)> libe3::DAppReportHandler = std::function<void(const DAppReport&)> |
Callback for incoming dApp reports (dApp → RAN). Set before start() to handle reports.
Definition at line 30 of file e3_agent.hpp.
| typedef std::function< void()> libe3::DAppStatusChangedHandler = std::function<void()> |
Callback when dApp status changes (connect, disconnect, subscribe, unsubscribe).
Definition at line 33 of file e3_agent.hpp.
| using libe3::EncodeResult = tl::expected<T, ErrorCode> |
Result type for encoding/decoding operations.
Definition at line 26 of file e3_encoder.hpp.
| typedef std::function< void(const IndicationMessage &)> libe3::IndicationHandler = std::function<void(const IndicationMessage&)> |
Definition at line 38 of file e3_agent.hpp.
| using libe3::LogCallback = std::function<void(LogLevel level, const std::string& component, const std::string& message)> |
Log callback function type.
Allows external logging frameworks to receive log messages.
| level | Log level |
| component | Component name (e.g., "E3Agent", "Connector") |
| message | Log message |
Definition at line 50 of file logger.hpp.
| typedef std::function< void(const MessageAck &)> libe3::MessageAckHandler = std::function<void(const MessageAck&)> |
Definition at line 40 of file e3_agent.hpp.
| using libe3::PduChoice |
Generic E3AP PDU using std::variant for type-safe union.
| using libe3::SetupRequestHandler = std::function<ResponseCode(const SetupRequest&, SetupResponse&)> |
Callback types for E3Interface events.
Definition at line 41 of file e3_interface.hpp.
| typedef std::function< void(const SetupResponse &)> libe3::SetupResponseHandler = std::function<void(const SetupResponse&)> |
Definition at line 36 of file e3_agent.hpp.
| using libe3::SmFactory = std::function<std::unique_ptr<ServiceModel>()> |
Factory function type for creating SM instances.
Definition at line 219 of file sm_interface.hpp.
| using libe3::SmLifecycleCallback = std::function<void(uint32_t ran_function_id, bool should_start)> |
Callback type for SM lifecycle events.
Called when a RAN function gains its first subscriber or loses its last subscriber. This allows the E3Agent to start/stop Service Models as needed.
| ran_function_id | The RAN function ID |
| should_start | True if SM should start, false if it should stop |
Definition at line 45 of file subscription_manager.hpp.
| using libe3::SubscriptionRequestHandler = std::function<ResponseCode(const SubscriptionRequest&)> |
Definition at line 42 of file e3_interface.hpp.
| typedef std::function< void(const SubscriptionResponse &)> libe3::SubscriptionResponseHandler = std::function<void(const SubscriptionResponse&)> |
Definition at line 37 of file e3_agent.hpp.
| using libe3::Timestamp = std::chrono::time_point<std::chrono::steady_clock> |
| typedef std::function< void(const XAppControlAction &)> libe3::XAppControlHandler = std::function<void(const XAppControlAction&)> |
Definition at line 39 of file e3_agent.hpp.
|
strong |
|
strong |
Agent state machine states.
|
strong |
Link layer types (matches Python E3LinkLayer).
| Enumerator | |
|---|---|
| ZMQ | ZeroMQ-based transport. |
| POSIX | POSIX socket-based transport. |
|
strong |
Role this E3 endpoint plays in the protocol.
RAN is the existing behaviour: the agent binds the setup/inbound/outbound sockets and answers dApp requests. DAPP is the symmetric client side: the agent connects to those endpoints and drives setup/subscribe/release.
Default is RAN so that any caller compiled against earlier libe3 headers keeps today's behaviour.
| Enumerator | |
|---|---|
| RAN | RAN function (binds sockets; today's only behaviour). |
| DAPP | dApp (connects to a RAN agent) |
|
strong |
Transport layer types (matches Python E3TransportLayer).
| Enumerator | |
|---|---|
| SCTP | SCTP (O-RAN standard). |
| TCP | TCP. |
| IPC | Unix Domain Sockets / IPC. |
|
strong |
|
strong |
Error codes returned by libe3 operations Use shared error-code list (see libe3/error_codes.h).
| Enumerator | |
|---|---|
| LIBE3_ERROR_CODE_LIST | |
|
strong |
Logging levels.
| Enumerator | |
|---|---|
| NONE | |
| ERROR | |
| WARN | |
| INFO | |
| DEBUG | |
| TRACE | |
Definition at line 33 of file logger.hpp.
|
strong |
|
strong |
|
inlinenoexcept |
Convert ActionType to string representation.
|
inlinenoexcept |
Convert AgentState to string representation.
|
inlinenoexcept |
Emit a CPU-level pause/yield hint inside spin-wait loops.
Reduces power consumption and inter-core bus traffic while spinning. On architectures without a dedicated pause instruction this is a no-op.
Definition at line 202 of file mpmc_queue.hpp.
| std::unique_ptr< E3Connector > libe3::create_connector | ( | E3LinkLayer | link_layer, |
| E3TransportLayer | transport_layer, | ||
| const std::string & | setup_endpoint, | ||
| const std::string & | inbound_endpoint, | ||
| const std::string & | outbound_endpoint, | ||
| uint16_t | setup_port, | ||
| uint16_t | inbound_port, | ||
| uint16_t | outbound_port, | ||
| size_t | io_threads = 2, | ||
| E3Role | role = E3Role::RAN ) |
Factory function to create appropriate connector.
Creates a connector instance based on the link and transport layers specified.
| link_layer | Link layer to use (ZMQ or POSIX) |
| transport_layer | Transport layer to use (SCTP, TCP, or IPC) |
| setup_endpoint | Endpoint for setup channel |
| inbound_endpoint | Endpoint for inbound channel |
| outbound_endpoint | Endpoint for outbound channel |
| io_threads | Number of I/O threads (for ZMQ) |
Definition at line 18 of file connector_factory.cpp.
| std::unique_ptr< E3Encoder > libe3::create_encoder | ( | EncodingFormat | format | ) |
Factory function to create appropriate encoder.
Creates an encoder instance based on the encoding format specified.
| format | Encoding format to use |
Definition at line 46 of file encoder_factory.cpp.
|
inlinenoexcept |
|
inline |
|
inlinenoexcept |
Convert E3LinkLayer to string representation.
|
inlinenoexcept |
Current realtime clock reading, in nanoseconds since the Unix epoch.
This is the clock behind every producer-side timestamp libE3 puts on the wire, chosen so the value stays comparable across hosts (bounded by whatever NTP or PTP discipline is in place) rather than being meaningful only within one process.
CLOCK_REALTIME, not a monotonic clock. It can step backwards or jump when the system clock is adjusted, and it must never be subtracted from a monotonic reading to derive a duration.
|
inlinenoexcept |
|
inlinenoexcept |
Convert ResponseCode to string representation.
|
inlinenoexcept |
|
inlinenoexcept |
Convert E3TransportLayer to string representation.
|
inlinenoexcept |
|
inlinenoexcept |
|
staticconstexpr |
Assumed cache-line size (bytes) used for alignment padding.
Definition at line 30 of file mpmc_queue.hpp.