libe3 0.6.1
C++ library for E3AP RAN vendor integration
Loading...
Searching...
No Matches
types.hpp File Reference

E3AP Protocol Types - Vendor-neutral type definitions. More...

#include <cstdint>
#include <cstddef>
#include <string>
#include <vector>
#include <variant>
#include <optional>
#include <chrono>
#include <memory>
#include "libe3/error_codes.h"

Go to the source code of this file.

Classes

struct  libe3::EncodedMessage
 Encoded message wrapper. More...
struct  libe3::RanFunctionDefinition
 RAN Function definition (SM identification). More...
struct  libe3::SetupRequest
 E3AP Setup Request structure. More...
struct  libe3::RanFunctionDef
 RAN Function Definition for Setup Response. More...
struct  libe3::SetupResponse
 E3AP Setup Response structure. More...
struct  libe3::SubscriptionRequest
 E3AP Subscription Request structure. More...
struct  libe3::SubscriptionDelete
 E3AP Subscription Delete structure. More...
struct  libe3::SubscriptionResponse
 E3AP Subscription Response structure. More...
struct  libe3::IndicationMessage
 E3AP Indication Message structure. More...
struct  libe3::DAppControlAction
 E3AP dApp Control Action structure. More...
struct  libe3::MessageAck
 E3AP Message Acknowledgment structure. More...
struct  libe3::ControlResponse
 E3AP Control Response structure. More...
struct  libe3::ControlResult
 What a Service Model answers to a control (see ServiceModel::respond_to_control). More...
struct  libe3::DAppReport
 E3AP dApp Report structure. More...
struct  libe3::XAppControlAction
 E3AP xApp Control Action structure. More...
struct  libe3::ReleaseMessage
 E3AP Release Message structure. More...
struct  libe3::Pdu
 Generic E3AP PDU structure. More...
struct  libe3::E3Config
 Configuration for E3Agent. More...
struct  libe3::DAppEntry
 dApp registration entry More...
struct  libe3::SubscriptionEntry
 Subscription entry representing dApp-RAN function association. More...

Namespaces

namespace  libe3

Macros

#define X(name, val)
 Expands one entry of the shared error-code list to an enumerator.
#define X(name, val)
 Expands one entry of the shared error-code list to an enumerator.

Typedefs

using libe3::PduChoice
 Generic E3AP PDU using std::variant for type-safe union.
using libe3::Timestamp = std::chrono::time_point<std::chrono::steady_clock>
 Timestamp type using steady_clock for monotonic time.

Enumerations

enum class  libe3::EncodingFormat : uint8_t { libe3::ASN1 = 0 , libe3::JSON = 1 , libe3::PROTOBUF = 2 }
 E3AP encoding formats supported by the library. More...
enum class  libe3::E3LinkLayer : uint8_t { libe3::ZMQ = 0 , libe3::POSIX = 1 }
 Link layer types (matches Python E3LinkLayer). More...
enum class  libe3::E3Role : uint8_t { libe3::RAN = 0 , libe3::DAPP = 1 }
 Role this E3 endpoint plays in the protocol. More...
enum class  libe3::E3TransportLayer : uint8_t { libe3::SCTP = 0 , libe3::TCP = 1 , libe3::IPC = 2 }
 Transport layer types (matches Python E3TransportLayer). More...
enum class  libe3::ActionType : uint8_t { libe3::INSERT = 0 , libe3::UPDATE = 1 , libe3::DELETE = 2 }
 E3AP action types for Setup and Subscription requests. More...
enum class  libe3::ResponseCode : uint8_t { libe3::POSITIVE = 0 , libe3::NEGATIVE = 1 }
 E3AP response codes. More...
enum class  libe3::Cause : uint8_t {
  libe3::UNSPECIFIED = 0 , libe3::PROTOCOL_ERROR = 1 , libe3::SETUP_REQUIRED = 2 , libe3::SETUP_ALREADY_COMPLETE = 3 ,
  libe3::UNSUPPORTED_PROTOCOL_VERSION = 4 , libe3::UNSUPPORTED_RAN_FUNCTION = 5 , libe3::UNSUPPORTED_IDENTIFIER = 6 , libe3::INVALID_REQUEST = 7 ,
  libe3::NOT_FOUND = 8 , libe3::DUPLICATE = 9 , libe3::RESOURCE_EXHAUSTED = 10 , libe3::AUTHORIZATION_REJECTED = 11 ,
  libe3::PAYLOAD_TOO_LARGE = 12 , libe3::TRANSPORT_OVERRUN = 13 , libe3::SHUTTING_DOWN = 14
}
 Why a RAN refused a request (E3-Cause). More...
enum class  libe3::DisconnectReason : uint8_t { libe3::RELEASED_BY_RAN = 0 , libe3::CONNECTION_LOST = 1 }
 Why a dApp's session with the RAN ended (see DisconnectHandler). More...
