![]() |
Q2NS dev
ns-3 module
|
#include <q2ns-teleportation-app.h>
Public Member Functions | |
| TeleportationApp () | |
| ~TeleportationApp () override=default | |
| void | StartApplication () override |
| void | StopApplication () override |
| void | SetNetController (NetController *nc) |
| void | SetTeleportState (const std::shared_ptr< QState > &state) |
Static Public Member Functions | |
| static ns3::TypeId | GetTypeId () |
Public Attributes | |
| ns3::TracedCallback< uint64_t, ns3::Time > | m_traceSourceStart |
| ns3::TracedCallback< uint64_t, ns3::Time > | m_traceSourceBellDone |
| ns3::TracedCallback< uint64_t, ns3::Time > | m_traceSourceCtrlSent |
| ns3::TracedCallback< uint64_t, ns3::Time > | m_traceSinkStart |
| ns3::TracedCallback< uint64_t, ns3::Time > | m_traceSinkQArrive |
| ns3::TracedCallback< uint64_t, ns3::Time > | m_traceSinkCtrlArrive |
| ns3::TracedCallback< uint64_t, ns3::Time > | m_traceSinkCorrection |
Private Member Functions | |
| void | DoSourceStart () |
| void | DoSinkStart () |
| void | OnTcpConnectSuccess (ns3::Ptr< ns3::Socket > s) |
| void | OnTcpConnectFail (ns3::Ptr< ns3::Socket > s) |
| void | QubitArrivalHandler (std::shared_ptr< Qubit > q) |
| void | OnCtrlRx (ns3::Ptr< const ns3::Packet > pkt, const ns3::Address &from) |
| void | SendCtrlBits (uint8_t m1, uint8_t m2) |
| void | TryApplyCorrection () |
Private Attributes | |
| std::string | m_role |
| ns3::Ptr< q2ns::QNode > | m_peerQNode |
| std::shared_ptr< QState > | m_teleportState |
| ns3::Ipv4Address | m_peer |
| uint16_t | m_ctrlPort {7000} |
| std::string | m_ctrlProto |
| std::string | m_backend |
| std::string | m_targetQubitTag |
| uint64_t | m_sessionId {0} |
| ns3::Time | m_sessionStart {ns3::Seconds(0.0)} |
| q2ns::NetController * | m_nc {nullptr} |
| ns3::Ptr< ns3::Packet > | m_pendingCtrlPkt |
| ns3::Ptr< ns3::PacketSink > | m_ctrlSink |
| ns3::Ptr< ns3::Application > | m_ctrlSender |
| bool | m_haveCtrl {false} |
| bool | m_haveQ {false} |
| uint8_t | m_m1 {0} |
| uint8_t | m_m2 {0} |
Definition at line 40 of file q2ns-teleportation-app.h.
|
default |
|
overridedefault |
|
private |
Definition at line 222 of file q2ns-teleportation-app.cc.
References m_ctrlPort, m_ctrlProto, m_ctrlSink, m_sessionId, m_traceSinkStart, OnCtrlRx(), and QubitArrivalHandler().
Referenced by StartApplication().
|
private |
Definition at line 182 of file q2ns-teleportation-app.cc.
References m1, m2, m_peerQNode, m_sessionId, m_targetQubitTag, m_teleportState, m_traceSourceBellDone, m_traceSourceStart, and SendCtrlBits().
Referenced by StartApplication().
|
static |
Definition at line 52 of file q2ns-teleportation-app.cc.
References m_backend, m_ctrlPort, m_ctrlProto, m_peer, m_peerQNode, m_role, m_sessionId, m_sessionStart, m_targetQubitTag, m_traceSinkCorrection, m_traceSinkCtrlArrive, m_traceSinkQArrive, m_traceSinkStart, m_traceSourceBellDone, m_traceSourceCtrlSent, and m_traceSourceStart.
|
private |
Definition at line 316 of file q2ns-teleportation-app.cc.
References m_haveCtrl, m_m1, m_m2, m_sessionId, m_traceSinkCtrlArrive, and TryApplyCorrection().
Referenced by DoSinkStart().
|
private |
Definition at line 258 of file q2ns-teleportation-app.cc.
Referenced by SendCtrlBits().
|
private |
Definition at line 250 of file q2ns-teleportation-app.cc.
References m_pendingCtrlPkt.
Referenced by SendCtrlBits().
|
private |
Definition at line 306 of file q2ns-teleportation-app.cc.
References m_haveQ, m_sessionId, m_traceSinkQArrive, and TryApplyCorrection().
Referenced by DoSinkStart().
|
private |
Definition at line 264 of file q2ns-teleportation-app.cc.
References m1, m2, m_ctrlPort, m_ctrlProto, m_peer, m_pendingCtrlPkt, m_sessionId, m_traceSourceCtrlSent, OnTcpConnectFail(), and OnTcpConnectSuccess().
Referenced by DoSourceStart().
| void q2ns::TeleportationApp::SetNetController | ( | NetController * | nc | ) |
Definition at line 136 of file q2ns-teleportation-app.cc.
References m_nc.
| void q2ns::TeleportationApp::SetTeleportState | ( | const std::shared_ptr< QState > & | state | ) |
Definition at line 140 of file q2ns-teleportation-app.cc.
References m_teleportState.
|
override |
Definition at line 147 of file q2ns-teleportation-app.cc.
References DoSinkStart(), DoSourceStart(), m_role, m_sessionId, m_sessionStart, and m_targetQubitTag.
|
override |
Definition at line 173 of file q2ns-teleportation-app.cc.
References m_ctrlSender, and m_ctrlSink.
|
private |
Definition at line 338 of file q2ns-teleportation-app.cc.
References m_haveCtrl, m_haveQ, m_m1, m_m2, m_sessionId, m_targetQubitTag, m_traceSinkCorrection, q2ns::gates::X(), and q2ns::gates::Z().
Referenced by OnCtrlRx(), and QubitArrivalHandler().
|
private |
Definition at line 76 of file q2ns-teleportation-app.h.
Referenced by GetTypeId().
|
private |
Definition at line 74 of file q2ns-teleportation-app.h.
Referenced by DoSinkStart(), GetTypeId(), and SendCtrlBits().
|
private |
Definition at line 75 of file q2ns-teleportation-app.h.
Referenced by DoSinkStart(), GetTypeId(), and SendCtrlBits().
|
private |
Definition at line 84 of file q2ns-teleportation-app.h.
Referenced by StopApplication().
|
private |
Definition at line 83 of file q2ns-teleportation-app.h.
Referenced by DoSinkStart(), and StopApplication().
|
private |
Definition at line 99 of file q2ns-teleportation-app.h.
Referenced by OnCtrlRx(), and TryApplyCorrection().
|
private |
Definition at line 100 of file q2ns-teleportation-app.h.
Referenced by QubitArrivalHandler(), and TryApplyCorrection().
|
private |
Definition at line 101 of file q2ns-teleportation-app.h.
Referenced by OnCtrlRx(), and TryApplyCorrection().
|
private |
Definition at line 101 of file q2ns-teleportation-app.h.
Referenced by OnCtrlRx(), and TryApplyCorrection().
|
private |
Definition at line 81 of file q2ns-teleportation-app.h.
Referenced by SetNetController().
|
private |
Definition at line 73 of file q2ns-teleportation-app.h.
Referenced by GetTypeId(), and SendCtrlBits().
|
private |
Definition at line 71 of file q2ns-teleportation-app.h.
Referenced by DoSourceStart(), and GetTypeId().
|
private |
Definition at line 82 of file q2ns-teleportation-app.h.
Referenced by OnTcpConnectSuccess(), and SendCtrlBits().
|
private |
Definition at line 70 of file q2ns-teleportation-app.h.
Referenced by GetTypeId(), and StartApplication().
|
private |
Definition at line 78 of file q2ns-teleportation-app.h.
Referenced by DoSinkStart(), DoSourceStart(), GetTypeId(), OnCtrlRx(), QubitArrivalHandler(), SendCtrlBits(), StartApplication(), and TryApplyCorrection().
|
private |
Definition at line 79 of file q2ns-teleportation-app.h.
Referenced by GetTypeId(), and StartApplication().
|
private |
Definition at line 77 of file q2ns-teleportation-app.h.
Referenced by DoSourceStart(), GetTypeId(), StartApplication(), and TryApplyCorrection().
|
private |
Definition at line 72 of file q2ns-teleportation-app.h.
Referenced by DoSourceStart(), and SetTeleportState().
| ns3::TracedCallback<uint64_t, ns3::Time> q2ns::TeleportationApp::m_traceSinkCorrection |
Definition at line 67 of file q2ns-teleportation-app.h.
Referenced by GetTypeId(), and TryApplyCorrection().
| ns3::TracedCallback<uint64_t, ns3::Time> q2ns::TeleportationApp::m_traceSinkCtrlArrive |
Definition at line 66 of file q2ns-teleportation-app.h.
Referenced by GetTypeId(), and OnCtrlRx().
| ns3::TracedCallback<uint64_t, ns3::Time> q2ns::TeleportationApp::m_traceSinkQArrive |
Definition at line 65 of file q2ns-teleportation-app.h.
Referenced by GetTypeId(), and QubitArrivalHandler().
| ns3::TracedCallback<uint64_t, ns3::Time> q2ns::TeleportationApp::m_traceSinkStart |
Definition at line 64 of file q2ns-teleportation-app.h.
Referenced by DoSinkStart(), and GetTypeId().
| ns3::TracedCallback<uint64_t, ns3::Time> q2ns::TeleportationApp::m_traceSourceBellDone |
Definition at line 60 of file q2ns-teleportation-app.h.
Referenced by DoSourceStart(), and GetTypeId().
| ns3::TracedCallback<uint64_t, ns3::Time> q2ns::TeleportationApp::m_traceSourceCtrlSent |
Definition at line 61 of file q2ns-teleportation-app.h.
Referenced by GetTypeId(), and SendCtrlBits().
| ns3::TracedCallback<uint64_t, ns3::Time> q2ns::TeleportationApp::m_traceSourceStart |
Definition at line 59 of file q2ns-teleportation-app.h.
Referenced by DoSourceStart(), and GetTypeId().