libe3 0.6.1
C++ library for E3AP RAN vendor integration
Loading...
Searching...
No Matches
E3AP: procedure flow

The procedures of E3AP, in the order a dApp uses them: Setup, Subscription, Indication, Control, Report and Release. Each procedure has a purpose, the steps of each side, the successful operation, the unsuccessful operation and the abnormal conditions.

This is clause 7 of the specification. The index is README.md. The messages are in 02-ie-mapping.md. The rules for ranges, clocks and errors are in 05-semantics-and-constraints.md.

Roles

Table: Roles in the procedures

Role Who What it does
dApp an application next to the RAN starts Setup, Subscription, dApp Control, dApp Report and Release. Receives Indication, xApp Control, Release and the answer to a dApp Control. Answers an xApp Control that asks for it.
E3 Agent the E3 entity in the RAN node answers Setup and Subscription. Sends Indication, xApp Control and the answer to a dApp Control. Hosts the RAN functions.
Service model the definition of one RAN function gives meaning to the payloads. Starts and stops with the first and the last subscriber.
RIC side an xApp and the E2 interface sends xApp Control through the E3 Agent. Receives dApp Report through the E3 Agent. See E2SM-DAPP.

Messages on the flow

Table: Which message starts which procedure

Procedure Request Response or result Channel of the request
Setup SETUP REQUEST SETUP RESPONSE setup
Subscription SUBSCRIPTION REQUEST SUBSCRIPTION RESPONSE inbound to the E3 Agent
Subscription delete SUBSCRIPTION DELETE SUBSCRIPTION RESPONSE inbound to the E3 Agent
Indication INDICATION none outbound from the E3 Agent
dApp Control dApp CONTROL ACTION CONTROL RESPONSE, when the dApp asks for it, and always for a refusal by the E3 Agent inbound to the E3 Agent
dApp Report dApp REPORT none inbound to the E3 Agent
xApp Control xApp CONTROL ACTION CONTROL RESPONSE from the dApp, when the E3 Agent asks for it outbound from the E3 Agent
Release RELEASE none either direction
sequenceDiagram
participant D as dApp
participant A as E3 Agent
D->>A: SETUP REQUEST
A-->>D: SETUP RESPONSE (dApp id, RAN functions)
D->>A: SUBSCRIPTION REQUEST
A-->>D: SUBSCRIPTION RESPONSE (subscription id)
loop while subscribed
A-->>D: INDICATION
D->>A: dApp CONTROL ACTION (requestAck)
A-->>D: CONTROL RESPONSE
D->>A: dApp REPORT
A-->>D: xApp CONTROL ACTION (requestAck)
D->>A: CONTROL RESPONSE
end
D->>A: SUBSCRIPTION DELETE
A-->>D: SUBSCRIPTION RESPONSE
D->>A: RELEASE

Setup

Purpose

The Setup procedure registers a dApp with an E3 Agent. It gives the dApp an identifier and tells it which RAN functions exist.

Procedure

  1. The dApp sends a SETUP REQUEST message on the setup channel. The message holds the protocol version, the name of the dApp, the version of the dApp and the vendor.
  2. The E3 Agent decodes the message and assigns the lowest free dApp identifier.
  3. The E3 Agent builds the RAN function list from its service models. It leaves out a RAN function that does not fit the limits in 01-identity-and-registration.md.
  4. The E3 Agent sends a SETUP RESPONSE message. It sets requestId to the message identifier of the request.

Successful operation

The SETUP RESPONSE message has responseCode "positive". It holds dAppIdentifier, ranIdentifier, e3apProtocolVersion and ranFunctionList. The dApp keeps the dApp identifier and the RAN function list. The dApp may subscribe from now.

Unsuccessful operation

The E3 Agent shall answer with responseCode "negative" when it cannot register the dApp, for example when it has no free dApp identifier. A negative response has no dAppIdentifier. The E3 Agent shall also answer with a negative response when the message does not decode or is not a SETUP REQUEST message. The response then has no ranFunctionList. The E3 Agent should give the reason in cause and detail: resourceExhausted when it has no free dApp identifier, protocolError when the message is not a SETUP REQUEST message, and unsupportedProtocolVersion when it refuses the version string.

A dApp that receives a negative response has no session. It shall not send other messages.

Abnormal conditions

  • The dApp gets no response. It shall send the request again. The E3 Agent has no memory of the first attempt, so each attempt that reaches it registers a new dApp. A late response to an earlier attempt leaves one identifier registered with no owner. The E3 Agent frees it only when a RELEASE message names it.
  • The E3 Agent receives a version string that it does not support. It may answer with "negative". An implementation that does not check the version answers "positive".
  • The message identifier of the request is 0. The E3 Agent shall put a new message identifier in requestId, because 0 is not a valid value.

