|
libe3 0.6.1
C++ library for E3AP RAN vendor integration
|
A practical guide for an engineer who adds E3SM-L1-KPM to a RAN stack or reads it in a dApp. It is not part of the specification. Where it and the specification differ, the specification wins. Code pointers are allowed here and only here.
The index of the specification is README.md.
The implementation described here predates the present draft of the specification. Annex C lists where it differs from the draft, and the last two clauses of this guide give the evidence in the code.
| Short name | What it is | Revision read |
|---|---|---|
| oai/ | the OpenAirInterface implementation of E3AP and of this service model, https://github.com/duranta-project/openairinterface5g/pull/729 | commit 77e45217b9 of the checkout used for this text |
| libe3/ | this repository: the E3AP library that carries the indications | the branch that introduced these files |
Line numbers drift. Function names are the stable reference. Paths under oai/ start at openair2/E3AP/ unless a full path is given.
| Piece | Location |
|---|---|
| Service model descriptor, worker hooks, indication building | oai/openair2/E3AP/service_models/l1_kpm_sm/l1_kpm_sm.c (create_l1_kpm_sm_model, emit_batch, l1_wait_and_fetch) |
| Public interface of the service model | l1_kpm_sm/l1_kpm_sm.h (L1_KPM_TID_*, l1_kpm_sm_has_subscribers, l1_kpm_sm_set_period_us) |
| Region writer, header, FP16 conversion, publish | l1_kpm_sm/e3_ran_buffers.c and .h (e3_ran_buffers_push_rxdataF, e3_ran_buffers_init_from_phy) |
| Payload codecs | l1_kpm_sm/l1_kpm_enc.c (l1_kpm_enc_indication, l1_kpm_enc_ran_function_data) |
| Grammar and Protocol Buffers file | l1_kpm_sm/MESSAGES/ASN1/V1/e3sm_l1_kpm.asn, l1_kpm_sm/MESSAGES/PROTO/V1/e3sm_l1_kpm.proto |
| Worker thread (wait, cadence, emit) | service_models/e3_sm_worker.c |
| Shared memory creation and the row cursor | service_models/e3_shm_region.c, e3_shm_region.h |
| Publish and wait primitive | service_models/pub_channel.h |
| Call from the PHY | oai/openair1/SCHED_NR/phy_procedures_nr_gNB.c:1267-1272 |
| Cadence rule | oai/openair2/E3AP/e3_agent.c:56-72 (min_subscription_period_us), applied in on_dapp_status_changed |
| Registration | e3_agent.c:214-240 |
| Configuration of the scale factor | config/e3_config.c (fp16_beta), default E3_FP16_BETA_DEFAULT in config/e3_config.h |
| Item of Annex C | Evidence |
|---|---|
| C.19, C.20 | l1_kpm_enc.c, ASN.1 branch of l1_kpm_enc_indication: cellId, nRxAnt, validSymbolMask always set. e3_ran_buffers.c: .cell_id = 0 in the snapshot (line 381) |
| C.22 | l1_kpm_enc.c: pdu.timestamp = (long)slot->timestamp_ns. .proto: int64 timestamp |
| C.3 | comment on L1KPM-Indication in the grammar file: a subscription grants only the four core identifiers, so cellId and nRxAnt are optional |
| C.4 | l1_kpm_enc.c:160-220: the else branch of l1_kpm_enc_ran_function_data writes JSON for every encoding that is not ASN.1 |
| C.23 | l1_kpm_enc.c:207: snprintf with s |
| C.13 | e3_ran_buffers_header_t in e3_ran_buffers.h, reserved[7] |
| C.26 | e3_ran_buffers.c:316-350: the loop runs over ants only. The comment above E3_RB_N_ANTS says "zero-fills the rest" |
| C.16 | e3_ran_buffers.c:207-213 and :300-306: init is retried at each call |
Findings in the code that do not change what the specification says. Severity as in Annex C.
| # | Note | Evidence |
|---|---|---|
| N.1 | The Protocol Buffers file says that it mirrors a grammar file with a different name from the file that exists. A reader looks for a file that is not there. Severity: doc. | header comment of e3sm_l1_kpm.proto |
| N.2 | A comment says that the depth of the buffers gives about 64 ms before the RAN reuses a row. The code has 32 rows, and the time depends on the rate of uplink slots. The 64 ms could not be reproduced from the code. Severity: doc. | comment above E3_RB_NUM_FH_ROWS in e3_ran_buffers.c |
| N.3 | The producer keeps indices and sizes for the PUSCH and channel estimate areas (pusch_buffer_index, hest_buffer_index, hest_data_size). They are always 0 and are not encoded. | e3_ran_buffers_slot_info_t fields written in e3_ran_buffers_push_rxdataF and read nowhere else |
| N.4 | The valid flag of the snapshot is set and never read. | as N.3 |
| N.5 | The header fields num_pusch_rows, num_hest_rows and max_hest_samples_per_row are constants. No code reads them. | not recorded |
| N.6 | A comment says that the header layout matches an external one byte for byte. It could not be tied to code. | a comment in the region code |
| N.7 | The symbol mask uses the slot number as the index into the TDD table. Whether that is right for a TDD period shorter than a frame could not be checked. | e3_ran_buffers.c:352-363 |
| N.8 | The cadence of an absent periodicity: the RAN reads it as 0 through a helper that was not opened. | min_subscription_period_us in e3_agent.c |
| N.9 | A failed encoding or a failed send records one warning, and the later ones are silenced. A dApp that a send misses is counted as skipped for that indication. | not recorded |