|
libe3 0.6.1
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 | |
| Move constructor. | |
| E3Connector & | operator= (E3Connector &&)=default |
| Move assignment. | |
| virtual ErrorCode | send_to (uint64_t peer_token, const std::vector< uint8_t > &data, PduClass kind) |
| Send data to one peer, or to all of them (RAN role). | |
| virtual uint64_t | last_peer_token () const |
| Which peer supplied the bytes the last receive() returned (RAN role). | |
| virtual uint64_t | last_setup_peer_token () const |
| Which peer sent the setup request the last recv_setup_request() returned (RAN role). | |
| virtual std::vector< uint64_t > | take_closed_peers () |
| Peers whose connection has closed since the last call (RAN role). | |
| 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_ |
| Endpoint of the setup channel. | |
| std::string | inbound_endpoint_ |
| Endpoint of the inbound channel. | |
| std::string | outbound_endpoint_ |
| Endpoint of the outbound channel. | |
| E3Role | role_ {E3Role::RAN} |
| Role of this peer. | |
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 45 of file zmq_connector.cpp.
|
override |
Definition at line 81 of file zmq_connector.cpp.
|
overridevirtual |
Clean up and release all resources.
Implements libe3::E3Connector.
Definition at line 509 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 232 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 158 of file zmq_connector.cpp.
|
overridevirtual |
Receive a SetupResponse on the setup channel (dApp role).
Reimplemented from libe3::E3Connector.
Definition at line 390 of file zmq_connector.cpp.
|
overridevirtual |
Send data on the outbound channel.
| data | Data to send |
Implements libe3::E3Connector.
Definition at line 286 of file zmq_connector.cpp.
|
overridevirtual |
Send a setup response.
| data | Response data to send |
Implements libe3::E3Connector.
Definition at line 180 of file zmq_connector.cpp.
|
overridevirtual |
Send a SetupRequest on the setup channel (dApp role).
Reimplemented from libe3::E3Connector.
Definition at line 376 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 196 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 445 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 85 of file zmq_connector.cpp.
|
overridevirtual |
Connect the setup channel (dApp role: REQ connect).
Reimplemented from libe3::E3Connector.
Definition at line 329 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 260 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 480 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 571 of file zmq_connector.cpp.
|
inlineoverridevirtualnoexcept |
Get the transport layer type.
Implements libe3::E3Connector.
Definition at line 61 of file zmq_connector.hpp.