Subscription

Purpose

The Subscription procedure tells the E3 Agent that a dApp uses a RAN function. It starts the service model of the RAN function if the dApp is its first subscriber.

Procedure

  1. The dApp sends a SUBSCRIPTION REQUEST message on the inbound channel. It names the RAN function and lists the telemetry identifiers and the control identifiers that it wants. It may add a time limit and an interval.
  2. The E3 Agent checks that the dApp is registered.
  3. The E3 Agent adds the subscription. The key of a subscription is the pair of dApp and RAN function. It assigns the lowest free subscription identifier.
  4. If this is the first subscriber of the RAN function, the E3 Agent starts the service model.
  5. The E3 Agent sends a SUBSCRIPTION RESPONSE message.

Successful operation

The SUBSCRIPTION RESPONSE message has responseCode "positive" and holds subscriptionId. It also lists the telemetry identifiers and control identifiers that the E3 Agent grants, the RAN function identifier and the interval that it keeps. The dApp keeps the subscription identifier. A grant list that is missing means that the E3 Agent does not report the grant. A grant list that is empty means that it grants nothing.

A second SUBSCRIPTION REQUEST message for the same RAN function from the same dApp returns the existing subscription identifier and "positive". It does not create a second subscription and it does not change the existing one: the grant lists and the interval in the response are those that the E3 Agent holds, not those of the second request. A dApp that wants other lists or another interval sends a SUBSCRIPTION DELETE message and then a new SUBSCRIPTION REQUEST message. That is the only way that all known E3 Agents handle alike. A second request that the E3 Agent refuses leaves the existing subscription as it was.

The interval in the response is in microseconds. It is the least time that the E3 Agent keeps between two indications of the subscription. Indications can be further apart, because the E3 Agent sends them when it has data. It is not a copy of the interval in the request: a service model that keeps a larger interval reports that one. A missing interval means that the E3 Agent does not report one, which does not mean that it keeps none. The value 0 means that it keeps none and is sent as a missing interval. The RAN function identifier in the response is for information, and a dApp shall not depend on it.

Unsuccessful operation

The E3 Agent shall answer "negative" and shall not create a subscription when one of these holds. It gives the cause in cause and a text in detail.

Table: Reasons to refuse a SUBSCRIPTION REQUEST message

The E3 Agent finds that cause
the dApp has not completed the Setup procedure setupRequired
the RAN function identifier is not in its RAN function list unsupportedRanFunction
the telemetry list and the control list are both empty invalidRequest
a telemetry identifier or a control identifier is not offered by the RAN function unsupportedIdentifier
it has no free subscription identifier resourceExhausted

The check of an identifier is against the lists that the RAN function advertises in the SETUP RESPONSE message. A RAN function that has controls accepts a request that names one of them. The E3 Agent shall not start the service model for a request that it refuses.

Abnormal conditions

  • The time limit ends. The E3 Agent removes the subscription and sends nothing. It stops the service model if the subscription was the last one. A time of 0 or a missing time means no limit.
  • The dApp sends the same request again after the time limit has ended and before the E3 Agent removes the subscription. The E3 Agent renews the subscription under the same identifier.
  • The service model fails to start. The E3 Agent still answers "positive". The dApp receives no indication.

Subscription delete

Purpose

The Subscription delete procedure ends one subscription.

Procedure

  1. The dApp sends a SUBSCRIPTION DELETE message with the subscription identifier.
  2. The E3 Agent removes the subscription.
  3. If the subscription was the last one for the RAN function, the E3 Agent stops the service model.
  4. The E3 Agent sends a SUBSCRIPTION RESPONSE message.

Successful operation

The response has responseCode "positive" and subscriptionId. The subscription identifier is free again.

Unsuccessful operation

The response has responseCode "negative" when the subscription identifier is unknown, belongs to another dApp, or has already ended. The cause is notFound, or setupRequired when the dApp has not completed the Setup procedure.

Abnormal conditions

  • A subscription that has passed its time limit can still be deleted with "positive" until the E3 Agent removes it. The E3 Agent checks for such subscriptions every 250 ms.

Indication

Purpose

The Indication procedure delivers telemetry from a RAN function to a dApp.

Procedure

  1. The service model produces a payload.
  2. The E3 Agent puts the payload in protocolData of an INDICATION message. It names the dApp and the RAN function.
  3. The E3 Agent sends the message on the outbound channel.
  4. The dApp reads dAppIdentifier. If the identifier is not its own, the dApp ignores the message. Otherwise it gives the payload to its handler.

Successful operation

The dApp handler receives the payload. There is no response.

Unsuccessful operation

There is no response. If the outbound queue of the E3 Agent is full, the E3 Agent drops the message.

