libe3py 0.2.5__tar.gz → 0.2.6__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: libe3py
3
- Version: 0.2.5
3
+ Version: 0.2.6
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.6/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.2.6
@@ -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
 
@@ -71,21 +71,30 @@ enum E3EventKind {
71
71
  * `payload` carries the opaque E3SM bytes for indications
72
72
  * (protocol_data) and xApp controls (xapp_control_data); it is empty for
73
73
  * subscription/setup responses and acks. Fields not relevant to a given
74
- * `kind` are left zero.
74
+ * `kind` are left zero, except where noted.
75
+ *
76
+ * A subscription response also carries the grant: `ran_function_id` (0 = not
77
+ * reported), `periodicity`, and the id lists, valid only when their has_* flag is set.
75
78
  */
76
79
  struct E3Event {
77
80
  int kind{E3_EVENT_NONE}; ///< one of @ref E3EventKind
78
81
  uint32_t dapp_id{0}; ///< dApp identifier the message targets
79
- uint32_t ran_function_id{0}; ///< RAN function (indication / xApp control)
82
+ uint32_t ran_function_id{0}; ///< RAN function (indication / xApp control / subscription response)
80
83
  uint32_t subscription_id{0}; ///< subscription id (subscription response)
81
84
  uint32_t request_id{0}; ///< request/message id (subscription response / ack / xApp control)
82
85
  uint32_t sequence_id{0}; ///< loop correlation id (xApp control); echo it on the control you re-issue
83
86
  int response_code{-1}; ///< 0=positive, 1=negative, -1=n/a
84
87
  std::vector<uint8_t> payload; ///< opaque E3SM bytes (indication / xApp control)
88
+ long periodicity{-1}; ///< granted interval in microseconds (subscription response), -1 = not reported
89
+ bool has_telemetry_granted{false}; ///< telemetry_granted was reported
90
+ bool has_control_granted{false}; ///< control_granted was reported
91
+ std::vector<uint32_t> telemetry_granted; ///< granted telemetry ids
92
+ std::vector<uint32_t> control_granted; ///< granted control ids
85
93
  uint64_t trace_seq{0}; ///< set when queued; keys the [latrec] LQ-stage records
86
94
  // NOTE: in Python (libe3py) the payload is read via ev.get_payload(), which
87
95
  // 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).
96
+ // binding exposes the payload as a by-value method instead (see swig/libe3.i);
97
+ // likewise the granted lists, via get_telemetry_granted() / get_control_granted().
89
98
  };
90
99
 
91
100
  /**
@@ -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