enum class  libe3::PduType : uint8_t {
  libe3::SETUP_REQUEST = 0 , libe3::SETUP_RESPONSE = 1 , libe3::SUBSCRIPTION_REQUEST = 2 , libe3::SUBSCRIPTION_DELETE = 3 ,
  libe3::SUBSCRIPTION_RESPONSE = 4 , libe3::INDICATION_MESSAGE = 5 , libe3::DAPP_CONTROL_ACTION = 6 , libe3::DAPP_REPORT = 7 ,
  libe3::XAPP_CONTROL_ACTION = 8 , libe3::RELEASE_MESSAGE = 9 , libe3::MESSAGE_ACK = 10 , libe3::CONTROL_RESPONSE = 11
}
 E3AP PDU types. More...
enum class  libe3::AgentState : uint8_t {
  libe3::UNINITIALIZED = 0 , libe3::INITIALIZED = 1 , libe3::CONNECTING = 2 , libe3::CONNECTED = 3 ,
  libe3::RUNNING = 4 , libe3::STOPPING = 5 , libe3::STOPPED = 6 , libe3::ERROR = 7
}
 Agent state machine states. More...
enum class  libe3::ErrorCode : int { libe3::LIBE3_ERROR_CODE_LIST }
 Error codes returned by libe3 operations Use shared error-code list (see libe3/error_codes.h). More...

Functions

uint64_t libe3::now_realtime_ns () noexcept
 Current realtime clock reading, in nanoseconds since the Unix epoch.
const char * libe3::ErrorCodeToString (ErrorCode code)
 Convert ErrorCode to string name (C++ wrapper).
const char * libe3::pdu_type_to_string (PduType type) noexcept
 Convert PduType to string representation.
const char * libe3::action_type_to_string (ActionType type) noexcept
 Convert ActionType to string representation.
const char * libe3::response_code_to_string (ResponseCode code) noexcept
 Convert ResponseCode to string representation.
const char * libe3::cause_to_string (Cause cause) noexcept
 Convert Cause to the name E3AP gives it in JSON and in logs.
Cause libe3::cause_from_string (const std::string &name) noexcept
 Read a Cause from its E3AP name.
Cause libe3::cause_from_value (long value) noexcept
 Read a Cause from its wire value.
const char * libe3::error_code_to_string (ErrorCode code) noexcept
 Convert ErrorCode to string representation.
const char * libe3::agent_state_to_string (AgentState state) noexcept
 Convert AgentState to string representation.
const char * libe3::role_to_string (E3Role role) noexcept
 Convert E3Role to string representation.
const char * libe3::link_layer_to_string (E3LinkLayer layer) noexcept
 Convert E3LinkLayer to string representation.
const char * libe3::transport_layer_to_string (E3TransportLayer layer) noexcept
 Convert E3TransportLayer to string representation.

Variables

constexpr size_t libe3::MAX_PROTOCOL_DATA_SIZE = 32768
 Largest protocolData of an indication, in bytes.
constexpr size_t libe3::MAX_ACTION_DATA_SIZE = 32768
 Largest actionData of a dApp control action, in bytes.
constexpr size_t libe3::MAX_DAPP_REPORT_DATA_SIZE = 32768
 Largest reportData of a dApp report, in bytes.
constexpr size_t libe3::MAX_XAPP_CTRL_DATA_SIZE = 32768
 Largest xAppControlData of an xApp control action, in bytes.
constexpr size_t libe3::MAX_PENDING_CONTROLS = 1024
 Most dApp controls a RAN holds an answer for at once.
constexpr size_t libe3::MAX_CONTROL_OUTCOME_SIZE = 32768
 Largest controlOutcome of a control response, in bytes.
constexpr size_t libe3::MAX_RAN_FUNCTIONS = 64
 ranFunctionList SIZE (0..64)
constexpr size_t libe3::MAX_IDENTIFIER_LIST_SIZE = 256
 telemetry and control lists SIZE (0..256)
constexpr size_t libe3::DEFAULT_BUFFER_SIZE = 60000
 Default encode and receive buffer size, in bytes.
constexpr size_t libe3::MAX_DETAIL_SIZE = 512
 Largest detail text of a negative response, in bytes (E3-Text).
constexpr uint32_t libe3::LIBE3_PROTOCOL_VERSION = 1
 Protocol version this library speaks.

Detailed Description

E3AP Protocol Types - Vendor-neutral type definitions.

This header defines all E3AP protocol types and structures used throughout the libe3 library. These types are designed to be RAN-agnostic and can be used by any RAN vendor integrating with the E3AP protocol.

SPDX-FileCopyrightText: Copyright (c) 2026 Northeastern University SPDX-License-Identifier: Apache-2.0

Definition in file types.hpp.

Macro Definition Documentation

◆ X [1/2]

#define X ( name,
val )
Value:
case val: return #name;

Expands one entry of the shared error-code list to an enumerator.

Definition at line 179 of file types.hpp.

◆ X [2/2]

#define X ( name,
val )
Value:
name = val,

Expands one entry of the shared error-code list to an enumerator.

Definition at line 179 of file types.hpp.