libe3 0.6.1
C++ library for E3AP RAN vendor integration
Loading...
Searching...
No Matches
e2sm_dapp.hpp
Go to the documentation of this file.
1/**
2 * @file e2sm_dapp.hpp
3 * @brief E2SM-DAPP information elements and their APER codec (C++ API).
4 *
5 * E2SM-DAPP is the E2 service model (RAN function id 255, OID
6 * 1.3.6.1.4.1.53148.1.1.255.3) that carries dApp traffic between an E2 node and
7 * an xApp. Its grammar ships with libe3 as
8 * `messages/asn1/e2sm_dapp/V1/e2sm_dapp-1.0.0.asn`, and the specification is in
9 * `docs/e2sm-dapp/`.
10 *
11 * The type and field names in this header deliberately mirror OCUDU's
12 * `asn1::e2sm_dapp` (`include/ocudu/asn1/e2sm/e2sm_dapp.h`), so that code
13 * building or reading a message looks the same in both stacks. The codec behind
14 * it is asn1c here and OCUDU's own ASN.1 runtime there; the two are checked
15 * against each other with golden vectors. Differences from the OCUDU interface:
16 * - only the eight top-level types (see below) have `pack` and `unpack`, and they
17 * work on `std::vector<uint8_t>` instead of `bit_ref`;
18 * - the ASN.1 helper templates (`printable_string`, `fixed_octstring`, ...) are
19 * thin wrappers over `std::string` and `std::vector`;
20 * - there is no `to_json`;
21 * - `operator==` is provided on every type.
22 *
23 * Top-level types, each the content of an E2AP OCTET STRING:
24 * `e2sm_dapp_event_trigger_s`, `e2sm_dapp_action_definition_s`,
25 * `e2sm_dapp_ind_hdr_s`, `e2sm_dapp_ind_msg_s`, `e2sm_dapp_ctrl_hdr_s`,
26 * `e2sm_dapp_ctrl_msg_s`, `e2sm_dapp_ctrl_outcome_s` and
27 * `e2sm_dapp_ran_function_definition_s`.
28 *
29 * Built only when LIBE3_ENABLE_E2SM_DAPP is on (it needs LIBE3_ENABLE_ASN1).
30 *
31 * SPDX-FileCopyrightText: Copyright (c) 2026 Northeastern University
32 * SPDX-License-Identifier: Apache-2.0
33 */
34#ifndef LIBE3_E2SM_DAPP_HPP
35#define LIBE3_E2SM_DAPP_HPP
36
37#include <array>
38#include <cstddef>
39#include <cstdint>
40#include <string>
41#include <variant>
42#include <vector>
43
44namespace libe3 {
45namespace e2sm_dapp {
46
47/** Result of `pack` and `unpack`. Same values as OCUDU's `OCUDUASN_CODE`. */
48enum asn_code : int {
49 ASN_ERROR_ENCODE_FAIL = -2, ///< a value is outside its ASN.1 constraint, or the buffer cannot be built
50 ASN_ERROR_DECODE_FAIL = -1, ///< the bytes are not a valid APER encoding of the type
52};
53
54// ---------------------------------------------------------------------------
55// Helper types mirroring the ones OCUDU's ASN.1 runtime provides. The bounds are
56// part of the type for documentation; they are enforced by `pack`, not by the
57// containers.
58// ---------------------------------------------------------------------------
59
60/// Mirrors OCUDU's `enumerated<Opts, Ext>`: derives from the options struct and converts to its enum.
61template <class EnumType, bool Ext = false>
62class enumerated : public EnumType
63{
64public:
65 static const bool has_ext = Ext; ///< true when the ASN.1 enumeration is extensible
66
67 /// Holds `nulltype`, no alternative.
68 enumerated() { EnumType::value = EnumType::nulltype; }
69 /// @param v value to hold
70 enumerated(typename EnumType::options v) { EnumType::value = v; }
71 /// @return the held value
72 operator typename EnumType::options() const { return EnumType::value; }
73};
74
75/// PrintableString (SIZE(LB..UB)).
76template <uint32_t LB, uint32_t UB, bool Ext = false, bool Aligned = true>
78{
79public:
80 /// @param s value to hold
81 /// @return this string
82 printable_string& from_string(const std::string& s)
83 {
84 str_ = s;
85 return *this;
86 }
87 /// @return the held value
88 const std::string& to_string() const { return str_; }
89 /// @return length in characters
90 size_t size() const { return str_.size(); }
91 /// @return length in characters
92 size_t length() const { return str_.size(); }
93 /// @param o string to compare with
94 /// @return true when both hold the same characters
95 bool operator==(const printable_string& o) const { return str_ == o.str_; }
96 /// @param o string to compare with
97 /// @return true when the strings differ
98 bool operator!=(const printable_string& o) const { return !(*this == o); }
99
100private:
101 std::string str_;
102};
103
104/// OCTET STRING (SIZE(N)).
105template <uint32_t N, bool Aligned = true>
106class fixed_octstring : public std::array<uint8_t, N>
107{
108public:
109 /// Zero-filled.
110 fixed_octstring() { this->fill(0); }
111};
112
113/// OCTET STRING (SIZE(LB..UB)).
114template <uint32_t LB, uint32_t UB, bool Aligned = true>
115class bounded_octstring : public std::vector<uint8_t>
116{
117};
118
119/// OCTET STRING without a size constraint.
120template <bool Aligned = true>
121class unbounded_octstring : public std::vector<uint8_t>
122{
123public:
124 /// @param data first byte to copy
125 /// @param len number of bytes to copy
126 /// @return this string
127 unbounded_octstring& from_bytes(const uint8_t* data, size_t len)
128 {
129 assign(data, data + len);
130 return *this;
131 }
132};
133
134/// SEQUENCE OF with a size constraint known only at pack time.
135template <class T>
136class dyn_array : public std::vector<T>
137{
138};
139
140/// SEQUENCE OF with an upper bound UB.
141template <class T, uint32_t UB>
142class bounded_array : public std::vector<T>
143{
144};
145
146// ---------------------------------------------------------------------------
147// Constants (maxE2SMDAPPIndMsgSize and friends).
148// ---------------------------------------------------------------------------
149
150constexpr int64_t max_e2sm_dapp_ind_msg_size = 32768; ///< Largest indication message data, in octets
151constexpr int64_t max_e2sm_dapp_ctrl_msg_size = 32768; ///< Largest control message data, in octets
152constexpr int64_t maxnoof_dapps = 256; ///< Most dApps in a dApp E3 subscription list
153constexpr int64_t maxnoof_subscribed_e3_ran_functions = 64; ///< Most E3 RAN functions one dApp can subscribe to
154constexpr int64_t maxnoof_dapp_report_styles = 2; ///< Most report styles in a RAN function definition
155constexpr int64_t maxnoof_dapp_control_styles = 1; ///< Most control styles in a RAN function definition
156
157// ---------------------------------------------------------------------------
158// Information elements.
159// ---------------------------------------------------------------------------
160
161/** Defines `operator!=` as the negation of `operator==`.
162 * @param T the type that has an `operator==` */
163#define LIBE3_E2SM_DAPP_NEQ(T) \
164 bool operator!=(const T& o) const { return !(*this == o); }
165
166/// Name, OID and description of the RAN function (ASN.1 `RANfunction-Name ::= SEQUENCE`).
168 bool ext = false; ///< ASN.1 extension marker; ignored by `pack`, false after `unpack`
169 bool ran_function_instance_present = false; ///< true when `ran_function_instance` is present
170 printable_string<1, 150, true, true> ran_function_short_name; ///< Short name (`E2SM-DAPP`), 1 to 150 characters
171 printable_string<1, 1000, true, true> ran_function_e2sm_o_id; ///< Service model OID, 1 to 1000 characters
173 int64_t ran_function_instance = 0; ///< Instance number; not used, a sender shall not set it
174
175 /** @param o value to compare with
176 * @return true when every field is equal */
177 bool operator==(const ran_function_name_s& o) const;
179};
180
181/// Event trigger format 1: no fields, the RAN reports when it has something to report (ASN.1 `E2SM-DAPP-EventTrigger-Format1 ::= SEQUENCE {}`).
183 /** @return true, the type has no fields */
184 bool operator==(const e2sm_dapp_event_trigger_format1_s&) const { return true; }
186};
187
188/// Event trigger definition of a subscription (ASN.1 `E2SM-DAPP-EventTrigger ::= SEQUENCE (top-level)`).
190 /// Formats of the event trigger.
192 /// Alternatives of the CHOICE, with their ASN.1 names and numbers.
193 struct types_opts {
194 /// Alternatives of the CHOICE; `nulltype` means none is set.
196 /// The selected alternative.
198 typedef uint8_t number_type; ///< Type of the alternative number
199
200 /** @return the ASN.1 name of the alternative */
201 const char* to_string() const { return "eventTrigger-Format1"; }
202 /** @return the number of the alternative, from 1 */
203 uint8_t to_number() const { return 1; }
204 };
205 using types = enumerated<types_opts, true>; ///< The selected alternative as an enumerated value
206
207 /** @return the selected alternative */
208 types type() const { return types::event_trigger_format1; }
209 // getters
210 /** Content of event trigger format 1.
211 * @return its content; throws std::bad_variant_access when it is not the selected alternative */
213 /** Content of event trigger format 1.
214 * @return its content; throws std::bad_variant_access when it is not the selected alternative */
216
217 /** @param o value to compare with
218 * @return true when every field is equal */
219 bool operator==(const ric_event_trigger_formats_c_& o) const { return c == o.c; }
221
222 private:
224 };
225
226 bool ext = false; ///< ASN.1 extension marker; ignored by `pack`, false after `unpack`
227 ric_event_trigger_formats_c_ ric_event_trigger_formats; ///< Format of the element, a CHOICE with one alternative per format
228
229 /** Encode as APER.
230 * @param out receives the bytes, left empty on failure
231 * @return ASN_SUCCESS, or ASN_ERROR_ENCODE_FAIL when a value is outside its constraint */
232 asn_code pack(std::vector<uint8_t>& out) const;
233 /** Decode APER bytes.
234 * @param data bytes to decode
235 * @param len number of bytes
236 * @return ASN_SUCCESS, or ASN_ERROR_DECODE_FAIL when the bytes are not a valid encoding */
237 asn_code unpack(const uint8_t* data, size_t len);
238 /** @param o value to compare with
239 * @return true when every field is equal */
245};
246
247/// Action definition format 1: no fields (ASN.1 `E2SM-DAPP-ActionDefinition-Format1 ::= SEQUENCE {}`).
249 /** @return true, the type has no fields */
250 bool operator==(const e2sm_dapp_action_definition_format1_s&) const { return true; }
252};
253
254/// Action definition of a subscription, which selects the report style (ASN.1 `E2SM-DAPP-ActionDefinition ::= SEQUENCE (top-level)`).
256 /// Formats of the action definition.
258 /// Alternatives of the CHOICE, with their ASN.1 names and numbers.
259 struct types_opts {
260 /// Alternatives of the CHOICE; `nulltype` means none is set.
262 /// The selected alternative.
264 typedef uint8_t number_type; ///< Type of the alternative number
265
266 /** @return the ASN.1 name of the alternative */
267 const char* to_string() const { return "actionDefinition-Format1"; }
268 /** @return the number of the alternative, from 1 */
269 uint8_t to_number() const { return 1; }
270 };
271 using types = enumerated<types_opts, true>; ///< The selected alternative as an enumerated value
272
273 /** @return the selected alternative */
274 types type() const { return types::action_definition_format1; }
275 // getters
276 /** Content of action definition format 1.
277 * @return its content; throws std::bad_variant_access when it is not the selected alternative */
279 /** Content of action definition format 1.
280 * @return its content; throws std::bad_variant_access when it is not the selected alternative */
282
283 /** @param o value to compare with
284 * @return true when every field is equal */
285 bool operator==(const action_definition_formats_c_& o) const { return c == o.c; }
287
288 private:
290 };
291
292 bool ext = false; ///< ASN.1 extension marker; ignored by `pack`, false after `unpack`
293 int64_t ric_style_type = 0; ///< Report style the subscription selects (1 or 2); it selects the indication formats
294 action_definition_formats_c_ action_definition_formats; ///< Format of the element, a CHOICE with one alternative per format
295
296 /** Encode as APER.
297 * @param out receives the bytes, left empty on failure
298 * @return ASN_SUCCESS, or ASN_ERROR_ENCODE_FAIL when a value is outside its constraint */
299 asn_code pack(std::vector<uint8_t>& out) const;
300 /** Decode APER bytes.
301 * @param data bytes to decode
302 * @param len number of bytes
303 * @return ASN_SUCCESS, or ASN_ERROR_DECODE_FAIL when the bytes are not a valid encoding */
304 asn_code unpack(const uint8_t* data, size_t len);
305 /** @param o value to compare with
306 * @return true when every field is equal */
312};
313
314/// The E3 RAN functions one dApp has subscribed to (ASN.1 `DAppE3Subscription-Item ::= SEQUENCE`).
316 using subscribed_e3_ran_functions_l_ = bounded_array<uint64_t, 64>; ///< List of E3 RAN function ids
317
318 bool ext = false; ///< ASN.1 extension marker; ignored by `pack`, false after `unpack`
319 uint64_t dapp_id = 0; ///< The dApp
320 subscribed_e3_ran_functions_l_ subscribed_e3_ran_functions; ///< E3 RAN functions the dApp has subscribed to (1 to 64)
321
322 /** @param o value to compare with
323 * @return true when every field is equal */
329};
330
331/// The dApp E3 subscription map, 0 to 256 items (ASN.1 `DAppE3Subscription-List ::= SEQUENCE (SIZE (0..256)) OF DAppE3Subscription-Item`).
333
334/// One report style of the RAN function definition (ASN.1 `RANFunctionDefinition-Report-Item ::= SEQUENCE`).
336 bool ext = false; ///< ASN.1 extension marker; ignored by `pack`, false after `unpack`
337 bool dapp_e3_subscriptions_present = false; ///< true when `dapp_e3_subscriptions` is present
338 int64_t ric_report_style_type = 0; ///< Report style number (1 or 2)
339 printable_string<1, 150, true, true> ric_report_style_name; ///< Report style name, 1 to 150 characters
340 int64_t ric_ind_hdr_format_type = 0; ///< Indication header format the style produces
341 int64_t ric_ind_msg_format_type = 0; ///< Indication message format the style produces
342 dapp_e3_subscription_list_l dapp_e3_subscriptions; ///< dApp E3 subscription map (0 to 256 items)
343
344 /** @param o value to compare with
345 * @return true when every field is equal */
348};
349
350/// One control style of the RAN function definition (ASN.1 `RANFunctionDefinition-Control-Item ::= SEQUENCE`).
352 bool ext = false; ///< ASN.1 extension marker; ignored by `pack`, false after `unpack`
353 bool dapp_e3_subscriptions_present = false; ///< true when `dapp_e3_subscriptions` is present
354 int64_t ric_ctrl_style_type = 0; ///< Control style number (1)
355 printable_string<1, 150, true, true> ric_ctrl_style_name; ///< Control style name, 1 to 150 characters
356 int64_t ric_ctrl_hdr_format_type = 0; ///< Control header format the style uses
357 int64_t ric_ctrl_msg_format_type = 0; ///< Control message format the style uses
358 int64_t ric_ctrl_outcome_format_type = 0; ///< Control outcome format the style uses
359 dapp_e3_subscription_list_l dapp_e3_subscriptions; ///< dApp E3 subscription map (0 to 256 items)
360
361 /** @param o value to compare with
362 * @return true when every field is equal */
365};
366
367/// Event trigger section of the RAN function definition: empty, its presence says the function has an event trigger (ASN.1 `RANFunctionDefinition-EventTrigger ::= SEQUENCE`).
369 bool ext = false; ///< ASN.1 extension marker; ignored by `pack`, false after `unpack`
370
371 /** @return true, the type has no fields */
372 bool operator==(const ran_function_definition_event_trigger_s&) const { return true; }
374};
375
376/// Report section of the RAN function definition (ASN.1 `RANFunctionDefinition-Report ::= SEQUENCE`).
379
380 bool ext = false; ///< ASN.1 extension marker; ignored by `pack`, false after `unpack`
381 ric_report_style_list_l_ ric_report_style_list; ///< Report styles the RAN supports (1 to 2)
382
383 /** @param o value to compare with
384 * @return true when every field is equal */
390};
391
392/// Control section of the RAN function definition (ASN.1 `RANFunctionDefinition-Control ::= SEQUENCE`).
395
396 bool ext = false; ///< ASN.1 extension marker; ignored by `pack`, false after `unpack`
397 ric_ctrl_style_list_l_ ric_ctrl_style_list; ///< Control styles the RAN supports (exactly 1)
398
399 /** @param o value to compare with
400 * @return true when every field is equal */
402 {
404 }
406};
407
408/// RAN function definition, announced in E2 Setup and RIC Service Update (ASN.1 `E2SM-DAPP-RANFunctionDefinition ::= SEQUENCE (top-level)`).
410 bool ext = false; ///< ASN.1 extension marker; ignored by `pack`, false after `unpack`
411 bool ran_function_definition_event_trigger_present = false; ///< true when `ran_function_definition_event_trigger` is present
412 bool ran_function_definition_report_present = false; ///< true when `ran_function_definition_report` is present
413 bool ran_function_definition_ctrl_present = false; ///< true when `ran_function_definition_ctrl` is present
414 ran_function_name_s ran_function_name; ///< Name of the RAN function
418
419 /** Encode as APER.
420 * @param out receives the bytes, left empty on failure
421 * @return ASN_SUCCESS, or ASN_ERROR_ENCODE_FAIL when a value is outside its constraint */
422 asn_code pack(std::vector<uint8_t>& out) const;
423 /** Decode APER bytes.
424 * @param data bytes to decode
425 * @param len number of bytes
426 * @return ASN_SUCCESS, or ASN_ERROR_DECODE_FAIL when the bytes are not a valid encoding */
427 asn_code unpack(const uint8_t* data, size_t len);
428 /** @param o value to compare with
429 * @return true when every field is equal */
432};
433
434/// Indication header format 1: the header of a dApp report (ASN.1 `E2SM-DAPP-IndicationHeader-Format1 ::= SEQUENCE`).
436 bool ext = false; ///< ASN.1 extension marker; ignored by `pack`, false after `unpack`
437 bool node_cu_du_id_present = false; ///< true when `node_cu_du_id` is present
438 bool timestamp_present = false; ///< true when `timestamp` is present
439 bool sequence_id_present = false; ///< true when `sequence_id` is present
440 uint64_t ran_function_id = 0; ///< E3 RAN function id of the report, not the E2 RAN function id
441 uint64_t dapp_id = 0; ///< The dApp that sent the report
442 uint8_t node_type = 0; ///< Type of the reporting node (0 to 255)
443 fixed_octstring<3, true> node_plmn_id; ///< PLMN id of the node, 3 octets
444 uint64_t node_nb_id = 0; ///< gNB id of the node
445 uint64_t node_cu_du_id = 0; ///< CU or DU id inside the node
446 int64_t timestamp = 0; ///< When the RAN built the indication, in nanoseconds on its realtime clock
447 int64_t sequence_id = 0; ///< Correlation id of the dApp for this report, copied from the E3 report
448
449 /** @param o value to compare with
450 * @return true when every field is equal */
451 bool operator==(const e2sm_dapp_ind_hdr_format1_s& o) const;
453};
454
455/// Indication header format 2: the header of a subscription map (ASN.1 `E2SM-DAPP-IndicationHeader-Format2 ::= SEQUENCE`).
457 bool ext = false; ///< ASN.1 extension marker; ignored by `pack`, false after `unpack`
458 bool node_cu_du_id_present = false; ///< true when `node_cu_du_id` is present
459 bool timestamp_present = false; ///< true when `timestamp` is present
460 bool sequence_id_present = false; ///< true when `sequence_id` is present
461 uint8_t node_type = 0; ///< Type of the reporting node (0 to 255)
462 fixed_octstring<3, true> node_plmn_id; ///< PLMN id of the node, 3 octets
463 uint64_t node_nb_id = 0; ///< gNB id of the node
464 uint64_t node_cu_du_id = 0; ///< CU or DU id inside the node
465 int64_t timestamp = 0; ///< When the RAN built the indication, in nanoseconds on its realtime clock
466 int64_t sequence_id = 0; ///< Correlation id; a subscription map has no procedure, so a RAN leaves it absent
467
468 /** @param o value to compare with
469 * @return true when every field is equal */
470 bool operator==(const e2sm_dapp_ind_hdr_format2_s& o) const;
472};
473
474/// Indication header (ASN.1 `E2SM-DAPP-IndicationHeader ::= SEQUENCE (top-level)`).
476 /// Formats of the indication header.
478 /// Alternatives of the CHOICE, with their ASN.1 names and numbers.
479 struct types_opts {
480 /// Alternatives of the CHOICE; `nulltype` means none is set.
482 /// The selected alternative.
484 typedef uint8_t number_type; ///< Type of the alternative number
485
486 /** @return the ASN.1 name of the alternative */
487 const char* to_string() const
488 {
489 static const char* names[] = {"indicationHeader-Format1", "indicationHeader-Format2"};
490 return value < nulltype ? names[value] : "nulltype";
491 }
492 /** @return the number of the alternative, from 1 */
493 uint8_t to_number() const { return static_cast<uint8_t>(value + 1); }
494 };
495 using types = enumerated<types_opts, true>; ///< The selected alternative as an enumerated value
496
497 /** Select an alternative and reset its content.
498 * @param e alternative to select, `nulltype` for none */
499 void set(types::options e = types::nulltype)
500 {
501 type_ = e;
502 switch (e) {
503 case types::ind_hdr_format1: c_.emplace<1>(); break;
504 case types::ind_hdr_format2: c_.emplace<2>(); break;
505 default: c_.emplace<0>(); break;
506 }
507 }
508 /** @return the selected alternative */
509 types type() const { return type_; }
510 // getters; throw std::bad_variant_access when the other alternative is set
511 /** Content of ind hdr format 1.
512 * @return its content; throws std::bad_variant_access when it is not the selected alternative */
513 e2sm_dapp_ind_hdr_format1_s& ind_hdr_format1() { return std::get<1>(c_); }
514 /** Content of ind hdr format 2.
515 * @return its content; throws std::bad_variant_access when it is not the selected alternative */
516 e2sm_dapp_ind_hdr_format2_s& ind_hdr_format2() { return std::get<2>(c_); }
517 /** Content of ind hdr format 1.
518 * @return its content; throws std::bad_variant_access when it is not the selected alternative */
519 const e2sm_dapp_ind_hdr_format1_s& ind_hdr_format1() const { return std::get<1>(c_); }
520 /** Content of ind hdr format 2.
521 * @return its content; throws std::bad_variant_access when it is not the selected alternative */
522 const e2sm_dapp_ind_hdr_format2_s& ind_hdr_format2() const { return std::get<2>(c_); }
523 /** Select ind hdr format 1.
524 * @return its content, default constructed */
526 {
527 set(types::ind_hdr_format1);
528 return std::get<1>(c_);
529 }
530 /** Select ind hdr format 2.
531 * @return its content, default constructed */
533 {
534 set(types::ind_hdr_format2);
535 return std::get<2>(c_);
536 }
537
538 /** @param o value to compare with
539 * @return true when every field is equal */
540 bool operator==(const ric_ind_hdr_formats_c_& o) const { return type_.value == o.type_.value && c_ == o.c_; }
542
543 private:
544 types type_;
545 std::variant<std::monostate, e2sm_dapp_ind_hdr_format1_s, e2sm_dapp_ind_hdr_format2_s> c_;
546 };
547
548 bool ext = false; ///< ASN.1 extension marker; ignored by `pack`, false after `unpack`
549 ric_ind_hdr_formats_c_ ric_ind_hdr_formats; ///< Format of the element, a CHOICE with one alternative per format
550
551 /** Encode as APER.
552 * @param out receives the bytes, left empty on failure
553 * @return ASN_SUCCESS, or ASN_ERROR_ENCODE_FAIL when a value is outside its constraint */
554 asn_code pack(std::vector<uint8_t>& out) const;
555 /** Decode APER bytes.
556 * @param data bytes to decode
557 * @param len number of bytes
558 * @return ASN_SUCCESS, or ASN_ERROR_DECODE_FAIL when the bytes are not a valid encoding */
559 asn_code unpack(const uint8_t* data, size_t len);
560 /** @param o value to compare with
561 * @return true when every field is equal */
564};
565
566/// Indication message format 1: the dApp report payload (ASN.1 `E2SM-DAPP-IndicationMessage-Format1 ::= SEQUENCE`).
568 bool ext = false; ///< ASN.1 extension marker; ignored by `pack`, false after `unpack`
569 uint16_t data_size = 0; ///< Number of octets in `data`; repeats the length of the octet string
570 bounded_octstring<1, 32768, true> data; ///< Service model payload, copied unchanged from the E3 report (1 to 32768 octets)
571
572 /** @param o value to compare with
573 * @return true when every field is equal */
574 bool operator==(const e2sm_dapp_ind_msg_format1_s& o) const { return data_size == o.data_size && data == o.data; }
576};
577
578/// Indication message format 2: the dApp E3 subscription map (ASN.1 `E2SM-DAPP-IndicationMessage-Format2 ::= SEQUENCE`).
580 bool ext = false; ///< ASN.1 extension marker; ignored by `pack`, false after `unpack`
581 dapp_e3_subscription_list_l dapp_e3_subscriptions; ///< dApp E3 subscription map (0 to 256 items)
582
583 /** @param o value to compare with
584 * @return true when every field is equal */
590};
591
592/// Indication message (ASN.1 `E2SM-DAPP-IndicationMessage ::= SEQUENCE (top-level)`).
594 /// Formats of the indication message.
596 /// Alternatives of the CHOICE, with their ASN.1 names and numbers.
597 struct types_opts {
598 /// Alternatives of the CHOICE; `nulltype` means none is set.
600 /// The selected alternative.
602 typedef uint8_t number_type; ///< Type of the alternative number
603
604 /** @return the ASN.1 name of the alternative */
605 const char* to_string() const
606 {
607 static const char* names[] = {"indicationMessage-Format1", "indicationMessage-Format2"};
608 return value < nulltype ? names[value] : "nulltype";
609 }
610 /** @return the number of the alternative, from 1 */
611 uint8_t to_number() const { return static_cast<uint8_t>(value + 1); }
612 };
613 using types = enumerated<types_opts, true>; ///< The selected alternative as an enumerated value
614
615 /** Select an alternative and reset its content.
616 * @param e alternative to select, `nulltype` for none */
617 void set(types::options e = types::nulltype)
618 {
619 type_ = e;
620 switch (e) {
621 case types::ind_msg_format1: c_.emplace<1>(); break;
622 case types::ind_msg_format2: c_.emplace<2>(); break;
623 default: c_.emplace<0>(); break;
624 }
625 }
626 /** @return the selected alternative */
627 types type() const { return type_; }
628 // getters; throw std::bad_variant_access when the other alternative is set
629 /** Content of ind msg format 1.
630 * @return its content; throws std::bad_variant_access when it is not the selected alternative */
631 e2sm_dapp_ind_msg_format1_s& ind_msg_format1() { return std::get<1>(c_); }
632 /** Content of ind msg format 2.
633 * @return its content; throws std::bad_variant_access when it is not the selected alternative */
634 e2sm_dapp_ind_msg_format2_s& ind_msg_format2() { return std::get<2>(c_); }
635 /** Content of ind msg format 1.
636 * @return its content; throws std::bad_variant_access when it is not the selected alternative */
637 const e2sm_dapp_ind_msg_format1_s& ind_msg_format1() const { return std::get<1>(c_); }
638 /** Content of ind msg format 2.
639 * @return its content; throws std::bad_variant_access when it is not the selected alternative */
640 const e2sm_dapp_ind_msg_format2_s& ind_msg_format2() const { return std::get<2>(c_); }
641 /** Select ind msg format 1.
642 * @return its content, default constructed */
644 {
645 set(types::ind_msg_format1);
646 return std::get<1>(c_);
647 }
648 /** Select ind msg format 2.
649 * @return its content, default constructed */
651 {
652 set(types::ind_msg_format2);
653 return std::get<2>(c_);
654 }
655
656 /** @param o value to compare with
657 * @return true when every field is equal */
658 bool operator==(const ric_ind_msg_formats_c_& o) const { return type_.value == o.type_.value && c_ == o.c_; }
660
661 private:
662 types type_;
663 std::variant<std::monostate, e2sm_dapp_ind_msg_format1_s, e2sm_dapp_ind_msg_format2_s> c_;
664 };
665
666 bool ext = false; ///< ASN.1 extension marker; ignored by `pack`, false after `unpack`
667 ric_ind_msg_formats_c_ ric_ind_msg_formats; ///< Format of the element, a CHOICE with one alternative per format
668
669 /** Encode as APER.
670 * @param out receives the bytes, left empty on failure
671 * @return ASN_SUCCESS, or ASN_ERROR_ENCODE_FAIL when a value is outside its constraint */
672 asn_code pack(std::vector<uint8_t>& out) const;
673 /** Decode APER bytes.
674 * @param data bytes to decode
675 * @param len number of bytes
676 * @return ASN_SUCCESS, or ASN_ERROR_DECODE_FAIL when the bytes are not a valid encoding */
677 asn_code unpack(const uint8_t* data, size_t len);
678 /** @param o value to compare with
679 * @return true when every field is equal */
682};
683
684/// Control header format 1: where a control goes (ASN.1 `E2SM-DAPP-ControlHeader-Format1 ::= SEQUENCE`).
686 bool ext = false; ///< ASN.1 extension marker; ignored by `pack`, false after `unpack`
687 bool timestamp_present = false; ///< true when `timestamp` is present
688 bool sequence_id_present = false; ///< true when `sequence_id` is present
689 uint64_t ran_function_id = 0; ///< E3 RAN function id the control is for
690 uint64_t dapp_id = 0; ///< The dApp that is the target of the control
691 int64_t timestamp = 0; ///< When the xApp built the control, in nanoseconds on the realtime clock of its host
692 int64_t sequence_id = 0; ///< Id of the procedure, echoed from the indication header; absent or 0 means the RAN cannot defer the acknowledge
693
694 /** @param o value to compare with
695 * @return true when every field is equal */
696 bool operator==(const e2sm_dapp_ctrl_hdr_format1_s& o) const;
698};
699
700/// Control header (ASN.1 `E2SM-DAPP-ControlHeader ::= SEQUENCE (top-level)`).
702 /// Formats of the control header.
704 /// Alternatives of the CHOICE, with their ASN.1 names and numbers.
705 struct types_opts {
706 /// Alternatives of the CHOICE; `nulltype` means none is set.
708 /// The selected alternative.
710 typedef uint8_t number_type; ///< Type of the alternative number
711
712 /** @return the ASN.1 name of the alternative */
713 const char* to_string() const { return "controlHeader-Format1"; }
714 /** @return the number of the alternative, from 1 */
715 uint8_t to_number() const { return 1; }
716 };
717 using types = enumerated<types_opts, true>; ///< The selected alternative as an enumerated value
718
719 /** @return the selected alternative */
720 types type() const { return types::ctrl_hdr_format1; }
721 // getters
722 /** Content of ctrl hdr format 1.
723 * @return its content; throws std::bad_variant_access when it is not the selected alternative */
725 /** Content of ctrl hdr format 1.
726 * @return its content; throws std::bad_variant_access when it is not the selected alternative */
728
729 /** @param o value to compare with
730 * @return true when every field is equal */
731 bool operator==(const ric_ctrl_hdr_formats_c_& o) const { return c == o.c; }
733
734 private:
736 };
737
738 bool ext = false; ///< ASN.1 extension marker; ignored by `pack`, false after `unpack`
739 ric_ctrl_hdr_formats_c_ ric_ctrl_hdr_formats; ///< Format of the element, a CHOICE with one alternative per format
740
741 /** Encode as APER.
742 * @param out receives the bytes, left empty on failure
743 * @return ASN_SUCCESS, or ASN_ERROR_ENCODE_FAIL when a value is outside its constraint */
744 asn_code pack(std::vector<uint8_t>& out) const;
745 /** Decode APER bytes.
746 * @param data bytes to decode
747 * @param len number of bytes
748 * @return ASN_SUCCESS, or ASN_ERROR_DECODE_FAIL when the bytes are not a valid encoding */
749 asn_code unpack(const uint8_t* data, size_t len);
750 /** @param o value to compare with
751 * @return true when every field is equal */
754};
755
756/// Control message format 1: the xApp control payload (ASN.1 `E2SM-DAPP-ControlMessage-Format1 ::= SEQUENCE`).
758 bool ext = false; ///< ASN.1 extension marker; ignored by `pack`, false after `unpack`
759 uint16_t data_size = 0; ///< Number of octets in `data`; repeats the length of the octet string
760 bounded_octstring<1, 32768, true> data; ///< Service model payload, delivered unchanged to the dApp (1 to 32768 octets)
761
762 /** @param o value to compare with
763 * @return true when every field is equal */
764 bool operator==(const e2sm_dapp_ctrl_msg_format1_s& o) const { return data_size == o.data_size && data == o.data; }
766};
767
768/// Control message (ASN.1 `E2SM-DAPP-ControlMessage ::= SEQUENCE (top-level)`).
770 /// Formats of the control message.
772 /// Alternatives of the CHOICE, with their ASN.1 names and numbers.
773 struct types_opts {
774 /// Alternatives of the CHOICE; `nulltype` means none is set.
776 /// The selected alternative.
778 typedef uint8_t number_type; ///< Type of the alternative number
779
780 /** @return the ASN.1 name of the alternative */
781 const char* to_string() const { return "controlMessage-Format1"; }
782 /** @return the number of the alternative, from 1 */
783 uint8_t to_number() const { return 1; }
784 };
785 using types = enumerated<types_opts, true>; ///< The selected alternative as an enumerated value
786
787 /** @return the selected alternative */
788 types type() const { return types::ctrl_msg_format1; }
789 // getters
790 /** Content of ctrl msg format 1.
791 * @return its content; throws std::bad_variant_access when it is not the selected alternative */
793 /** Content of ctrl msg format 1.
794 * @return its content; throws std::bad_variant_access when it is not the selected alternative */
796
797 /** @param o value to compare with
798 * @return true when every field is equal */
799 bool operator==(const ric_ctrl_msg_formats_c_& o) const { return c == o.c; }
801
802 private:
804 };
805
806 bool ext = false; ///< ASN.1 extension marker; ignored by `pack`, false after `unpack`
807 ric_ctrl_msg_formats_c_ ric_ctrl_msg_formats; ///< Format of the element, a CHOICE with one alternative per format
808
809 /** Encode as APER.
810 * @param out receives the bytes, left empty on failure
811 * @return ASN_SUCCESS, or ASN_ERROR_ENCODE_FAIL when a value is outside its constraint */
812 asn_code pack(std::vector<uint8_t>& out) const;
813 /** Decode APER bytes.
814 * @param data bytes to decode
815 * @param len number of bytes
816 * @return ASN_SUCCESS, or ASN_ERROR_DECODE_FAIL when the bytes are not a valid encoding */
817 asn_code unpack(const uint8_t* data, size_t len);
818 /** @param o value to compare with
819 * @return true when every field is equal */
822};
823
824/// Control outcome format 1: the answer to a control (ASN.1 `E2SM-DAPP-ControlOutcome-Format1 ::= SEQUENCE`).
826 bool ext = false; ///< ASN.1 extension marker; ignored by `pack`, false after `unpack`
827 bool timestamp_present = false; ///< true when `timestamp` is present
828 bool sequence_id_present = false; ///< true when `sequence_id` is present
829 bool e3_ctrl_outcome_present = false; ///< true when `e3_ctrl_outcome` is present
830 int64_t timestamp = 0; ///< When the RAN built the outcome, in nanoseconds on its realtime clock
831 int64_t sequence_id = 0; ///< Procedure this outcome answers, copied from the control header
832 unbounded_octstring<true> e3_ctrl_outcome; ///< Account of the service model on applying the control; E2SM-DAPP does not interpret it
833
834 /** @param o value to compare with
835 * @return true when every field is equal */
836 bool operator==(const e2sm_dapp_ctrl_outcome_format1_s& o) const;
838};
839
840/// Control outcome (ASN.1 `E2SM-DAPP-ControlOutcome ::= SEQUENCE (top-level)`).
842 /// Formats of the control outcome.
844 /// Alternatives of the CHOICE, with their ASN.1 names and numbers.
845 struct types_opts {
846 /// Alternatives of the CHOICE; `nulltype` means none is set.
848 /// The selected alternative.
850 typedef uint8_t number_type; ///< Type of the alternative number
851
852 /** @return the ASN.1 name of the alternative */
853 const char* to_string() const { return "controlOutcome-Format1"; }
854 /** @return the number of the alternative, from 1 */
855 uint8_t to_number() const { return 1; }
856 };
857 using types = enumerated<types_opts, true>; ///< The selected alternative as an enumerated value
858
859 /** @return the selected alternative */
860 types type() const { return types::ctrl_outcome_format1; }
861 // getters
862 /** Content of ctrl outcome format 1.
863 * @return its content; throws std::bad_variant_access when it is not the selected alternative */
865 /** Content of ctrl outcome format 1.
866 * @return its content; throws std::bad_variant_access when it is not the selected alternative */
868
869 /** @param o value to compare with
870 * @return true when every field is equal */
871 bool operator==(const ric_ctrl_outcome_formats_c_& o) const { return c == o.c; }
873
874 private:
876 };
877
878 bool ext = false; ///< ASN.1 extension marker; ignored by `pack`, false after `unpack`
879 ric_ctrl_outcome_formats_c_ ric_ctrl_outcome_formats; ///< Format of the element, a CHOICE with one alternative per format
880
881 /** Encode as APER.
882 * @param out receives the bytes, left empty on failure
883 * @return ASN_SUCCESS, or ASN_ERROR_ENCODE_FAIL when a value is outside its constraint */
884 asn_code pack(std::vector<uint8_t>& out) const;
885 /** Decode APER bytes.
886 * @param data bytes to decode
887 * @param len number of bytes
888 * @return ASN_SUCCESS, or ASN_ERROR_DECODE_FAIL when the bytes are not a valid encoding */
889 asn_code unpack(const uint8_t* data, size_t len);
890 /** @param o value to compare with
891 * @return true when every field is equal */
897};
898
899#undef LIBE3_E2SM_DAPP_NEQ
900
901} // namespace e2sm_dapp
902} // namespace libe3
903
904#endif // LIBE3_E2SM_DAPP_HPP
SEQUENCE OF with an upper bound UB.
OCTET STRING (SIZE(LB..UB)).
SEQUENCE OF with a size constraint known only at pack time.
Mirrors OCUDU's enumerated<Opts, Ext>: derives from the options struct and converts to its enum.
Definition e2sm_dapp.hpp:63
operator typename types_opts::options() const
Definition e2sm_dapp.hpp:72
enumerated(typename EnumType::options v)
Definition e2sm_dapp.hpp:70
enumerated()
Holds nulltype, no alternative.
Definition e2sm_dapp.hpp:68
OCTET STRING (SIZE(N)).
PrintableString (SIZE(LB..UB)).
Definition e2sm_dapp.hpp:78
const std::string & to_string() const
Definition e2sm_dapp.hpp:88
bool operator!=(const printable_string &o) const
Definition e2sm_dapp.hpp:98
bool operator==(const printable_string &o) const
Definition e2sm_dapp.hpp:95
printable_string & from_string(const std::string &s)
Definition e2sm_dapp.hpp:82
OCTET STRING without a size constraint.
unbounded_octstring & from_bytes(const uint8_t *data, size_t len)
#define LIBE3_E2SM_DAPP_NEQ(T)
@ ASN_ERROR_ENCODE_FAIL
a value is outside its ASN.1 constraint, or the buffer cannot be built
Definition e2sm_dapp.hpp:49
@ ASN_ERROR_DECODE_FAIL
the bytes are not a valid APER encoding of the type
Definition e2sm_dapp.hpp:50
constexpr int64_t max_e2sm_dapp_ctrl_msg_size
Largest control message data, in octets.
constexpr int64_t maxnoof_dapp_control_styles
Most control styles in a RAN function definition.
constexpr int64_t max_e2sm_dapp_ind_msg_size
Largest indication message data, in octets.
constexpr int64_t maxnoof_dapps
Most dApps in a dApp E3 subscription list.
constexpr int64_t maxnoof_subscribed_e3_ran_functions
Most E3 RAN functions one dApp can subscribe to.
constexpr int64_t maxnoof_dapp_report_styles
Most report styles in a RAN function definition.
dyn_array< dapp_e3_subscription_item_s > dapp_e3_subscription_list_l
The dApp E3 subscription map, 0 to 256 items (ASN.1 DAppE3Subscription-List ::= SEQUENCE (SIZE (0....
The E3 RAN functions one dApp has subscribed to (ASN.1 DAppE3Subscription-Item ::= SEQUENCE).
bool operator==(const dapp_e3_subscription_item_s &o) const
bool ext
ASN.1 extension marker; ignored by pack, false after unpack.
subscribed_e3_ran_functions_l_ subscribed_e3_ran_functions
E3 RAN functions the dApp has subscribed to (1 to 64).
bounded_array< uint64_t, 64 > subscribed_e3_ran_functions_l_
List of E3 RAN function ids.
Action definition format 1: no fields (ASN.1 E2SM-DAPP-ActionDefinition-Format1 ::= SEQUENCE {}...
bool operator==(const e2sm_dapp_action_definition_format1_s &) const
Alternatives of the CHOICE, with their ASN.1 names and numbers.
enumerated< types_opts, true > types
The selected alternative as an enumerated value.
const e2sm_dapp_action_definition_format1_s & action_definition_format1() const
bool operator==(const action_definition_formats_c_ &o) const
Action definition of a subscription, which selects the report style (ASN.1 E2SM-DAPP-ActionDefinition...
bool ext
ASN.1 extension marker; ignored by pack, false after unpack.
action_definition_formats_c_ action_definition_formats
Format of the element, a CHOICE with one alternative per format.
int64_t ric_style_type
Report style the subscription selects (1 or 2); it selects the indication formats.
asn_code unpack(const uint8_t *data, size_t len)
asn_code pack(std::vector< uint8_t > &out) const
bool operator==(const e2sm_dapp_action_definition_s &o) const
Control header format 1: where a control goes (ASN.1 E2SM-DAPP-ControlHeader-Format1 ::= SEQUENCE).
bool timestamp_present
true when timestamp is present
bool operator==(const e2sm_dapp_ctrl_hdr_format1_s &o) const
bool sequence_id_present
true when sequence_id is present
int64_t sequence_id
Id of the procedure, echoed from the indication header; absent or 0 means the RAN cannot defer the ac...
uint64_t ran_function_id
E3 RAN function id the control is for.
uint64_t dapp_id
The dApp that is the target of the control.
bool ext
ASN.1 extension marker; ignored by pack, false after unpack.
int64_t timestamp
When the xApp built the control, in nanoseconds on the realtime clock of its host.
Alternatives of the CHOICE, with their ASN.1 names and numbers.
options
Alternatives of the CHOICE; nulltype means none is set.
enumerated< types_opts, true > types
The selected alternative as an enumerated value.
bool operator==(const ric_ctrl_hdr_formats_c_ &o) const
const e2sm_dapp_ctrl_hdr_format1_s & ctrl_hdr_format1() const
Control header (ASN.1 E2SM-DAPP-ControlHeader ::= SEQUENCE (top-level)).
bool operator==(const e2sm_dapp_ctrl_hdr_s &o) const
asn_code pack(std::vector< uint8_t > &out) const
bool ext
ASN.1 extension marker; ignored by pack, false after unpack.
asn_code unpack(const uint8_t *data, size_t len)
ric_ctrl_hdr_formats_c_ ric_ctrl_hdr_formats
Format of the element, a CHOICE with one alternative per format.
Control message format 1: the xApp control payload (ASN.1 E2SM-DAPP-ControlMessage-Format1 ::= SEQUEN...
bounded_octstring< 1, 32768, true > data
Service model payload, delivered unchanged to the dApp (1 to 32768 octets).
bool ext
ASN.1 extension marker; ignored by pack, false after unpack.
uint16_t data_size
Number of octets in data; repeats the length of the octet string.
bool operator==(const e2sm_dapp_ctrl_msg_format1_s &o) const
Alternatives of the CHOICE, with their ASN.1 names and numbers.
options
Alternatives of the CHOICE; nulltype means none is set.
enumerated< types_opts, true > types
The selected alternative as an enumerated value.
bool operator==(const ric_ctrl_msg_formats_c_ &o) const
const e2sm_dapp_ctrl_msg_format1_s & ctrl_msg_format1() const
Control message (ASN.1 E2SM-DAPP-ControlMessage ::= SEQUENCE (top-level)).
bool ext
ASN.1 extension marker; ignored by pack, false after unpack.
ric_ctrl_msg_formats_c_ ric_ctrl_msg_formats
Format of the element, a CHOICE with one alternative per format.
asn_code pack(std::vector< uint8_t > &out) const
bool operator==(const e2sm_dapp_ctrl_msg_s &o) const
asn_code unpack(const uint8_t *data, size_t len)
Control outcome format 1: the answer to a control (ASN.1 E2SM-DAPP-ControlOutcome-Format1 ::= SEQUENC...
bool e3_ctrl_outcome_present
true when e3_ctrl_outcome is present
int64_t timestamp
When the RAN built the outcome, in nanoseconds on its realtime clock.
bool sequence_id_present
true when sequence_id is present
bool ext
ASN.1 extension marker; ignored by pack, false after unpack.
bool operator==(const e2sm_dapp_ctrl_outcome_format1_s &o) const
int64_t sequence_id
Procedure this outcome answers, copied from the control header.
bool timestamp_present
true when timestamp is present
unbounded_octstring< true > e3_ctrl_outcome
Account of the service model on applying the control; E2SM-DAPP does not interpret it.
Alternatives of the CHOICE, with their ASN.1 names and numbers.
options
Alternatives of the CHOICE; nulltype means none is set.
const e2sm_dapp_ctrl_outcome_format1_s & ctrl_outcome_format1() const
enumerated< types_opts, true > types
The selected alternative as an enumerated value.
bool operator==(const ric_ctrl_outcome_formats_c_ &o) const
Control outcome (ASN.1 E2SM-DAPP-ControlOutcome ::= SEQUENCE (top-level)).
asn_code pack(std::vector< uint8_t > &out) const
bool operator==(const e2sm_dapp_ctrl_outcome_s &o) const
asn_code unpack(const uint8_t *data, size_t len)
bool ext
ASN.1 extension marker; ignored by pack, false after unpack.
ric_ctrl_outcome_formats_c_ ric_ctrl_outcome_formats
Format of the element, a CHOICE with one alternative per format.
Event trigger format 1: no fields, the RAN reports when it has something to report (ASN....
bool operator==(const e2sm_dapp_event_trigger_format1_s &) const
Alternatives of the CHOICE, with their ASN.1 names and numbers.
enumerated< types_opts, true > types
The selected alternative as an enumerated value.
const e2sm_dapp_event_trigger_format1_s & event_trigger_format1() const
bool operator==(const ric_event_trigger_formats_c_ &o) const
Event trigger definition of a subscription (ASN.1 E2SM-DAPP-EventTrigger ::= SEQUENCE (top-level)).
asn_code unpack(const uint8_t *data, size_t len)
asn_code pack(std::vector< uint8_t > &out) const
ric_event_trigger_formats_c_ ric_event_trigger_formats
Format of the element, a CHOICE with one alternative per format.
bool ext
ASN.1 extension marker; ignored by pack, false after unpack.
bool operator==(const e2sm_dapp_event_trigger_s &o) const
Indication header format 1: the header of a dApp report (ASN.1 E2SM-DAPP-IndicationHeader-Format1 ::=...
bool node_cu_du_id_present
true when node_cu_du_id is present
uint8_t node_type
Type of the reporting node (0 to 255).
uint64_t ran_function_id
E3 RAN function id of the report, not the E2 RAN function id.
fixed_octstring< 3, true > node_plmn_id
PLMN id of the node, 3 octets.
bool ext
ASN.1 extension marker; ignored by pack, false after unpack.
uint64_t dapp_id
The dApp that sent the report.
int64_t sequence_id
Correlation id of the dApp for this report, copied from the E3 report.
bool sequence_id_present
true when sequence_id is present
int64_t timestamp
When the RAN built the indication, in nanoseconds on its realtime clock.
bool timestamp_present
true when timestamp is present
uint64_t node_cu_du_id
CU or DU id inside the node.
bool operator==(const e2sm_dapp_ind_hdr_format1_s &o) const
Indication header format 2: the header of a subscription map (ASN.1 E2SM-DAPP-IndicationHeader-Format...
uint64_t node_cu_du_id
CU or DU id inside the node.
bool timestamp_present
true when timestamp is present
int64_t timestamp
When the RAN built the indication, in nanoseconds on its realtime clock.
fixed_octstring< 3, true > node_plmn_id
PLMN id of the node, 3 octets.
bool sequence_id_present
true when sequence_id is present
bool node_cu_du_id_present
true when node_cu_du_id is present
bool operator==(const e2sm_dapp_ind_hdr_format2_s &o) const
bool ext
ASN.1 extension marker; ignored by pack, false after unpack.
uint8_t node_type
Type of the reporting node (0 to 255).
int64_t sequence_id
Correlation id; a subscription map has no procedure, so a RAN leaves it absent.
Alternatives of the CHOICE, with their ASN.1 names and numbers.
options
Alternatives of the CHOICE; nulltype means none is set.
const e2sm_dapp_ind_hdr_format1_s & ind_hdr_format1() const
bool operator==(const ric_ind_hdr_formats_c_ &o) const
enumerated< types_opts, true > types
The selected alternative as an enumerated value.
const e2sm_dapp_ind_hdr_format2_s & ind_hdr_format2() const
Indication header (ASN.1 E2SM-DAPP-IndicationHeader ::= SEQUENCE (top-level)).
bool ext
ASN.1 extension marker; ignored by pack, false after unpack.
bool operator==(const e2sm_dapp_ind_hdr_s &o) const
asn_code pack(std::vector< uint8_t > &out) const
asn_code unpack(const uint8_t *data, size_t len)
ric_ind_hdr_formats_c_ ric_ind_hdr_formats
Format of the element, a CHOICE with one alternative per format.
Indication message format 1: the dApp report payload (ASN.1 E2SM-DAPP-IndicationMessage-Format1 ::= S...
bool operator==(const e2sm_dapp_ind_msg_format1_s &o) const
bounded_octstring< 1, 32768, true > data
Service model payload, copied unchanged from the E3 report (1 to 32768 octets).
bool ext
ASN.1 extension marker; ignored by pack, false after unpack.
uint16_t data_size
Number of octets in data; repeats the length of the octet string.
Indication message format 2: the dApp E3 subscription map (ASN.1 E2SM-DAPP-IndicationMessage-Format2 ...
bool operator==(const e2sm_dapp_ind_msg_format2_s &o) const
bool ext
ASN.1 extension marker; ignored by pack, false after unpack.
dapp_e3_subscription_list_l dapp_e3_subscriptions
dApp E3 subscription map (0 to 256 items)
Alternatives of the CHOICE, with their ASN.1 names and numbers.
options
Alternatives of the CHOICE; nulltype means none is set.
enumerated< types_opts, true > types
The selected alternative as an enumerated value.
const e2sm_dapp_ind_msg_format2_s & ind_msg_format2() const
const e2sm_dapp_ind_msg_format1_s & ind_msg_format1() const
bool operator==(const ric_ind_msg_formats_c_ &o) const
Indication message (ASN.1 E2SM-DAPP-IndicationMessage ::= SEQUENCE (top-level)).
bool operator==(const e2sm_dapp_ind_msg_s &o) const
asn_code pack(std::vector< uint8_t > &out) const
bool ext
ASN.1 extension marker; ignored by pack, false after unpack.
asn_code unpack(const uint8_t *data, size_t len)
ric_ind_msg_formats_c_ ric_ind_msg_formats
Format of the element, a CHOICE with one alternative per format.
RAN function definition, announced in E2 Setup and RIC Service Update (ASN.1 E2SM-DAPP-RANFunctionDef...
bool operator==(const e2sm_dapp_ran_function_definition_s &o) const
Definition e2sm_dapp.cpp:89
bool ran_function_definition_report_present
true when ran_function_definition_report is present
ran_function_definition_ctrl_s ran_function_definition_ctrl
Control section.
bool ran_function_definition_ctrl_present
true when ran_function_definition_ctrl is present
bool ext
ASN.1 extension marker; ignored by pack, false after unpack.
asn_code unpack(const uint8_t *data, size_t len)
ran_function_definition_event_trigger_s ran_function_definition_event_trigger
Event trigger section, empty.
ran_function_name_s ran_function_name
Name of the RAN function.
bool ran_function_definition_event_trigger_present
true when ran_function_definition_event_trigger is present
asn_code pack(std::vector< uint8_t > &out) const
ran_function_definition_report_s ran_function_definition_report
Report section.
One control style of the RAN function definition (ASN.1 RANFunctionDefinition-Control-Item ::= SEQUEN...
bool dapp_e3_subscriptions_present
true when dapp_e3_subscriptions is present
bool operator==(const ran_function_definition_ctrl_item_s &o) const
Definition e2sm_dapp.cpp:79
int64_t ric_ctrl_outcome_format_type
Control outcome format the style uses.
int64_t ric_ctrl_style_type
Control style number (1).
dapp_e3_subscription_list_l dapp_e3_subscriptions
dApp E3 subscription map (0 to 256 items)
bool ext
ASN.1 extension marker; ignored by pack, false after unpack.
printable_string< 1, 150, true, true > ric_ctrl_style_name
Control style name, 1 to 150 characters.
int64_t ric_ctrl_hdr_format_type
Control header format the style uses.
int64_t ric_ctrl_msg_format_type
Control message format the style uses.
Control section of the RAN function definition (ASN.1 RANFunctionDefinition-Control ::= SEQUENCE).
ric_ctrl_style_list_l_ ric_ctrl_style_list
Control styles the RAN supports (exactly 1).
bool operator==(const ran_function_definition_ctrl_s &o) const
bool ext
ASN.1 extension marker; ignored by pack, false after unpack.
dyn_array< ran_function_definition_ctrl_item_s > ric_ctrl_style_list_l_
List of control styles.
Event trigger section of the RAN function definition: empty, its presence says the function has an ev...
bool ext
ASN.1 extension marker; ignored by pack, false after unpack.
bool operator==(const ran_function_definition_event_trigger_s &) const
One report style of the RAN function definition (ASN.1 RANFunctionDefinition-Report-Item ::= SEQUENCE...
int64_t ric_report_style_type
Report style number (1 or 2).
int64_t ric_ind_hdr_format_type
Indication header format the style produces.
bool ext
ASN.1 extension marker; ignored by pack, false after unpack.
dapp_e3_subscription_list_l dapp_e3_subscriptions
dApp E3 subscription map (0 to 256 items)
bool operator==(const ran_function_definition_report_item_s &o) const
Definition e2sm_dapp.cpp:70
int64_t ric_ind_msg_format_type
Indication message format the style produces.
bool dapp_e3_subscriptions_present
true when dapp_e3_subscriptions is present
printable_string< 1, 150, true, true > ric_report_style_name
Report style name, 1 to 150 characters.
Report section of the RAN function definition (ASN.1 RANFunctionDefinition-Report ::= SEQUENCE).
bool operator==(const ran_function_definition_report_s &o) const
dyn_array< ran_function_definition_report_item_s > ric_report_style_list_l_
List of report styles.
bool ext
ASN.1 extension marker; ignored by pack, false after unpack.
ric_report_style_list_l_ ric_report_style_list
Report styles the RAN supports (1 to 2).
Name, OID and description of the RAN function (ASN.1 RANfunction-Name ::= SEQUENCE).
printable_string< 1, 150, true, true > ran_function_description
Description, 1 to 150 characters.
printable_string< 1, 150, true, true > ran_function_short_name
Short name (E2SM-DAPP), 1 to 150 characters.
int64_t ran_function_instance
Instance number; not used, a sender shall not set it.
bool operator==(const ran_function_name_s &o) const
Definition e2sm_dapp.cpp:61
bool ext
ASN.1 extension marker; ignored by pack, false after unpack.
printable_string< 1, 1000, true, true > ran_function_e2sm_o_id
Service model OID, 1 to 1000 characters.
bool ran_function_instance_present
true when ran_function_instance is present