libe3py 0.2.5__tar.gz → 0.2.7__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.5 → libe3py-0.2.7}/PKG-INFO +2 -1
- libe3py-0.2.7/VERSION +1 -0
- {libe3py-0.2.5 → libe3py-0.2.7}/pyproject.toml +1 -0
- {libe3py-0.2.5 → libe3py-0.2.7}/swig/e3_dapp_session.cpp +17 -0
- {libe3py-0.2.5 → libe3py-0.2.7}/swig/e3_dapp_session.hpp +15 -4
- {libe3py-0.2.5 → libe3py-0.2.7}/swig/libe3.i +4 -0
- libe3py-0.2.5/VERSION +0 -1
- {libe3py-0.2.5 → libe3py-0.2.7}/LICENSE +0 -0
- {libe3py-0.2.5 → libe3py-0.2.7}/NOTICE +0 -0
- {libe3py-0.2.5 → libe3py-0.2.7}/cmake/libe3SwigModule.cmake +0 -0
- {libe3py-0.2.5 → libe3py-0.2.7}/python/CMakeLists.txt +0 -0
- {libe3py-0.2.5 → libe3py-0.2.7}/python/README.md +0 -0
- {libe3py-0.2.5 → libe3py-0.2.7}/swig/README.md +0 -0
- {libe3py-0.2.5 → libe3py-0.2.7}/swig/libe3_swig.hpp +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: libe3py
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.7
|
|
4
4
|
Summary: Python binding of libe3, the O-RAN E3 interface library
|
|
5
5
|
Author: Northeastern University
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -11,6 +11,7 @@ Classifier: Programming Language :: C++
|
|
|
11
11
|
Classifier: Operating System :: POSIX :: Linux
|
|
12
12
|
Project-URL: Homepage, https://github.com/wineslab/libe3
|
|
13
13
|
Project-URL: Documentation, https://github.com/wineslab/libe3/blob/main/swig/README.md
|
|
14
|
+
Project-URL: Changelog, https://github.com/wineslab/libe3/releases
|
|
14
15
|
Requires-Python: >=3.10
|
|
15
16
|
Description-Content-Type: text/markdown
|
|
16
17
|
|
libe3py-0.2.7/VERSION
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.2.7
|
|
@@ -25,6 +25,7 @@ classifiers = [
|
|
|
25
25
|
[project.urls]
|
|
26
26
|
Homepage = "https://github.com/wineslab/libe3"
|
|
27
27
|
Documentation = "https://github.com/wineslab/libe3/blob/main/swig/README.md"
|
|
28
|
+
Changelog = "https://github.com/wineslab/libe3/releases"
|
|
28
29
|
|
|
29
30
|
[tool.scikit-build]
|
|
30
31
|
cmake.version = ">=3.18"
|
|
@@ -96,6 +96,16 @@ DAppSession::DAppSession(libe3::E3Config config, std::size_t queue_capacity) {
|
|
|
96
96
|
ev.request_id = r.request_id;
|
|
97
97
|
ev.subscription_id = r.subscription_id.value_or(0);
|
|
98
98
|
ev.response_code = static_cast<int>(r.response_code);
|
|
99
|
+
ev.ran_function_id = r.ran_function_identifier.value_or(0);
|
|
100
|
+
ev.periodicity = r.periodicity ? static_cast<long>(*r.periodicity) : -1;
|
|
101
|
+
if (r.telemetry_identifier_list) {
|
|
102
|
+
ev.has_telemetry_granted = true;
|
|
103
|
+
ev.telemetry_granted = *r.telemetry_identifier_list;
|
|
104
|
+
}
|
|
105
|
+
if (r.control_identifier_list) {
|
|
106
|
+
ev.has_control_granted = true;
|
|
107
|
+
ev.control_granted = *r.control_identifier_list;
|
|
108
|
+
}
|
|
99
109
|
impl->enqueue(std::move(ev));
|
|
100
110
|
});
|
|
101
111
|
|
|
@@ -113,6 +123,13 @@ DAppSession::DAppSession(libe3::E3Config config, std::size_t queue_capacity) {
|
|
|
113
123
|
impl->enqueue(std::move(ev));
|
|
114
124
|
});
|
|
115
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
|
+
|
|
116
133
|
agent.set_message_ack_handler([impl](const libe3::MessageAck& ack) {
|
|
117
134
|
E3Event ev;
|
|
118
135
|
ev.kind = E3_EVENT_MESSAGE_ACK;
|
|
@@ -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
|
/**
|
|
@@ -71,21 +72,31 @@ enum E3EventKind {
|
|
|
71
72
|
* `payload` carries the opaque E3SM bytes for indications
|
|
72
73
|
* (protocol_data) and xApp controls (xapp_control_data); it is empty for
|
|
73
74
|
* subscription/setup responses and acks. Fields not relevant to a given
|
|
74
|
-
* `kind` are left zero.
|
|
75
|
+
* `kind` are left zero, except where noted.
|
|
76
|
+
*
|
|
77
|
+
* A subscription response also carries the grant: `ran_function_id` (0 = not
|
|
78
|
+
* reported), `periodicity`, and the id lists, valid only when their has_* flag is set.
|
|
75
79
|
*/
|
|
76
80
|
struct E3Event {
|
|
77
81
|
int kind{E3_EVENT_NONE}; ///< one of @ref E3EventKind
|
|
78
82
|
uint32_t dapp_id{0}; ///< dApp identifier the message targets
|
|
79
|
-
uint32_t ran_function_id{0}; ///< RAN function (indication / xApp control)
|
|
83
|
+
uint32_t ran_function_id{0}; ///< RAN function (indication / xApp control / subscription response)
|
|
80
84
|
uint32_t subscription_id{0}; ///< subscription id (subscription response)
|
|
81
85
|
uint32_t request_id{0}; ///< request/message id (subscription response / ack / xApp control)
|
|
82
86
|
uint32_t sequence_id{0}; ///< loop correlation id (xApp control); echo it on the control you re-issue
|
|
83
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
|
|
84
89
|
std::vector<uint8_t> payload; ///< opaque E3SM bytes (indication / xApp control)
|
|
90
|
+
long periodicity{-1}; ///< granted interval in microseconds (subscription response), -1 = not reported
|
|
91
|
+
bool has_telemetry_granted{false}; ///< telemetry_granted was reported
|
|
92
|
+
bool has_control_granted{false}; ///< control_granted was reported
|
|
93
|
+
std::vector<uint32_t> telemetry_granted; ///< granted telemetry ids
|
|
94
|
+
std::vector<uint32_t> control_granted; ///< granted control ids
|
|
85
95
|
uint64_t trace_seq{0}; ///< set when queued; keys the [latrec] LQ-stage records
|
|
86
96
|
// NOTE: in Python (libe3py) the payload is read via ev.get_payload(), which
|
|
87
97
|
// returns native `bytes`. SWIG member getters return a wrapped vector, so the
|
|
88
|
-
// binding exposes the payload as a by-value method instead (see swig/libe3.i)
|
|
98
|
+
// binding exposes the payload as a by-value method instead (see swig/libe3.i);
|
|
99
|
+
// likewise the granted lists, via get_telemetry_granted() / get_control_granted().
|
|
89
100
|
};
|
|
90
101
|
|
|
91
102
|
/**
|
|
@@ -137,8 +137,12 @@ namespace std {
|
|
|
137
137
|
* expose the payload through a by-value method instead — methods use the
|
|
138
138
|
* std::vector<uint8_t> -> bytes `out` typemap above. Python reads ev.get_payload(). */
|
|
139
139
|
%ignore libe3::py::E3Event::payload;
|
|
140
|
+
%ignore libe3::py::E3Event::telemetry_granted;
|
|
141
|
+
%ignore libe3::py::E3Event::control_granted;
|
|
140
142
|
%extend libe3::py::E3Event {
|
|
141
143
|
std::vector<uint8_t> get_payload() const { return $self->payload; }
|
|
144
|
+
std::vector<uint32_t> get_telemetry_granted() const { return $self->telemetry_granted; }
|
|
145
|
+
std::vector<uint32_t> get_control_granted() const { return $self->control_granted; }
|
|
142
146
|
}
|
|
143
147
|
|
|
144
148
|
/* The full dApp seam: DAppSession + E3Event. The batch returned by
|
libe3py-0.2.5/VERSION
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
0.2.5
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|