SatNetDevice to be utilized in the UT and GW nodes. More...
#include "satellite-net-device.h"
Public Member Functions | |
SatNetDevice () | |
Default constructor. More... | |
virtual void | AddLinkChangeCallback (Callback< void > callback) |
virtual Address | GetAddress (void) const |
virtual Address | GetBroadcast (void) const |
virtual Ptr< Channel > | GetChannel (void) const |
virtual uint32_t | GetIfIndex (void) const |
Ptr< SatLlc > | GetLlc (void) const |
Get Llc pointer. More... | |
Ptr< SatMac > | GetMac (void) const |
Get a Mac pointer. More... | |
virtual uint16_t | GetMtu (void) const |
virtual Address | GetMulticast (Ipv4Address multicastGroup) const |
virtual Address | GetMulticast (Ipv6Address addr) const |
virtual Ptr< Node > | GetNode (void) const |
Ptr< SatPacketClassifier > | GetPacketClassifier () const |
Get a pointer to packet classifier class. More... | |
Ptr< SatPhy > | GetPhy (void) const |
Get a Phy pointer. More... | |
virtual bool | IsBridge (void) const |
virtual bool | IsBroadcast (void) const |
virtual bool | IsLinkUp (void) const |
virtual bool | IsMulticast (void) const |
virtual bool | IsPointToPoint (void) const |
virtual bool | NeedsArp (void) const |
virtual void | Receive (Ptr< const Packet > packet) |
virtual bool | Send (Ptr< Packet > packet, const Address &dest, uint16_t protocolNumber) |
bool | SendControlMsg (Ptr< SatControlMessage > msg, const Address &dest) |
virtual bool | SendFrom (Ptr< Packet > packet, const Address &source, const Address &dest, uint16_t protocolNumber) |
virtual void | SetAddress (Address address) |
virtual void | SetIfIndex (const uint32_t index) |
void | SetLlc (Ptr< SatLlc > llc) |
Attach the SatLlc llc layer to this netdevice. More... | |
void | SetMac (Ptr< SatMac > mac) |
virtual bool | SetMtu (const uint16_t mtu) |
virtual void | SetNode (Ptr< Node > node) |
void | SetNodeInfo (Ptr< SatNodeInfo > nodeInfo) |
Set the node info. More... | |
void | SetPacketClassifier (Ptr< SatPacketClassifier > classifier) |
Set the packet classifier class. More... | |
void | SetPhy (Ptr< SatPhy > phy) |
virtual void | SetPromiscReceiveCallback (PromiscReceiveCallback cb) |
virtual void | SetReceiveCallback (NetDevice::ReceiveCallback cb) |
void | SetReceiveErrorModel (Ptr< ErrorModel > em) |
Attach a receive ErrorModel to the SatNetDevice. More... | |
virtual bool | SupportsSendFrom (void) const |
void | ToggleState (bool enabled) |
Toggle the state of the device. More... | |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
Protected Member Functions | |
virtual void | DoDispose (void) |
Dispose of this class instance. More... | |
Protected Attributes | |
Mac48Address | m_address |
Ptr< SatPacketClassifier > | m_classifier |
uint32_t | m_ifIndex |
bool | m_isStatisticsTagsEnabled |
EnableStatisticsTags attribute. More... | |
Time | m_lastDelay |
Last delay measurement. More... | |
Time | m_lastLinkDelay |
Last link delay measurement. More... | |
Ptr< SatLlc > | m_llc |
Ptr< SatMac > | m_mac |
uint16_t | m_mtu |
Ptr< Node > | m_node |
Ptr< SatNodeInfo > | m_nodeInfo |
TracedCallback< Time, SatEnums::SatPacketEvent_t, SatEnums::SatNodeType_t, uint32_t, Mac48Address, SatEnums::SatLogLevel_t, SatEnums::SatLinkDir_t, std::string > | m_packetTrace |
Ptr< SatPhy > | m_phy |
NetDevice::PromiscReceiveCallback | m_promiscCallback |
Ptr< ErrorModel > | m_receiveErrorModel |
NetDevice::ReceiveCallback | m_rxCallback |
TracedCallback< const Time &, const Address & > | m_rxDelayTrace |
Traced callback for all received packets, including delay information and the address of the senders. More... | |
TracedCallback< const Time &, const Address & > | m_rxJitterTrace |
Traced callback for all received packets, including jitter information and the address of the senders. More... | |
TracedCallback< const Time &, const Address & > | m_rxLinkDelayTrace |
Traced callback for all received packets, including link delay information and the address of the senders. More... | |
TracedCallback< const Time &, const Address & > | m_rxLinkJitterTrace |
Traced callback for all received packets, including link jitter information and the address of the senders. More... | |
TracedCallback< Ptr< const Packet >, const Address & > | m_rxTrace |
Traced callback for all received packets, including the address of the senders. More... | |
TracedCallback< Ptr< const Packet >, const Address & > | m_signallingTxTrace |
Traced callback for all signalling (control message) packets sent, including the destination address. More... | |
TracedCallback< Ptr< const Packet > > | m_txTrace |
Traced callback for all packets received to be transmitted. More... | |
SatNetDevice to be utilized in the UT and GW nodes.
Definition at line 51 of file satellite-net-device.h.
ns3::SatNetDevice::SatNetDevice | ( | ) |
Default constructor.
Definition at line 123 of file satellite-net-device.cc.
|
virtual |
Definition at line 355 of file satellite-net-device.cc.
|
protectedvirtual |
Dispose of this class instance.
Reimplemented in ns3::SatLorawanNetDevice.
Definition at line 565 of file satellite-net-device.cc.
References m_classifier, m_llc, m_mac, m_node, m_phy, m_promiscCallback, m_receiveErrorModel, and m_rxCallback.
Referenced by ns3::SatLorawanNetDevice::DoDispose().
|
virtual |
Definition at line 323 of file satellite-net-device.cc.
References m_address.
|
virtual |
Definition at line 368 of file satellite-net-device.cc.
|
virtual |
We cannot do anything here, since the SatNetDevice does not hold directly any channels, but they are attached to Phy layers.
Definition at line 600 of file satellite-net-device.cc.
|
virtual |
Definition at line 274 of file satellite-net-device.cc.
References m_ifIndex.
Ptr< SatLlc > ns3::SatNetDevice::GetLlc | ( | void | ) | const |
Get Llc pointer.
Definition at line 295 of file satellite-net-device.cc.
References m_llc.
Referenced by GetTypeId().
Ptr< SatMac > ns3::SatNetDevice::GetMac | ( | void | ) | const |
Get a Mac pointer.
Definition at line 288 of file satellite-net-device.cc.
References m_mac.
Referenced by ns3::SatHelper::DoCreateScenario(), ns3::LoraNetworkStatus::GetBestGatewayForDevice(), GetTypeId(), ns3::LoraForwarderHelper::InstallPrivGwDvb(), and ns3::LoraForwarderHelper::InstallPrivGwLora().
|
virtual |
Definition at line 341 of file satellite-net-device.cc.
References m_mtu.
|
virtual |
Definition at line 382 of file satellite-net-device.cc.
|
virtual |
Definition at line 389 of file satellite-net-device.cc.
|
virtual |
Definition at line 537 of file satellite-net-device.cc.
References m_node.
Ptr< SatPacketClassifier > ns3::SatNetDevice::GetPacketClassifier | ( | ) | const |
Get a pointer to packet classifier class.
Definition at line 309 of file satellite-net-device.cc.
References m_classifier.
Ptr< SatPhy > ns3::SatNetDevice::GetPhy | ( | void | ) | const |
Get a Phy pointer.
Definition at line 281 of file satellite-net-device.cc.
References m_phy.
Referenced by GetTypeId().
|
static |
Get the type ID.
Definition at line 51 of file satellite-net-device.cc.
References GetLlc(), GetMac(), GetPhy(), m_isStatisticsTagsEnabled, m_mtu, m_packetTrace, m_receiveErrorModel, m_rxDelayTrace, m_rxJitterTrace, m_rxLinkDelayTrace, m_rxLinkJitterTrace, m_rxTrace, m_signallingTxTrace, m_txTrace, SetLlc(), SetMac(), and SetPhy().
|
virtual |
Definition at line 403 of file satellite-net-device.cc.
|
virtual |
Definition at line 361 of file satellite-net-device.cc.
|
virtual |
Definition at line 348 of file satellite-net-device.cc.
|
virtual |
Definition at line 375 of file satellite-net-device.cc.
|
virtual |
Definition at line 396 of file satellite-net-device.cc.
|
virtual |
Definition at line 551 of file satellite-net-device.cc.
|
virtual |
Reimplemented in ns3::SatLorawanNetDevice.
Definition at line 138 of file satellite-net-device.cc.
References ns3::SatUtils::GetPacketInfo(), ns3::SatDevTimeTag::GetSenderTimestamp(), ns3::SatDevLinkTimeTag::GetSenderTimestamp(), ns3::SatAddressTag::GetSourceAddress(), ns3::SatAddressTag::GetTypeId(), ns3::SatEnums::LD_FORWARD, ns3::SatEnums::LD_RETURN, ns3::SatEnums::LL_ND, m_isStatisticsTagsEnabled, m_lastDelay, m_lastLinkDelay, m_nodeInfo, m_packetTrace, m_rxCallback, m_rxDelayTrace, m_rxJitterTrace, m_rxLinkDelayTrace, m_rxLinkJitterTrace, m_rxTrace, ns3::SatEnums::NT_UT, and ns3::SatEnums::PACKET_RECV.
Referenced by ns3::SatGwHelperDvb::Install(), and ns3::SatUtHelperDvb::Install().
|
virtual |
Reimplemented in ns3::SatLorawanNetDevice.
Definition at line 410 of file satellite-net-device.cc.
References ns3::SatUtils::GetPacketInfo(), ns3::SatEnums::LD_FORWARD, ns3::SatEnums::LD_RETURN, ns3::SatEnums::LL_ND, m_classifier, m_isStatisticsTagsEnabled, m_llc, m_nodeInfo, m_packetTrace, m_txTrace, ns3::SatEnums::NT_UT, and ns3::SatEnums::PACKET_SENT.
bool ns3::SatNetDevice::SendControlMsg | ( | Ptr< SatControlMessage > | msg, |
const Address & | dest | ||
) |
Definition at line 489 of file satellite-net-device.cc.
References ns3::SatUtils::GetPacketInfo(), ns3::SatEnums::LD_FORWARD, ns3::SatEnums::LD_RETURN, ns3::SatEnums::LL_ND, m_classifier, m_isStatisticsTagsEnabled, m_llc, m_mac, m_nodeInfo, m_packetTrace, m_signallingTxTrace, ns3::SatEnums::NT_UT, ns3::SatEnums::PACKET_SENT, ns3::SatControlMsgTag::SetMsgId(), and ns3::SatControlMsgTag::SetMsgType().
Referenced by ns3::SatGwHelperDvb::Install(), ns3::SatUtHelperDvb::Install(), and ns3::SatBeamHelper::InstallFeeder().
|
virtual |
Definition at line 448 of file satellite-net-device.cc.
References ns3::SatUtils::GetPacketInfo(), ns3::SatEnums::LD_FORWARD, ns3::SatEnums::LD_RETURN, ns3::SatEnums::LL_ND, m_classifier, m_isStatisticsTagsEnabled, m_llc, m_nodeInfo, m_packetTrace, m_txTrace, ns3::SatEnums::NT_UT, and ns3::SatEnums::PACKET_SENT.
|
virtual |
Definition at line 316 of file satellite-net-device.cc.
References m_address.
|
virtual |
Definition at line 267 of file satellite-net-device.cc.
References m_ifIndex.
void ns3::SatNetDevice::SetLlc | ( | Ptr< SatLlc > | llc | ) |
Attach the SatLlc llc layer to this netdevice.
llc | SatLlc pointer to be added |
Definition at line 231 of file satellite-net-device.cc.
References m_llc.
Referenced by GetTypeId().
void ns3::SatNetDevice::SetMac | ( | Ptr< SatMac > | mac | ) |
Definition at line 224 of file satellite-net-device.cc.
References m_mac.
Referenced by GetTypeId().
|
virtual |
Definition at line 333 of file satellite-net-device.cc.
References m_mtu.
|
virtual |
Definition at line 544 of file satellite-net-device.cc.
References m_node.
void ns3::SatNetDevice::SetNodeInfo | ( | Ptr< SatNodeInfo > | nodeInfo | ) |
Set the node info.
nodeInfo | containing node specific information |
Definition at line 238 of file satellite-net-device.cc.
References m_nodeInfo.
void ns3::SatNetDevice::SetPacketClassifier | ( | Ptr< SatPacketClassifier > | classifier | ) |
Set the packet classifier class.
classifier |
Definition at line 302 of file satellite-net-device.cc.
References m_classifier.
void ns3::SatNetDevice::SetPhy | ( | Ptr< SatPhy > | phy | ) |
Definition at line 217 of file satellite-net-device.cc.
References m_phy.
Referenced by GetTypeId().
|
virtual |
Definition at line 586 of file satellite-net-device.cc.
References m_promiscCallback.
|
virtual |
Definition at line 558 of file satellite-net-device.cc.
References m_rxCallback.
void ns3::SatNetDevice::SetReceiveErrorModel | ( | Ptr< ErrorModel > | em | ) |
Attach a receive ErrorModel to the SatNetDevice.
Note, that this method is not used in the satellite module, since the error model is located within the implemented sublayers (PHY).
em | Ptr to the ErrorModel. |
Definition at line 260 of file satellite-net-device.cc.
References m_receiveErrorModel.
|
virtual |
Definition at line 593 of file satellite-net-device.cc.
void ns3::SatNetDevice::ToggleState | ( | bool | enabled | ) |
Toggle the state of the device.
This is used for beam hopping purposes only, thus by default the netdevice is assumed to be enabled.
enabled | Flag indicating whether the ND is considered enabled or disabled |
Definition at line 245 of file satellite-net-device.cc.
References m_mac.
Referenced by ns3::SatBeamHelper::Install().
|
protected |
Definition at line 191 of file satellite-net-device.h.
Referenced by GetAddress(), and SetAddress().
|
protected |
Definition at line 185 of file satellite-net-device.h.
Referenced by DoDispose(), GetPacketClassifier(), ns3::SatLorawanNetDevice::Send(), Send(), SendControlMsg(), SendFrom(), and SetPacketClassifier().
|
protected |
Definition at line 190 of file satellite-net-device.h.
Referenced by GetIfIndex(), and SetIfIndex().
|
protected |
EnableStatisticsTags
attribute.
Definition at line 184 of file satellite-net-device.h.
Referenced by GetTypeId(), ns3::SatLorawanNetDevice::Receive(), Receive(), Send(), SendControlMsg(), and SendFrom().
|
protected |
Last delay measurement.
Used to compute jitter.
Definition at line 199 of file satellite-net-device.h.
Referenced by ns3::SatLorawanNetDevice::Receive(), and Receive().
|
protected |
Last link delay measurement.
Used to compute link jitter.
Definition at line 204 of file satellite-net-device.h.
Referenced by Receive().
|
protected |
Definition at line 183 of file satellite-net-device.h.
Referenced by DoDispose(), GetLlc(), ns3::SatLorawanNetDevice::Send(), Send(), SendControlMsg(), SendFrom(), and SetLlc().
|
protected |
Definition at line 182 of file satellite-net-device.h.
Referenced by DoDispose(), GetMac(), ns3::SatLorawanNetDevice::Send(), SendControlMsg(), SetMac(), and ToggleState().
|
protected |
Definition at line 189 of file satellite-net-device.h.
Referenced by GetMtu(), GetTypeId(), and SetMtu().
|
protected |
Definition at line 188 of file satellite-net-device.h.
Referenced by DoDispose(), GetNode(), and SetNode().
|
protected |
Definition at line 194 of file satellite-net-device.h.
Referenced by ns3::SatLorawanNetDevice::Receive(), Receive(), ns3::SatLorawanNetDevice::Send(), Send(), SendControlMsg(), SendFrom(), and SetNodeInfo().
|
protected |
Definition at line 214 of file satellite-net-device.h.
Referenced by GetTypeId(), ns3::SatLorawanNetDevice::Receive(), Receive(), ns3::SatLorawanNetDevice::Send(), Send(), SendControlMsg(), and SendFrom().
|
protected |
Definition at line 181 of file satellite-net-device.h.
Referenced by DoDispose(), GetPhy(), and SetPhy().
|
protected |
Definition at line 187 of file satellite-net-device.h.
Referenced by DoDispose(), and SetPromiscReceiveCallback().
|
protected |
Definition at line 192 of file satellite-net-device.h.
Referenced by DoDispose(), GetTypeId(), and SetReceiveErrorModel().
|
protected |
Definition at line 186 of file satellite-net-device.h.
Referenced by DoDispose(), ns3::SatLorawanNetDevice::Receive(), Receive(), and SetReceiveCallback().
|
protected |
Traced callback for all received packets, including delay information and the address of the senders.
Definition at line 237 of file satellite-net-device.h.
Referenced by GetTypeId(), ns3::SatLorawanNetDevice::Receive(), and Receive().
|
protected |
Traced callback for all received packets, including jitter information and the address of the senders.
Definition at line 243 of file satellite-net-device.h.
Referenced by GetTypeId(), ns3::SatLorawanNetDevice::Receive(), and Receive().
|
protected |
Traced callback for all received packets, including link delay information and the address of the senders.
Definition at line 249 of file satellite-net-device.h.
Referenced by GetTypeId(), and Receive().
|
protected |
Traced callback for all received packets, including link jitter information and the address of the senders.
Definition at line 255 of file satellite-net-device.h.
Referenced by GetTypeId(), and Receive().
|
protected |
Traced callback for all received packets, including the address of the senders.
Definition at line 231 of file satellite-net-device.h.
Referenced by GetTypeId(), ns3::SatLorawanNetDevice::Receive(), and Receive().
|
protected |
Traced callback for all signalling (control message) packets sent, including the destination address.
Definition at line 225 of file satellite-net-device.h.
Referenced by GetTypeId(), and SendControlMsg().
|
protected |
Traced callback for all packets received to be transmitted.
Definition at line 219 of file satellite-net-device.h.
Referenced by GetTypeId(), ns3::SatLorawanNetDevice::Send(), Send(), and SendFrom().