Abnormal conditions

  • On a link that broadcasts (ZeroMQ), every dApp receives every INDICATION message, and the check of dAppIdentifier is the only filter. On a POSIX link the E3 Agent sends an INDICATION message on the connection of the dApp it is for.
  • The E3 Agent may send an INDICATION message to a dApp that did not subscribe. A dApp should ignore an indication for a RAN function that it did not subscribe to.

dApp Control

Purpose

The dApp Control procedure lets a dApp ask a RAN function to do something.

Procedure

  1. The dApp sends a dApp CONTROL ACTION message on the inbound channel. It names the RAN function and the control identifier. It carries the payload in actionData. It sets requestAck to "true" if it wants a CONTROL RESPONSE message and leaves the field out otherwise.
  2. If the dApp acts on an xApp CONTROL ACTION message, it puts that message's sequenceId in the new message. If the dApp decided on its own, it leaves sequenceId out.
  3. The E3 Agent finds the service model of the RAN function and checks the control identifier against the control identifiers that the RAN function advertises. If the service model runs, the E3 Agent gives it the payload and the message identifier.
  4. The service model applies the action. When it knows the result it answers the E3 Agent, which sends a CONTROL RESPONSE message if the dApp asked for one.

Successful operation

The service model applies the action. If requestAck was "true", the E3 Agent sends one CONTROL RESPONSE message: requestId holds the message identifier of the dApp CONTROL ACTION message, dAppIdentifier, ranFunctionIdentifier and controlIdentifier repeat those of the control, responseCode holds the result and controlOutcome holds what the service model reports about the control, if it reports anything. When the service model answers is the choice of the service model: a service model that applies the action later answers later. A service model that has more to report than the outcome puts it in its own payloads.

If requestAck is missing or "false", the E3 Agent sends no CONTROL RESPONSE message for a control that reaches the service model, whatever the service model answers.

A service model that never answers sends nothing. The E3 Agent does not make up an answer for a control that the service model may still apply, so a dApp that asked needs its own time limit.

Unsuccessful operation

The service model may answer with responseCode "negative", with a cause and a detail. The E3 Agent sends it if the dApp asked. If the service model fails to take the control and has not answered, the E3 Agent sends a CONTROL RESPONSE message with responseCode "negative" and the cause unspecified, if the dApp asked.

The E3 Agent shall answer with a CONTROL RESPONSE message with responseCode "negative" when it cannot hand the control to a service model, whether the dApp asked for an answer or not. requestId holds the message identifier of the dApp CONTROL ACTION message.

Table: Reasons to refuse a dApp CONTROL ACTION message

The E3 Agent finds that cause
the dApp has not completed the Setup procedure setupRequired
the RAN function identifier is not in its RAN function list unsupportedRanFunction
the control identifier is not offered by the RAN function unsupportedIdentifier
the service model does not run, because no dApp has a subscription to the RAN function notFound
too many controls wait for an answer resourceExhausted

A message that the E3 Agent refuses does not reach the service model.

Abnormal conditions

  • The service model takes the control and fails to apply it without an answer. If the dApp asked, the E3 Agent answers as described above. If the dApp did not ask, there is no answer.
  • A dApp may get a MESSAGE ACK message from another E3 Agent. The message is deprecated and an E3 Agent of this version sends none. It names no dApp, so on a link that broadcasts every dApp gets it, and a dApp that reads it shall compare requestId with the identifiers of the messages that it sent.
  • A CONTROL RESPONSE message names its dApp. On a link that broadcasts (ZeroMQ), every dApp receives it. On a POSIX link only the dApp it names does. A dApp shall ignore a CONTROL RESPONSE message whose dAppIdentifier is not its own.
  • The E3 Agent keeps at most 1024 controls that wait for an answer, and forgets those of a dApp that leaves. It refuses a further control that asks for an answer with the cause resourceExhausted.

dApp Report

Purpose

The dApp Report procedure sends a result from a dApp to a RIC. It is the start of an E2-E3 loop.

Procedure

  1. The dApp assigns a sequence identifier. The identifier is the key of the whole procedure.
  2. The dApp sends a dApp REPORT message with sequenceId and the payload in reportData.
  3. The E3 Agent puts the message in a queue. A worker takes it from the queue and gives it to the RIC side. The E3 Agent does not read reportData.
  4. The RIC side copies sequenceId into the E2SM-DAPP indication header. See E2SM-DAPP.

Successful operation

There is no response. The report is delivered when the RIC side receives it.

Unsuccessful operation

A dApp shall not send a dApp REPORT message with sequenceId 0. The value is not valid on any encoding.

Abnormal conditions

  • The report queue of the E3 Agent is full. The E3 Agent drops the message and logs it.
  • No handler is set on the E3 Agent. It drops the message.
  • The E3 Agent does not check the dApp identifier, the RAN function identifier or the sequence identifier of a report.

