|
libe3 0.6.1
C++ library for E3AP RAN vendor integration
|
Abstract base class for E3AP encoders. More...
#include <e3_encoder.hpp>
Public Member Functions | |
| virtual | ~E3Encoder ()=default |
| E3Encoder (const E3Encoder &)=delete | |
| E3Encoder & | operator= (const E3Encoder &)=delete |
| E3Encoder (E3Encoder &&)=default | |
| Movable. | |
| E3Encoder & | operator= (E3Encoder &&)=default |
| virtual EncodeResult< EncodedMessage > | encode (const Pdu &pdu)=0 |
| Encode a PDU to bytes. | |
| virtual EncodeResult< Pdu > | decode (const EncodedMessage &encoded)=0 |
| Decode bytes to a PDU. | |
| virtual EncodeResult< Pdu > | decode (const uint8_t *data, size_t size)=0 |
| Decode bytes to a PDU. | |
| virtual EncodingFormat | format () const noexcept=0 |
| Get the encoding format. | |
| EncodeResult< EncodedMessage > | encode_setup_request (uint32_t message_id, const std::string &e3ap_protocol_version, const std::string &dapp_name, const std::string &dapp_version, const std::string &vendor) |
| Create and encode a Setup Request PDU. | |
| EncodeResult< EncodedMessage > | encode_setup_response (uint32_t message_id, uint32_t request_id, ResponseCode response_code, const std::optional< std::string > &e3ap_protocol_version=std::nullopt, const std::optional< uint32_t > &dapp_identifier=std::nullopt, const std::string &ran_identifier="", const std::optional< std::vector< RanFunctionDef > > &ran_function_list=std::nullopt, const std::optional< Cause > &cause=std::nullopt, const std::optional< std::string > &detail=std::nullopt) |
| Create and encode a Setup Response PDU. | |
| EncodeResult< EncodedMessage > | encode_subscription_request (uint32_t message_id, uint32_t dapp_identifier, uint32_t ran_function_identifier, const std::vector< uint32_t > &telemetry_identifier_list, const std::vector< uint32_t > &control_identifier_list, const std::optional< uint32_t > &subscription_time=std::nullopt) |
| Create and encode a Subscription Request PDU. | |
| EncodeResult< EncodedMessage > | encode_subscription_delete (uint32_t message_id, uint32_t dapp_identifier, uint32_t subscription_id) |
| Create and encode a Subscription Delete PDU. | |
| EncodeResult< EncodedMessage > | encode_subscription_response (uint32_t message_id, uint32_t request_id, uint32_t dapp_identifier, ResponseCode response_code, const std::optional< uint32_t > &subscription_id=std::nullopt, const std::optional< Cause > &cause=std::nullopt, const std::optional< std::string > &detail=std::nullopt) |
| Create and encode a Subscription Response PDU. | |
| EncodeResult< EncodedMessage > | encode_indication_message (uint32_t message_id, uint32_t dapp_identifier, uint32_t ran_function_identifier, const std::vector< uint8_t > &protocol_data) |
| Create and encode an Indication Message PDU. | |
| EncodeResult< EncodedMessage > | encode_dapp_control_action (uint32_t message_id, uint32_t dapp_identifier, uint32_t ran_function_identifier, uint32_t control_identifier, const std::vector< uint8_t > &action_data) |
| Create and encode a dApp Control Action PDU. | |
| EncodeResult< EncodedMessage > | encode_dapp_report (uint32_t message_id, uint32_t dapp_identifier, uint32_t ran_function_identifier, const std::vector< uint8_t > &report_data) |
| Create and encode a dApp Report PDU. | |
| EncodeResult< EncodedMessage > | encode_xapp_control_action (uint32_t message_id, uint32_t dapp_identifier, uint32_t ran_function_identifier, const std::vector< uint8_t > &xapp_control_data) |
| Create and encode an xApp Control Action PDU. | |
| EncodeResult< EncodedMessage > | encode_message_ack (uint32_t message_id, uint32_t request_id, ResponseCode response_code, const std::optional< Cause > &cause=std::nullopt, const std::optional< std::string > &detail=std::nullopt) |
| Create and encode a Message Acknowledgment PDU. | |
| EncodeResult< EncodedMessage > | encode_control_response (uint32_t message_id, const ControlResponse &response) |
| Create and encode a Control Response PDU. | |
Protected Member Functions | |
| E3Encoder ()=default | |
Abstract base class for E3AP encoders.
This class defines the interface for encoding and decoding E3AP PDUs. The design allows for multiple encoding formats (ASN.1, JSON) while maintaining the same API.
Derived classes:
Definition at line 39 of file e3_encoder.hpp.
|
virtualdefault |
|
delete |
|
default |
Movable.
|
protecteddefault |
|
pure virtual |
Decode bytes to a PDU.
| encoded | Encoded message to decode |
Implemented in libe3::Asn1E3Encoder, libe3::JsonE3Encoder, and libe3::ProtobufE3Encoder.
|
pure virtual |
Decode bytes to a PDU.
| data | Raw data buffer |
| size | Size of data |
Implemented in libe3::Asn1E3Encoder, libe3::JsonE3Encoder, and libe3::ProtobufE3Encoder.
|
pure virtual |
Encode a PDU to bytes.
| pdu | PDU to encode |
Implemented in libe3::Asn1E3Encoder, libe3::JsonE3Encoder, and libe3::ProtobufE3Encoder.
| EncodeResult< EncodedMessage > libe3::E3Encoder::encode_control_response | ( | uint32_t | message_id, |
| const ControlResponse & | response ) |
Create and encode a Control Response PDU.
| message_id | Unique message ID |
| response | The response; its request_id is the message ID of the control it answers |
Definition at line 202 of file e3_encoder.cpp.
| EncodeResult< EncodedMessage > libe3::E3Encoder::encode_dapp_control_action | ( | uint32_t | message_id, |
| uint32_t | dapp_identifier, | ||
| uint32_t | ran_function_identifier, | ||
| uint32_t | control_identifier, | ||
| const std::vector< uint8_t > & | action_data ) |
Create and encode a dApp Control Action PDU.
| message_id | Unique message ID |
| dapp_identifier | dApp identifier |
| ran_function_identifier | RAN function identifier |
| control_identifier | Control identifier |
| action_data | Action data |
Definition at line 134 of file e3_encoder.cpp.
| EncodeResult< EncodedMessage > libe3::E3Encoder::encode_dapp_report | ( | uint32_t | message_id, |
| uint32_t | dapp_identifier, | ||
| uint32_t | ran_function_identifier, | ||
| const std::vector< uint8_t > & | report_data ) |
Create and encode a dApp Report PDU.
| message_id | Unique message ID |
| dapp_identifier | dApp identifier |
| ran_function_identifier | RAN function identifier |
| report_data | Report data |
Definition at line 152 of file e3_encoder.cpp.
| EncodeResult< EncodedMessage > libe3::E3Encoder::encode_indication_message | ( | uint32_t | message_id, |
| uint32_t | dapp_identifier, | ||
| uint32_t | ran_function_identifier, | ||
| const std::vector< uint8_t > & | protocol_data ) |
Create and encode an Indication Message PDU.
| message_id | Unique message ID |
| dapp_identifier | dApp identifier |
| ran_function_identifier | RAN function identifier |
| protocol_data | Protocol data |
Definition at line 118 of file e3_encoder.cpp.
| EncodeResult< EncodedMessage > libe3::E3Encoder::encode_message_ack | ( | uint32_t | message_id, |
| uint32_t | request_id, | ||
| ResponseCode | response_code, | ||
| const std::optional< Cause > & | cause = std::nullopt, | ||
| const std::optional< std::string > & | detail = std::nullopt ) |
Create and encode a Message Acknowledgment PDU.
DEPRECATED TO BE REMOVED. libe3 does not send one; use encode_control_response().
| message_id | Unique message ID |
| request_id | Message ID of the request being acknowledged |
| response_code | Positive or negative |
| cause | Why the request was refused (optional, negative only) |
| detail | Text for the cause, up to MAX_DETAIL_SIZE bytes (optional) |
Definition at line 184 of file e3_encoder.cpp.
| EncodeResult< EncodedMessage > libe3::E3Encoder::encode_setup_request | ( | uint32_t | message_id, |
| const std::string & | e3ap_protocol_version, | ||
| const std::string & | dapp_name, | ||
| const std::string & | dapp_version, | ||
| const std::string & | vendor ) |
Create and encode a Setup Request PDU.
| message_id | Unique message ID |
| e3ap_protocol_version | E3AP protocol version string (e.g., "0.0.0"; 1..32 bytes over ASN.1) |
| dapp_name | Name of the dApp (1..64 bytes over ASN.1) |
| dapp_version | Version of the dApp (e.g., "0.0.0"; 1..32 bytes over ASN.1) |
| vendor | Vendor name (1..64 bytes over ASN.1) |
Definition at line 16 of file e3_encoder.cpp.
| EncodeResult< EncodedMessage > libe3::E3Encoder::encode_setup_response | ( | uint32_t | message_id, |
| uint32_t | request_id, | ||
| ResponseCode | response_code, | ||
| const std::optional< std::string > & | e3ap_protocol_version = std::nullopt, | ||
| const std::optional< uint32_t > & | dapp_identifier = std::nullopt, | ||
| const std::string & | ran_identifier = "", | ||
| const std::optional< std::vector< RanFunctionDef > > & | ran_function_list = std::nullopt, | ||
| const std::optional< Cause > & | cause = std::nullopt, | ||
| const std::optional< std::string > & | detail = std::nullopt ) |
Create and encode a Setup Response PDU.
| message_id | Unique message ID |
| request_id | ID of the corresponding SetupRequest |
| response_code | Response code (positive/negative) |
| e3ap_protocol_version | E3AP protocol version (optional) |
| dapp_identifier | Assigned dApp identifier (optional) |
| ran_identifier | RAN identifier |
| ran_function_list | List of available RAN functions (optional). std::nullopt and an empty list both encode with the OPTIONAL ranFunctionList absent on the wire. |
| cause | Why the setup was refused (optional, negative only) |
| detail | Text for the cause, up to MAX_DETAIL_SIZE bytes (optional) |
Definition at line 34 of file e3_encoder.cpp.
| EncodeResult< EncodedMessage > libe3::E3Encoder::encode_subscription_delete | ( | uint32_t | message_id, |
| uint32_t | dapp_identifier, | ||
| uint32_t | subscription_id ) |
Create and encode a Subscription Delete PDU.
| message_id | Unique message ID |
| dapp_identifier | dApp identifier |
| subscription_id | Subscription ID to delete |
Definition at line 82 of file e3_encoder.cpp.
| EncodeResult< EncodedMessage > libe3::E3Encoder::encode_subscription_request | ( | uint32_t | message_id, |
| uint32_t | dapp_identifier, | ||
| uint32_t | ran_function_identifier, | ||
| const std::vector< uint32_t > & | telemetry_identifier_list, | ||
| const std::vector< uint32_t > & | control_identifier_list, | ||
| const std::optional< uint32_t > & | subscription_time = std::nullopt ) |
Create and encode a Subscription Request PDU.
| message_id | Unique message ID |
| dapp_identifier | dApp identifier |
| ran_function_identifier | RAN function to subscribe to |
| telemetry_identifier_list | List of telemetry identifiers |
| control_identifier_list | List of control identifiers |
| subscription_time | How long to keep the subscription (0-86400 sec, optional) |
Definition at line 62 of file e3_encoder.cpp.
| EncodeResult< EncodedMessage > libe3::E3Encoder::encode_subscription_response | ( | uint32_t | message_id, |
| uint32_t | request_id, | ||
| uint32_t | dapp_identifier, | ||
| ResponseCode | response_code, | ||
| const std::optional< uint32_t > & | subscription_id = std::nullopt, | ||
| const std::optional< Cause > & | cause = std::nullopt, | ||
| const std::optional< std::string > & | detail = std::nullopt ) |
Create and encode a Subscription Response PDU.
| message_id | Unique message ID |
| request_id | ID of the corresponding SubscriptionRequest |
| dapp_identifier | dApp identifier |
| response_code | Response code (positive/negative) |
| subscription_id | Subscription ID (optional) |
| cause | Why the subscription was refused (optional, negative only) |
| detail | Text for the cause, up to MAX_DETAIL_SIZE bytes (optional) |
Definition at line 96 of file e3_encoder.cpp.
| EncodeResult< EncodedMessage > libe3::E3Encoder::encode_xapp_control_action | ( | uint32_t | message_id, |
| uint32_t | dapp_identifier, | ||
| uint32_t | ran_function_identifier, | ||
| const std::vector< uint8_t > & | xapp_control_data ) |
Create and encode an xApp Control Action PDU.
| message_id | Unique message ID |
| dapp_identifier | dApp identifier |
| ran_function_identifier | RAN function identifier |
| xapp_control_data | xApp control data |
Definition at line 168 of file e3_encoder.cpp.
|
pure virtualnoexcept |
Get the encoding format.
Implemented in libe3::Asn1E3Encoder, libe3::JsonE3Encoder, and libe3::ProtobufE3Encoder.