|
libe3 0.2.5
C++ library for E3AP RAN vendor integration
|
ZeroMQ-based E3 connector. More...
#include <zmq_connector.hpp>
Public Member Functions | |
| ZmqE3Connector (E3TransportLayer transport_layer, const std::string &setup_endpoint, const std::string &inbound_endpoint, const std::string &outbound_endpoint, uint16_t setup_port, uint16_t inbound_port, uint16_t outbound_port, size_t io_threads) | |
| ~ZmqE3Connector () override | |
| ErrorCode | setup_initial_connection () override |
| Set up the initial connection (setup channel). | |
| int | recv_setup_request (std::vector< uint8_t > &buffer) override |
| Receive a setup request. | |
| ErrorCode | send_response (const std::vector< uint8_t > &data) override |
| Send a setup response. | |
| ErrorCode | setup_inbound_connection () override |
| Set up the inbound connection (SUB channel). | |
| int | receive (std::vector< uint8_t > &buffer) override |
| Receive data from the inbound channel. | |
| ErrorCode | setup_outbound_connection () override |
| Set up the outbound connection (PUB channel). | |
| ErrorCode | send (const std::vector< uint8_t > &data) override |
| Send data on the outbound channel. | |
| ErrorCode | setup_initial_connection_client () override |
| Connect the setup channel (dApp role: REQ connect). | |
| ErrorCode | send_setup_request_client (const std::vector< uint8_t > &data) override |
| Send a SetupRequest on the setup channel (dApp role). | |
| int | recv_setup_response_client (std::vector< uint8_t > &buffer) override |
| Receive a SetupResponse on the setup channel (dApp role). | |
| ErrorCode | setup_inbound_connection_client () override |
| Connect the inbound channel (dApp role: SUB connect to the RAN's publisher endpoint). | |
| ErrorCode | setup_outbound_connection_client () override |
| Connect the outbound channel (dApp role: PUB connect to the RAN's subscriber endpoint). | |
| void | dispose () override |
| Clean up and release all resources. | |
| void | shutdown () override |
| Interrupt blocking operations for shutdown. | |
| E3LinkLayer | link_layer () const noexcept override |
| Get the link layer type. | |
| E3TransportLayer | transport_layer () const noexcept override |
| Get the transport layer type. | |
| bool | is_connected () const noexcept override |
| Check if connector is connected. | |
| Public Member Functions inherited from libe3::E3Connector | |
| virtual | ~E3Connector ()=default |
| E3Connector (const E3Connector &)=delete | |
| E3Connector & | operator= (const E3Connector &)=delete |
| E3Connector (E3Connector &&)=default | |
| E3Connector & | operator= (E3Connector &&)=default |
| void | set_role (E3Role role) noexcept |
| Set role (RAN or DAPP). Affects bind vs connect direction and cleanup behaviour. Must be set before any setup_* call. Default RAN. | |
| E3Role | role () const noexcept |
| Get current role. | |
| const std::string & | setup_endpoint () const noexcept |
| Get setup endpoint. | |
| const std::string & | inbound_endpoint () const noexcept |
| Get inbound endpoint. | |
| const std::string & | outbound_endpoint () const noexcept |
| Get outbound endpoint. | |
Additional Inherited Members | |
| Protected Member Functions inherited from libe3::E3Connector | |
| E3Connector ()=default | |
| Protected Attributes inherited from libe3::E3Connector | |
| std::string | setup_endpoint_ |
| std::string | inbound_endpoint_ |
| std::string | outbound_endpoint_ |
| E3Role | role_ {E3Role::RAN} |
ZeroMQ-based E3 connector.
Provides transport using ZeroMQ sockets. Supports TCP and IPC transports. Ported from the original C implementation's zeromq_* functions.
Definition at line 24 of file zmq_connector.hpp.
| libe3::ZmqE3Connector::ZmqE3Connector | ( | E3TransportLayer | transport_layer, |
| const std::string & | setup_endpoint, | ||
| const std::string & | inbound_endpoint, | ||
| const std::string & | outbound_endpoint, | ||
| uint16_t | setup_port, | ||
| uint16_t | inbound_port, | ||
| uint16_t | outbound_port, | ||
| size_t | io_threads ) |
Definition at line 42 of file zmq_connector.cpp.
|
override |
Definition at line 78 of file zmq_connector.cpp.
|
overridevirtual |
Clean up and release all resources.
Implements libe3::E3Connector.
Definition at line 436 of file zmq_connector.cpp.
|
inlineoverridevirtualnoexcept |
Check if connector is connected.
Implements libe3::E3Connector.
Definition at line 65 of file zmq_connector.hpp.
|
inlineoverridevirtualnoexcept |
Get the link layer type.
Implements libe3::E3Connector.
Definition at line 57 of file zmq_connector.hpp.
|
overridevirtual |
Receive data from the inbound channel.
| buffer | Buffer to store received data |
Implements libe3::E3Connector.
Definition at line 229 of file zmq_connector.cpp.
|
overridevirtual |
Receive a setup request.
Blocks until a setup request is received on the setup channel.
| buffer | Buffer to store received data |
Implements libe3::E3Connector.
Definition at line 155 of file zmq_connector.cpp.
|
overridevirtual |
Receive a SetupResponse on the setup channel (dApp role).
Reimplemented from libe3::E3Connector.
Definition at line 366 of file zmq_connector.cpp.
|
overridevirtual |
Send data on the outbound channel.
| data | Data to send |
Implements libe3::E3Connector.
Definition at line 276 of file zmq_connector.cpp.
|
overridevirtual |
Send a setup response.
| data | Response data to send |
Implements libe3::E3Connector.
Definition at line 177 of file zmq_connector.cpp.
|
overridevirtual |
Send a SetupRequest on the setup channel (dApp role).
Reimplemented from libe3::E3Connector.
Definition at line 355 of file zmq_connector.cpp.
|
overridevirtual |
Set up the inbound connection (SUB channel).
This establishes the channel for receiving control actions from dApps.
Implements libe3::E3Connector.
Definition at line 193 of file zmq_connector.cpp.
|
overridevirtual |
Connect the inbound channel (dApp role: SUB connect to the RAN's publisher endpoint).
Reimplemented from libe3::E3Connector.
Definition at line 380 of file zmq_connector.cpp.
|
overridevirtual |
Set up the initial connection (setup channel).
This establishes the REQ/REP channel used for E3 Setup procedures.
Implements libe3::E3Connector.
Definition at line 82 of file zmq_connector.cpp.
|
overridevirtual |
Connect the setup channel (dApp role: REQ connect).
Reimplemented from libe3::E3Connector.
Definition at line 319 of file zmq_connector.cpp.
|
overridevirtual |
Set up the outbound connection (PUB channel).
This establishes the channel for sending indications to dApps.
Implements libe3::E3Connector.
Definition at line 250 of file zmq_connector.cpp.
|
overridevirtual |
Connect the outbound channel (dApp role: PUB connect to the RAN's subscriber endpoint).
Reimplemented from libe3::E3Connector.
Definition at line 407 of file zmq_connector.cpp.
|
overridevirtual |
Interrupt blocking operations for shutdown.
Called before joining threads to unblock any blocking socket operations. Default implementation does nothing (for connectors that use timeouts).
Reimplemented from libe3::E3Connector.
Definition at line 493 of file zmq_connector.cpp.
|
inlineoverridevirtualnoexcept |
Get the transport layer type.
Implements libe3::E3Connector.
Definition at line 61 of file zmq_connector.hpp.