libe3py 0.2.6__tar.gz → 0.2.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {libe3py-0.2.6 → libe3py-0.2.8}/PKG-INFO +1 -1
- libe3py-0.2.8/VERSION +1 -0
- {libe3py-0.2.6 → libe3py-0.2.8}/swig/e3_dapp_session.cpp +7 -0
- {libe3py-0.2.6 → libe3py-0.2.8}/swig/e3_dapp_session.hpp +21 -9
- libe3py-0.2.6/VERSION +0 -1
- {libe3py-0.2.6 → libe3py-0.2.8}/LICENSE +0 -0
- {libe3py-0.2.6 → libe3py-0.2.8}/NOTICE +0 -0
- {libe3py-0.2.6 → libe3py-0.2.8}/cmake/libe3SwigModule.cmake +0 -0
- {libe3py-0.2.6 → libe3py-0.2.8}/pyproject.toml +0 -0
- {libe3py-0.2.6 → libe3py-0.2.8}/python/CMakeLists.txt +0 -0
- {libe3py-0.2.6 → libe3py-0.2.8}/python/README.md +0 -0
- {libe3py-0.2.6 → libe3py-0.2.8}/swig/README.md +0 -0
- {libe3py-0.2.6 → libe3py-0.2.8}/swig/libe3.i +0 -0
- {libe3py-0.2.6 → libe3py-0.2.8}/swig/libe3_swig.hpp +0 -0
libe3py-0.2.8/VERSION
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.2.8
|
|
@@ -123,6 +123,13 @@ DAppSession::DAppSession(libe3::E3Config config, std::size_t queue_capacity) {
|
|
|
123
123
|
impl->enqueue(std::move(ev));
|
|
124
124
|
});
|
|
125
125
|
|
|
126
|
+
agent.set_disconnect_handler([impl](libe3::DisconnectReason reason) {
|
|
127
|
+
E3Event ev;
|
|
128
|
+
ev.kind = E3_EVENT_DISCONNECT;
|
|
129
|
+
ev.disconnect_reason = static_cast<int>(reason);
|
|
130
|
+
impl->enqueue(std::move(ev));
|
|
131
|
+
});
|
|
132
|
+
|
|
126
133
|
agent.set_message_ack_handler([impl](const libe3::MessageAck& ack) {
|
|
127
134
|
E3Event ev;
|
|
128
135
|
ev.kind = E3_EVENT_MESSAGE_ACK;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* @ref libe3::py::DAppSession is the answer: it owns an @ref libe3::E3Agent in
|
|
15
15
|
* DAPP role, registers the C++ handlers itself, and funnels every inbound
|
|
16
16
|
* message into a **bounded lock-free ring** (@ref libe3::LockFreeQueue). Python
|
|
17
|
-
* drains that ring in **batches** via @ref poll_events, so one GIL acquire and
|
|
17
|
+
* drains that ring in **batches** via @ref libe3::py::DAppSession::poll_events "poll_events", so one GIL acquire and
|
|
18
18
|
* one Python↔C++ boundary crossing are amortised across many messages. The
|
|
19
19
|
* SWIG wrapper releases the GIL around the blocking calls (see swig/libe3.i,
|
|
20
20
|
* `%module(threads="1")`), so libe3's C++ threads never stall on Python.
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
* the OAI split where libe3 owns E3AP and the SM owns encode/decode.
|
|
25
25
|
*
|
|
26
26
|
* @section lifecycle Lifecycle
|
|
27
|
-
* ctor (registers handlers) → @ref start → @ref wait_for_setup →
|
|
28
|
-
* (read setup via @ref dapp_id / setup accessors) → @ref subscribe →
|
|
29
|
-
* loop: @ref poll_events + @ref send_control / @ref send_report →
|
|
30
|
-
* @ref release → @ref stop.
|
|
27
|
+
* ctor (registers handlers) → @ref libe3::py::DAppSession::start "start" → @ref libe3::py::DAppSession::wait_for_setup "wait_for_setup" →
|
|
28
|
+
* (read setup via @ref libe3::py::DAppSession::dapp_id "dapp_id" / setup accessors) → @ref libe3::py::DAppSession::subscribe "subscribe" →
|
|
29
|
+
* loop: @ref libe3::py::DAppSession::poll_events "poll_events" + @ref libe3::py::DAppSession::send_control "send_control" / @ref libe3::py::DAppSession::send_report "send_report" →
|
|
30
|
+
* @ref libe3::py::DAppSession::release "release" → @ref libe3::py::DAppSession::stop "stop".
|
|
31
31
|
*
|
|
32
32
|
* @section rejected Rejected alternatives (auditable)
|
|
33
33
|
* - SWIG directors: run the Python callback on libe3's inbound thread under the
|
|
@@ -54,7 +54,7 @@ namespace libe3 {
|
|
|
54
54
|
namespace py {
|
|
55
55
|
|
|
56
56
|
/**
|
|
57
|
-
* @brief Discriminator for @ref E3Event.
|
|
57
|
+
* @brief Discriminator for @ref libe3::py::E3Event.
|
|
58
58
|
*/
|
|
59
59
|
enum E3EventKind {
|
|
60
60
|
E3_EVENT_NONE = 0, ///< placeholder (never enqueued)
|
|
@@ -62,7 +62,8 @@ enum E3EventKind {
|
|
|
62
62
|
E3_EVENT_XAPP_CONTROL = 2, ///< xApp → dApp XAppControlAction
|
|
63
63
|
E3_EVENT_SUBSCRIPTION_RESPONSE = 3, ///< RAN → dApp SubscriptionResponse
|
|
64
64
|
E3_EVENT_SETUP_RESPONSE = 4, ///< RAN → dApp SetupResponse
|
|
65
|
-
E3_EVENT_MESSAGE_ACK = 5
|
|
65
|
+
E3_EVENT_MESSAGE_ACK = 5, ///< RAN → dApp MessageAck
|
|
66
|
+
E3_EVENT_DISCONNECT = 6 ///< the RAN is gone; see E3Event::disconnect_reason
|
|
66
67
|
};
|
|
67
68
|
|
|
68
69
|
/**
|
|
@@ -84,6 +85,7 @@ struct E3Event {
|
|
|
84
85
|
uint32_t request_id{0}; ///< request/message id (subscription response / ack / xApp control)
|
|
85
86
|
uint32_t sequence_id{0}; ///< loop correlation id (xApp control); echo it on the control you re-issue
|
|
86
87
|
int response_code{-1}; ///< 0=positive, 1=negative, -1=n/a
|
|
88
|
+
int disconnect_reason{-1}; ///< disconnect: 0=released by RAN, 1=connection lost, -1=n/a
|
|
87
89
|
std::vector<uint8_t> payload; ///< opaque E3SM bytes (indication / xApp control)
|
|
88
90
|
long periodicity{-1}; ///< granted interval in microseconds (subscription response), -1 = not reported
|
|
89
91
|
bool has_telemetry_granted{false}; ///< telemetry_granted was reported
|
|
@@ -153,8 +155,13 @@ public:
|
|
|
153
155
|
|
|
154
156
|
/**
|
|
155
157
|
* @brief Subscribe to a RAN function (after a positive setup).
|
|
158
|
+
* @param ran_function_id RAN function to subscribe to
|
|
159
|
+
* @param telemetry_ids telemetry identifiers requested
|
|
160
|
+
* @param control_ids control identifiers requested
|
|
156
161
|
* @param sub_time_ms subscription time, or -1 for unset.
|
|
157
|
-
* @param periodicity
|
|
162
|
+
* @param periodicity microseconds between indications, 0 = every event, or -1 for
|
|
163
|
+
* unset. Over ASN.1 the range is 0 to 60000000. An OCUDU RAN reads the
|
|
164
|
+
* same number as milliseconds.
|
|
158
165
|
* @return the assigned request id (positive, 1..4294967295) on success, so
|
|
159
166
|
* the caller can correlate the SubscriptionResponse by its
|
|
160
167
|
* request_id; a negative ErrorCode on failure.
|
|
@@ -169,6 +176,9 @@ public:
|
|
|
169
176
|
|
|
170
177
|
/**
|
|
171
178
|
* @brief Send a dApp control action to the RAN.
|
|
179
|
+
* @param ran_function_id RAN function the control is for
|
|
180
|
+
* @param control_id control identifier granted by the RAN
|
|
181
|
+
* @param action_data opaque E3SM control payload
|
|
172
182
|
* @param sequence_id correlation id of the xApp procedure this control
|
|
173
183
|
* re-issues; 0 when the dApp decided on its own.
|
|
174
184
|
* @return the assigned message id (positive, 1..4294967295) on success, so
|
|
@@ -182,6 +192,8 @@ public:
|
|
|
182
192
|
uint32_t sequence_id = 0);
|
|
183
193
|
/**
|
|
184
194
|
* @brief Send a dApp report to the RAN.
|
|
195
|
+
* @param ran_function_id RAN function the report is for
|
|
196
|
+
* @param report_data opaque E3SM report payload
|
|
185
197
|
* @param sequence_id correlation id this dApp assigns to the detection;
|
|
186
198
|
* mandatory on the wire, 1..4294967295 (0 is refused with
|
|
187
199
|
* INVALID_PARAM).
|
|
@@ -191,7 +203,7 @@ public:
|
|
|
191
203
|
*/
|
|
192
204
|
int64_t send_report(uint32_t ran_function_id, std::vector<uint8_t> report_data,
|
|
193
205
|
uint32_t sequence_id);
|
|
194
|
-
/** @brief Acknowledge a request. @param response_code 0=positive,1=negative. @return ErrorCode as int. */
|
|
206
|
+
/** @brief Acknowledge a request. @param request_id request being acknowledged. @param response_code 0=positive,1=negative. @return ErrorCode as int. */
|
|
195
207
|
int send_message_ack(uint32_t request_id, int response_code);
|
|
196
208
|
|
|
197
209
|
/**
|
libe3py-0.2.6/VERSION
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
0.2.6
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|