xApp Control

Purpose

The xApp Control procedure hands a decision of an xApp to a dApp.

Procedure

  1. The RIC side receives a decision for a dApp. Its E2SM-DAPP control header holds a sequence identifier.
  2. The E3 Agent sends an xApp CONTROL ACTION message with that sequence identifier unchanged and the payload in xAppControlData. It sets requestAck to "true" if it wants a CONTROL RESPONSE message from the dApp.
  3. The dApp ignores the message if the dApp identifier is not its own.
  4. The dApp gives the payload to its handler. It may act on it. If it re-issues the action to the RAN, it follows the dApp Control procedure with the same sequence identifier.
  5. If requestAck is "true", the dApp sends a CONTROL RESPONSE message.

Successful operation

The dApp handler receives the payload. If requestAck was "true", the dApp sends one CONTROL RESPONSE message: requestId holds the message identifier of the xApp CONTROL ACTION message, dAppIdentifier is its own, ranFunctionIdentifier repeats that of the control, controlIdentifier is the control that the dApp applied, from the list that the RAN function advertises, and responseCode holds the result. The RIC side learns the result from the control outcome of E2SM-DAPP.

Unsuccessful operation

An E3 Agent shall not send an xApp CONTROL ACTION message with sequenceId 0.

A dApp that does not act on xApp controls answers a message that asks with responseCode "negative" and the cause unsupportedRanFunction.

Abnormal conditions

  • The dApp is not registered. The E3 Agent has no one to send to. The message is lost.
  • A dApp that asked and gets no answer from the dApp application is not told. The E3 Agent has no time limit for it.

Release

Purpose

The Release procedure ends the session of a dApp.

Procedure from the dApp

  1. The dApp sends a RELEASE message with its dApp identifier.
  2. The E3 Agent removes the dApp and all its subscriptions. The dApp identifier and the subscription identifiers become free. A service model that lost its last subscriber stops.

There is no response. The dApp does not get an event when the E3 Agent later closes the link.

Procedure from the E3 Agent

  1. The E3 Agent sends a RELEASE message that names the dApp. An E3 Agent does this before it drops a dApp.
  2. The dApp ignores a RELEASE message for another dApp. Otherwise the dApp clears its session: its dApp identifier, the RAN function list, its subscriptions and its pending requests.
  3. The dApp reports the end to its application with the reason "released by the RAN".

Abnormal conditions

  • The link is lost with no RELEASE message. The dApp reports the reason "connection lost".
  • After a RELEASE message from the E3 Agent or a lost link, a dApp may run the Setup procedure again by itself. It gets a new dApp identifier and none of its earlier subscriptions. The application subscribes again. A dApp that sent its own RELEASE message does not.
  • An E3 Agent that does not detect the end of a dApp keeps its dApp identifier, its subscriptions and its running service models. An E3 Agent detects it from a closed connection, or from a dApp that has sent nothing for a long time. Only what the dApp sends shows that the dApp is there: a message the E3 Agent sends to a dApp proves nothing. On a POSIX link the dApp is tied to its connection when it registers, so a dApp that never sent anything after its SETUP REQUEST is removed as soon as its connection closes.
  • A RELEASE message from a dApp that names another dApp identifier is not authenticated by the protocol. An E3 Agent that can tell its connections apart should bind each dApp identifier to the connection of the SETUP REQUEST that was answered with it, and ignore a message that names the identifier on another connection. An E3 Agent that does not bind removes the named dApp.

The sequence identifier chain

One sequence identifier joins all the messages of one procedure from the detection by a dApp to the application of the decision.

Table: How the sequence identifier travels

Step Message Who sets the identifier Presence
1 dApp REPORT the dApp mandatory
2 E2SM-DAPP indication header the RIC side copies it from step 1 mandatory
3 E2SM-DAPP control header the xApp copies it from step 2 mandatory
4 xApp CONTROL ACTION the RIC side copies it from step 3 mandatory
5 dApp CONTROL ACTION the dApp copies it from step 4 optional

A dApp control that the dApp decided on its own has no sequence identifier. It has no procedure behind it. The message is normal.

An implementation may keep timing records for these messages. The records are not keyed on the sequence identifier. See the latency recorder. The loop boxes are in path A and path B.

Threads and queues

The E3 Agent does not process the messages on the thread of the sender. This description is informative. It explains where a message waits.

  • Every message from the E3 Agent to the dApps goes through one first-in first-out queue with 128 places. A full queue drops the message.
  • Dispatching of the inbound messages runs on one thread. The handlers of the service model run on that thread.
  • dApp reports go through a second queue with 1024 places and a worker thread. A slow RIC side does not hold up the inbound thread.
  • A separate thread checks for subscriptions that have run out of time.