Minimal quantum net device that bridges a QChannel and a QNetworker.
More...
#include <q2ns-qnet-device.h>
|
| static ns3::TypeId | GetTypeId (void) |
| | Get the ns-3 TypeId.
|
| |
Minimal quantum net device that bridges a QChannel and a QNetworker.
QNetDevice is an internal plumbing component used by QNode and QNetworker. It is intentionally small: it forwards outgoing qubits to an attached QChannel and forwards incoming qubits from that channel to the bound QNetworker.
The inherited ns-3 NetDevice interface is implemented only to the extent needed for integration with ns-3 nodes and channels.
- See also
- QChannel
-
QNetworker
Definition at line 49 of file q2ns-qnet-device.h.
◆ QNetDevice()
| q2ns::QNetDevice::QNetDevice |
( |
| ) |
|
|
default |
◆ AddLinkChangeCallback()
| void q2ns::QNetDevice::AddLinkChangeCallback |
( |
ns3::Callback< void > |
| ) |
|
|
inlineoverride |
◆ AttachChannel()
| void q2ns::QNetDevice::AttachChannel |
( |
ns3::Ptr< QChannel > |
ch | ) |
|
◆ BindNetworker()
| void q2ns::QNetDevice::BindNetworker |
( |
QNetworker & |
networker | ) |
|
◆ GetAddress()
| ns3::Address q2ns::QNetDevice::GetAddress |
( |
| ) |
const |
|
inlineoverride |
◆ GetBroadcast()
| ns3::Address q2ns::QNetDevice::GetBroadcast |
( |
| ) |
const |
|
inlineoverride |
◆ GetChannel()
| ns3::Ptr< ns3::Channel > q2ns::QNetDevice::GetChannel |
( |
| ) |
const |
|
override |
Return the attached channel.
- Returns
- Attached channel as an ns-3 Channel pointer, or nullptr if none is attached.
Definition at line 72 of file q2ns-qnet-device.cc.
References channel_.
◆ GetIfIndex()
| std::uint32_t q2ns::QNetDevice::GetIfIndex |
( |
| ) |
const |
|
override |
Get the interface index assigned by the owning node.
- Returns
- Interface index.
Definition at line 96 of file q2ns-qnet-device.cc.
References ifIndex_.
◆ GetMtu()
| std::uint16_t q2ns::QNetDevice::GetMtu |
( |
| ) |
const |
|
inlineoverride |
◆ GetMulticast() [1/2]
| ns3::Address q2ns::QNetDevice::GetMulticast |
( |
ns3::Ipv4Address |
| ) |
const |
|
inlineoverride |
◆ GetMulticast() [2/2]
| ns3::Address q2ns::QNetDevice::GetMulticast |
( |
ns3::Ipv6Address |
| ) |
const |
|
inlineoverride |
◆ GetNode()
| ns3::Ptr< ns3::Node > q2ns::QNetDevice::GetNode |
( |
| ) |
const |
|
override |
◆ GetTypeId()
| ns3::TypeId q2ns::QNetDevice::GetTypeId |
( |
void |
| ) |
|
|
static |
◆ IsBridge()
| bool q2ns::QNetDevice::IsBridge |
( |
| ) |
const |
|
inlineoverride |
◆ IsBroadcast()
| bool q2ns::QNetDevice::IsBroadcast |
( |
| ) |
const |
|
inlineoverride |
◆ IsLinkUp()
| bool q2ns::QNetDevice::IsLinkUp |
( |
| ) |
const |
|
inlineoverride |
◆ IsMulticast()
| bool q2ns::QNetDevice::IsMulticast |
( |
| ) |
const |
|
inlineoverride |
◆ IsPointToPoint()
| bool q2ns::QNetDevice::IsPointToPoint |
( |
| ) |
const |
|
inlineoverride |
◆ NeedsArp()
| bool q2ns::QNetDevice::NeedsArp |
( |
| ) |
const |
|
inlineoverride |
◆ ReceiveFromChannel()
| void q2ns::QNetDevice::ReceiveFromChannel |
( |
std::shared_ptr< Qubit > |
q, |
|
|
const QMapInstance & |
map = {} |
|
) |
| |
|
private |
◆ Send() [1/2]
| bool q2ns::QNetDevice::Send |
( |
ns3::Ptr< ns3::Packet > |
, |
|
|
const ns3::Address & |
, |
|
|
std::uint16_t |
|
|
) |
| |
|
inlineoverride |
◆ Send() [2/2]
| bool q2ns::QNetDevice::Send |
( |
std::shared_ptr< Qubit > |
q | ) |
|
Send a qubit through the attached channel.
This method forwards the transmission request to the attached channel. It does not perform routing.
- Parameters
-
- Returns
- True if the attached channel accepted the transmission request, false otherwise.
- See also
- QChannel::SendFrom
Definition at line 55 of file q2ns-qnet-device.cc.
References channel_.
◆ SendFrom()
| bool q2ns::QNetDevice::SendFrom |
( |
ns3::Ptr< ns3::Packet > |
, |
|
|
const ns3::Address & |
, |
|
|
const ns3::Address & |
, |
|
|
std::uint16_t |
|
|
) |
| |
|
inlineoverride |
◆ SetAddress()
| void q2ns::QNetDevice::SetAddress |
( |
ns3::Address |
| ) |
|
|
inlineoverride |
◆ SetIfIndex()
| void q2ns::QNetDevice::SetIfIndex |
( |
std::uint32_t |
i | ) |
|
|
override |
◆ SetMtu()
| bool q2ns::QNetDevice::SetMtu |
( |
std::uint16_t |
| ) |
|
|
inlineoverride |
◆ SetNode()
| void q2ns::QNetDevice::SetNode |
( |
ns3::Ptr< ns3::Node > |
node | ) |
|
|
override |
◆ SetPromiscReceiveCallback()
| void q2ns::QNetDevice::SetPromiscReceiveCallback |
( |
PromiscReceiveCallback |
| ) |
|
|
inlineoverride |
◆ SetReceiveCallback()
| void q2ns::QNetDevice::SetReceiveCallback |
( |
ReceiveCallback |
| ) |
|
|
inlineoverride |
◆ SupportsSendFrom()
| bool q2ns::QNetDevice::SupportsSendFrom |
( |
| ) |
const |
|
inlineoverride |
◆ channel_
| ns3::Ptr<QChannel> q2ns::QNetDevice::channel_ |
|
private |
◆ ifIndex_
| std::uint32_t q2ns::QNetDevice::ifIndex_ = 0 |
|
private |
◆ networker_
| QNetworker* q2ns::QNetDevice::networker_ = nullptr |
|
private |
◆ node_
| ns3::Ptr<ns3::Node> q2ns::QNetDevice::node_ |
|
private |
◆ QChannel
| friend q2ns::QNetDevice::QChannel |
|
private |
The documentation for this class was generated from the following files: