QuISP
|
#include <ConnectionManager.cc>
Public Member Functions | |
ConnectionManager () | |
~ConnectionManager () | |
![]() | |
virtual | ~IConnectionManager () |
![]() | |
LoggerBase () | |
~LoggerBase () | |
void | initializeLogger (utils::ComponentProvider &provider) |
Public Attributes | |
utils::ComponentProvider | provider |
Protected Member Functions | |
void | initialize () override |
void | handleMessage (cMessage *msg) override |
void | respondToRequest (messages::ConnectionSetupRequest *pk) |
void | respondToRequest_deprecated (messages::ConnectionSetupRequest *pk) |
void | tryRelayRequestToNextHop (messages::ConnectionSetupRequest *pk) |
void | queueApplicationRequest (messages::ConnectionSetupRequest *pk) |
void | initiateApplicationRequest (int qnic_address) |
void | scheduleRequestRetry (int qnic_address) |
void | popApplicationRequest (int qnic_address) |
void | storeRuleSetForApplication (messages::ConnectionSetupResponse *pk) |
void | storeRuleSet (messages::ConnectionSetupResponse *pk) |
void | initiator_reject_req_handler (messages::RejectConnectionSetupRequest *pk) |
void | responder_reject_req_handler (messages::RejectConnectionSetupRequest *pk) |
void | intermediate_reject_req_handler (messages::RejectConnectionSetupRequest *pk) |
void | rejectRequest (messages::ConnectionSetupRequest *req) |
void | reserveQnic (int qnic_address) |
void | releaseQnic (int qnic_address) |
bool | isQnicBusy (int qnic_address) |
unsigned long | createUniqueId () override |
Static Protected Member Functions | |
static rules::PurType | parsePurType (const std::string &pur_type) |
Protected Attributes | |
int | my_address |
int | num_of_qnics |
std::map< int, std::queue< messages::ConnectionSetupRequest * > > | connection_setup_buffer |
std::map< int, int > | connection_retry_count |
std::vector< int > | reserved_qnics = {} |
std::vector< cMessage * > | request_send_timing |
bool | simultaneous_es_enabled |
bool | es_with_purify = false |
int | num_remote_purification |
double | threshold_fidelity |
rules::PurType | purification_type |
IRoutingDaemon * | routing_daemon |
IHardwareMonitor * | hardware_monitor |
![]() | |
ILogger * | logger = nullptr |
The ConnectionManager is one of the five key modules in the software for a quantum repeater/router (qrsa). It is responsible for managing the connections: initiating ConnectionSetupRequests, behaving as responder for a ConnectionSetupRequest (which involves actually creating the RuleSets), and handling the requests and responses as the move along the path at setup time.
It communicates with the RuleEngine, which is responsible for actually executing the Rules as it is notified of events, but the ConnectionManager has nothing to do with the actual processing of the quantum states as they evolve.
You will see member functions for the roles as initiator, responder, and intermediate node. The main tasks are to respond to ConnectionSetupRequest, ConnectionSetupResponse, RejectConnectionSetupRequest, and ConnectionTeardown messages.
It is also responsible for the end-to-end reservation of resources, as dictated by the multiplexing (muxing) discipline in use.
quisp::modules::ConnectionManager::ConnectionManager | ( | ) |
quisp::modules::ConnectionManager::~ConnectionManager | ( | ) |
|
overrideprotectedvirtual |
Implements quisp::modules::IConnectionManager.
|
overrideprotected |
The catch-all handler for messages received. Needs to confirm the packet type and call the appropriate lower-level handler.
msg | pointer to the cMessage itself |
|
overrideprotected |
|
protected |
|
protected |
|
protected |
This function is called during the handling of ConnectionSetupRequest at an intermediate node (not the initator or responder).
pk | pointer to the ConnectionSetupRequest packet itself |
|
protected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
This function is called during the handling of ConnectionSetupRequest at the responder.
pk | pointer to the ConnectionSetupRequest packet itself |
|
protected |
This function is called to handle the ConnectionSetupRequest at the responder. This is where much of the work happens, and there is the potential for new value if you have a better way to do this.
pk | pointer to the ConnectionSetupRequest packet itself |
The procedure:
* 1. check the qnic is busy or not * 2. generate all the RuleSets by calling RuleSetGenerator * 3. reserve the qnic for the connection * 4. return ConnectionSetupResponse to each node in this connection. *
|
protected |
|
protected |
|
protected |
This function is called to handle the ConnectionSetupResponse at the intermediate node. The only job here is to unpack the RuleSets, feed them to the RuleEngine via Router, and start the connection running. Probably should also let the Application know that the setup is complete and running.
pk | the received ConnectionSetupResponse. |
|
protected |
This method is called to handle the ConnectionSetupResponse at an end node. The only job here is to unpack the RuleSets, feed them to the RuleEngine via Router, and start the connection running.
pk | the received ConnectionSetupResponse. |
|
protected |
This method is called to handle the ConnectionSetupRequest at an intermediate. This method reserves requested qnics and then send the request to next hop. If the QNIC cannot be reserved the ConnectionSetupRequest will be rejected.
req | pointer to the ConnectionSetupRequest packet itself |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
utils::ComponentProvider quisp::modules::ConnectionManager::provider |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |