libe3 0.6.1
C++ library for E3AP RAN vendor integration
Loading...
Searching...
No Matches
libe3::E3Config Struct Reference

Configuration for E3Agent. More...

#include <types.hpp>

Public Attributes

E3Role role {E3Role::RAN}
 Role: RAN (today's default — binds sockets) or DAPP (connects).
std::string ran_identifier
 Unique identifier for this RAN function (e.g. "DU-1").
std::string dapp_name {"libe3-dapp"}
 dApp name advertised in SetupRequest
std::string dapp_version {"0.0.0"}
 dApp version advertised in SetupRequest
std::string vendor
 Vendor name for SetupRequest (optional).
std::string e3ap_version {"1.0.0"}
 E3AP protocol version advertised during setup.
E3LinkLayer link_layer {E3LinkLayer::ZMQ}
 Link-layer transport (ZMQ or POSIX).
E3TransportLayer transport_layer {E3TransportLayer::IPC}
 Transport-layer protocol (SCTP, TCP, IPC).
uint16_t setup_port {9990}
 Port of the setup channel; the one port of the POSIX link.
uint16_t subscriber_port {9999}
 Port of the inbound control/subscription channel (ZeroMQ).
uint16_t publisher_port {9991}
 Port of the outbound indication/publication channel (ZeroMQ).
std::string setup_endpoint {"ipc:///tmp/dapps/setup"}
 Endpoint URI of the setup channel; the one endpoint of the POSIX link.
std::string subscriber_endpoint {"ipc:///tmp/dapps/dapp_socket"}
 Endpoint URI of the inbound channel (ZeroMQ).
std::string publisher_endpoint {"ipc:///tmp/dapps/e3_socket"}
 Endpoint URI of the outbound channel (ZeroMQ).
size_t socket_buffer_bytes {2 * 1024 * 1024}
 SO_SNDBUF and SO_RCVBUF of the SCTP sockets of the POSIX link, in bytes.
bool sctp_delayed_sack {false}
 Whether SCTP may delay the SACK of a message (POSIX link).
std::vector< std::string > allowed_peers
 Literal addresses a dApp may connect from (POSIX link, RAN role, TCP and SCTP).
size_t maximum_associations {0}
 Most dApps connected at once (POSIX link, RAN role).
EncodingFormat encoding {EncodingFormat::ASN1}
 PDU encoding format (ASN.1 PER or JSON).
uint32_t connect_timeout_ms {5000}
 Connection establishment timeout in milliseconds.
uint32_t recv_timeout_ms {1000}
 Receive operation timeout in milliseconds.
uint32_t send_timeout_ms {1000}
 Send operation timeout in milliseconds.
uint32_t dapp_idle_timeout_s {1800}
 Seconds a RAN waits for a message from a dApp before it removes the dApp.
uint32_t reconnect_interval_ms {1000}
 Milliseconds a dApp waits before it registers with the RAN again (dApp role).
size_t receive_buffer_size {DEFAULT_BUFFER_SIZE}
 Size of the receive buffer in bytes.
size_t send_buffer_size {DEFAULT_BUFFER_SIZE}
 Size of the send buffer in bytes.
size_t io_threads {2}
 Number of I/O threads (used by ZMQ context).
int io_thread_affinity {-1}
 CPU core to pin the subscriber and publisher I/O threads to.
int io_thread_niceness {0}
 Nice value applied to the subscriber and publisher I/O threads.
int log_level {3}
 Logging verbosity: 0=none, 1=error, 2=warn, 3=info, 4=debug, 5=trace.
std::string log_path
 Path of the shared log file. Empty (default) => auto-generated.

Detailed Description

Configuration for E3Agent.

Definition at line 506 of file types.hpp.

Member Data Documentation

◆ allowed_peers

std::vector<std::string> libe3::E3Config::allowed_peers

Literal addresses a dApp may connect from (POSIX link, RAN role, TCP and SCTP).

A connection from any other address is closed at once. Empty accepts every address, which is the default. An IPv4 address is written in dotted form whether the RAN listens on IPv4 or on both families.

Definition at line 572 of file types.hpp.

◆ connect_timeout_ms

uint32_t libe3::E3Config::connect_timeout_ms {5000}

Connection establishment timeout in milliseconds.

Definition at line 591 of file types.hpp.

◆ dapp_idle_timeout_s

uint32_t libe3::E3Config::dapp_idle_timeout_s {1800}

Seconds a RAN waits for a message from a dApp before it removes the dApp.

RAN role only. A dApp that sends nothing for this long is told with a ReleaseMessage, then its registration and subscriptions are dropped and a RAN function it was the last subscriber of is stopped. Only what the dApp sends counts, never what the RAN sends to it. A dApp that registered and never spoke counts from its registration. 0 never removes a dApp for being quiet. The default is Aerial's 1800 s.

Definition at line 605 of file types.hpp.

◆ dapp_name

std::string libe3::E3Config::dapp_name {"libe3-dapp"}

dApp name advertised in SetupRequest

Definition at line 514 of file types.hpp.

◆ dapp_version

std::string libe3::E3Config::dapp_version {"0.0.0"}

dApp version advertised in SetupRequest

Definition at line 515 of file types.hpp.

◆ e3ap_version

std::string libe3::E3Config::e3ap_version {"1.0.0"}

E3AP protocol version advertised during setup.

Definition at line 518 of file types.hpp.

◆ encoding

EncodingFormat libe3::E3Config::encoding {EncodingFormat::ASN1}

PDU encoding format (ASN.1 PER or JSON).

Definition at line 583 of file types.hpp.

◆ io_thread_affinity

int libe3::E3Config::io_thread_affinity {-1}

CPU core to pin the subscriber and publisher I/O threads to.

When set to a non-negative value the subscriber_loop and publisher_loop threads will be pinned to this logical CPU core via pthread_setaffinity_np (Linux only; ignored on other platforms). This eliminates cache-migration overhead and reduces scheduling jitter in sub-millisecond control loops.

-1 (default) disables core pinning.

Definition at line 640 of file types.hpp.

◆ io_thread_niceness

int libe3::E3Config::io_thread_niceness {0}

Nice value applied to the subscriber and publisher I/O threads.

Range -20 (highest priority) to 19 (lowest priority), 0 = system default. A negative value reduces OS scheduling latency at the cost of slightly less CPU time for other processes. Requires appropriate privileges for negative values (CAP_SYS_NICE on Linux).

Applied via setpriority(PRIO_PROCESS, tid, value) on Linux.

Definition at line 652 of file types.hpp.

◆ io_threads

size_t libe3::E3Config::io_threads {2}

Number of I/O threads (used by ZMQ context).

Definition at line 627 of file types.hpp.

◆ link_layer

E3LinkLayer libe3::E3Config::link_layer {E3LinkLayer::ZMQ}

Link-layer transport (ZMQ or POSIX).

Definition at line 528 of file types.hpp.

◆ log_level

int libe3::E3Config::log_level {3}

Logging verbosity: 0=none, 1=error, 2=warn, 3=info, 4=debug, 5=trace.

Definition at line 655 of file types.hpp.

◆ log_path

std::string libe3::E3Config::log_path

Path of the shared log file. Empty (default) => auto-generated.

When left empty the library derives a per-process path of the form /tmp/e3_<role>[_<sanitized-id>]_<euid>.log (see E3Interface ctor). The trailing effective-uid keeps the file owned by whoever opens it, which avoids fs.protected_regular blocking an O_CREAT re-open of a /tmp file owned by a different user (e.g. a root gNB vs. a prior non-sudo run). Set this explicitly to override the location entirely.

Definition at line 667 of file types.hpp.

◆ maximum_associations

size_t libe3::E3Config::maximum_associations {0}

Most dApps connected at once (POSIX link, RAN role).

A connection beyond it is closed at once. 0 is unlimited, the default.

Definition at line 579 of file types.hpp.

◆ publisher_endpoint

std::string libe3::E3Config::publisher_endpoint {"ipc:///tmp/dapps/e3_socket"}

Endpoint URI of the outbound channel (ZeroMQ).

Definition at line 545 of file types.hpp.

◆ publisher_port

uint16_t libe3::E3Config::publisher_port {9991}

Port of the outbound indication/publication channel (ZeroMQ).

Definition at line 536 of file types.hpp.

◆ ran_identifier

std::string libe3::E3Config::ran_identifier

Unique identifier for this RAN function (e.g. "DU-1").

Definition at line 511 of file types.hpp.

◆ receive_buffer_size

size_t libe3::E3Config::receive_buffer_size {DEFAULT_BUFFER_SIZE}

Size of the receive buffer in bytes.

Definition at line 623 of file types.hpp.

◆ reconnect_interval_ms

uint32_t libe3::E3Config::reconnect_interval_ms {1000}

Milliseconds a dApp waits before it registers with the RAN again (dApp role).

When the RAN releases the dApp or the connection to it is lost, or setup did not complete, a dApp that was started with start() stops and starts itself again after this long, and again every this long until the RAN answers. The new session has a new dApp id and none of the subscriptions of the old one: the application subscribes again, and learns that the dApp is back from the setup response handler. A dApp that called release(), or stop(), is not restarted. 0 turns it off, so a dApp stays down until the program calls stop() and start(). The default is Aerial's one second.

Definition at line 620 of file types.hpp.

◆ recv_timeout_ms

uint32_t libe3::E3Config::recv_timeout_ms {1000}

Receive operation timeout in milliseconds.

Definition at line 592 of file types.hpp.

◆ role

E3Role libe3::E3Config::role {E3Role::RAN}

Role: RAN (today's default — binds sockets) or DAPP (connects).

Definition at line 508 of file types.hpp.

◆ sctp_delayed_sack

bool libe3::E3Config::sctp_delayed_sack {false}

Whether SCTP may delay the SACK of a message (POSIX link).

false, the default, turns delayed SACK off, which is what OCUDU does on both peers. Ignored by TCP, IPC and ZeroMQ.

Definition at line 563 of file types.hpp.

◆ send_buffer_size

size_t libe3::E3Config::send_buffer_size {DEFAULT_BUFFER_SIZE}

Size of the send buffer in bytes.

Definition at line 624 of file types.hpp.

◆ send_timeout_ms

uint32_t libe3::E3Config::send_timeout_ms {1000}

Send operation timeout in milliseconds.

Definition at line 593 of file types.hpp.

◆ setup_endpoint

std::string libe3::E3Config::setup_endpoint {"ipc:///tmp/dapps/setup"}

Endpoint URI of the setup channel; the one endpoint of the POSIX link.

Definition at line 543 of file types.hpp.

◆ setup_port

uint16_t libe3::E3Config::setup_port {9990}

Port of the setup channel; the one port of the POSIX link.

Definition at line 534 of file types.hpp.

◆ socket_buffer_bytes

size_t libe3::E3Config::socket_buffer_bytes {2 * 1024 * 1024}

SO_SNDBUF and SO_RCVBUF of the SCTP sockets of the POSIX link, in bytes.

Set on both peers before the association exists. With the Linux defaults an SCTP message of megabytes waits seconds for the send buffer and the delayed SACK; the library caps a PDU well below that today, so the setting shows only once it grows. 0 keeps the kernel's size. Ignored by TCP, IPC and ZeroMQ.

Definition at line 555 of file types.hpp.

◆ subscriber_endpoint

std::string libe3::E3Config::subscriber_endpoint {"ipc:///tmp/dapps/dapp_socket"}

Endpoint URI of the inbound channel (ZeroMQ).

Definition at line 544 of file types.hpp.

◆ subscriber_port

uint16_t libe3::E3Config::subscriber_port {9999}

Port of the inbound control/subscription channel (ZeroMQ).

Definition at line 535 of file types.hpp.

◆ transport_layer

E3TransportLayer libe3::E3Config::transport_layer {E3TransportLayer::IPC}

Transport-layer protocol (SCTP, TCP, IPC).

Definition at line 530 of file types.hpp.

◆ vendor

std::string libe3::E3Config::vendor

Vendor name for SetupRequest (optional).

Definition at line 516 of file types.hpp.


The documentation for this struct was generated from the following file: