43#ifndef LIBE3_PY_E3_DAPP_SESSION_HPP
44#define LIBE3_PY_E3_DAPP_SESSION_HPP
153 int64_t
subscribe(uint32_t ran_function_id,
154 std::vector<uint32_t> telemetry_ids,
155 std::vector<uint32_t> control_ids,
171 int64_t
send_control(uint32_t ran_function_id, uint32_t control_id,
172 std::vector<uint8_t> action_data,
173 uint32_t sequence_id = 0);
183 int64_t
send_report(uint32_t ran_function_id, std::vector<uint8_t> report_data,
184 uint32_t sequence_id);
198 std::vector<E3Event>
poll_events(std::size_t max_batch,
int timeout_ms);
205 std::unique_ptr<Impl> impl_;
uint32_t setup_ran_function_id(std::size_t i) const
RAN function id of advertised entry i (0 if out of range).
int setup_response_code() const
SetupResponse code: 0=positive, 1=negative, -1=not received.
int unsubscribe(uint32_t ran_function_id)
Delete a previously created subscription.
std::vector< E3Event > poll_events(std::size_t max_batch, int timeout_ms)
Drain up to max_batch inbound events, waiting up to timeout_ms for the first.
std::vector< uint8_t > setup_ran_function_data(std::size_t i) const
Opaque ranFunctionData bytes of advertised entry i.
std::vector< uint32_t > setup_ran_function_telemetry(std::size_t i) const
Telemetry ids of advertised entry i.
std::string ran_identifier() const
RAN identifier from the SetupResponse, or "" if none.
unsigned long long dropped_events() const
Total inbound events dropped due to ring overflow (backpressure).
void stop()
Stop the agent and shut down the ring so a blocked poll_events returns an empty batch (i....
int release()
Send a ReleaseMessage (session keeps running until stop).
DAppSession & operator=(const DAppSession &)=delete
DAppSession(const DAppSession &)=delete
int send_message_ack(uint32_t request_id, int response_code)
Acknowledge a request.
int start()
Start the agent, re-arming the inbound ring so a stop()->start() cycle works again.
int wait_for_setup(int timeout_ms)
Block until the setup handshake completes.
int64_t send_report(uint32_t ran_function_id, std::vector< uint8_t > report_data, uint32_t sequence_id)
Send a dApp report to the RAN.
long dapp_id() const
dApp id assigned at setup, or -1 if not yet assigned.
int64_t subscribe(uint32_t ran_function_id, std::vector< uint32_t > telemetry_ids, std::vector< uint32_t > control_ids, int sub_time_ms, int periodicity)
Subscribe to a RAN function (after a positive setup).
std::size_t setup_ran_function_count() const
Number of RAN functions advertised in the SetupResponse.
DAppSession(libe3::E3Config config, std::size_t queue_capacity=8192)
Construct the session and register all inbound handlers.
std::vector< uint32_t > setup_ran_function_control(std::size_t i) const
Control ids of advertised entry i.
int64_t send_control(uint32_t ran_function_id, uint32_t control_id, std::vector< uint8_t > action_data, uint32_t sequence_id=0)
Send a dApp control action to the RAN.
E3EventKind
Discriminator for E3Event.
@ E3_EVENT_NONE
placeholder (never enqueued)
@ E3_EVENT_SUBSCRIPTION_RESPONSE
RAN → dApp SubscriptionResponse.
@ E3_EVENT_SETUP_RESPONSE
RAN → dApp SetupResponse.
@ E3_EVENT_INDICATION
RAN → dApp IndicationMessage.
@ E3_EVENT_XAPP_CONTROL
xApp → dApp XAppControlAction
@ E3_EVENT_MESSAGE_ACK
RAN → dApp MessageAck.
Configuration for E3Agent.
One inbound E3AP event, POD-flat for a clean SWIG crossing.
uint32_t ran_function_id
RAN function (indication / xApp control).
uint32_t sequence_id
loop correlation id (xApp control); echo it on the control you re-issue
int kind
one of E3EventKind
uint32_t dapp_id
dApp identifier the message targets
uint32_t request_id
request/message id (subscription response / ack / xApp control)
uint32_t subscription_id
subscription id (subscription response)
int response_code
0=positive, 1=negative, -1=n/a
uint64_t trace_seq
set when queued; keys the [latrec] LQ-stage records
std::vector< uint8_t > payload
opaque E3SM bytes (indication / xApp control)
E3AP Protocol Types - Vendor-neutral type definitions.