21 #ifndef SATELLITE_NET_DEVICE_H
22 #define SATELLITE_NET_DEVICE_H
27 #include <ns3/mac48-address.h>
28 #include <ns3/net-device.h>
29 #include <ns3/nstime.h>
30 #include <ns3/simulator.h>
31 #include <ns3/traced-callback.h>
45 class SatControlMessage;
69 virtual void Receive(Ptr<const Packet> packet);
75 void SetPhy(Ptr<SatPhy> phy);
82 Ptr<SatPhy>
GetPhy(
void)
const;
88 void SetMac(Ptr<SatMac> mac);
95 Ptr<SatMac>
GetMac(
void)
const;
101 void SetLlc(Ptr<SatLlc> llc);
108 Ptr<SatLlc>
GetLlc(
void)
const;
131 virtual void SetIfIndex(
const uint32_t index);
135 virtual bool SetMtu(
const uint16_t mtu);
136 virtual uint16_t
GetMtu(
void)
const;
142 virtual Address
GetMulticast(Ipv4Address multicastGroup)
const;
145 virtual bool Send(Ptr<Packet> packet,
const Address& dest, uint16_t protocolNumber);
146 virtual bool SendFrom(Ptr<Packet> packet,
147 const Address& source,
149 uint16_t protocolNumber);
150 bool SendControlMsg(Ptr<SatControlMessage> msg,
const Address& dest);
151 virtual Ptr<Node>
GetNode(
void)
const;
152 virtual void SetNode(Ptr<Node> node);
231 TracedCallback<Ptr<const Packet>,
const Address&>
m_rxTrace;
SatLinkDir_t
Link direction used for packet tracing.
SatNodeType_t
Node type used for packet tracing.
SatPacketEvent_t
Packet event used for packet tracing.
SatLogLevel_t
Log level used for packet tracing.
SatNetDevice to be utilized in the UT and GW nodes.
Time m_lastLinkDelay
Last link delay measurement.
TracedCallback< const Time &, const Address & > m_rxDelayTrace
Traced callback for all received packets, including delay information and the address of the senders.
virtual bool SetMtu(const uint16_t mtu)
virtual bool IsLinkUp(void) const
virtual Ptr< Channel > GetChannel(void) const
void ToggleState(bool enabled)
Toggle the state of the device.
void SetLlc(Ptr< SatLlc > llc)
Attach the SatLlc llc layer to this netdevice.
virtual bool Send(Ptr< Packet > packet, const Address &dest, uint16_t protocolNumber)
Ptr< SatMac > GetMac(void) const
Get a Mac pointer.
virtual bool SendFrom(Ptr< Packet > packet, const Address &source, const Address &dest, uint16_t protocolNumber)
SatNetDevice()
Default constructor.
TracedCallback< Ptr< const Packet > > m_txTrace
Traced callback for all packets received to be transmitted.
Ptr< SatPacketClassifier > m_classifier
Ptr< ErrorModel > m_receiveErrorModel
Time m_lastDelay
Last delay measurement.
virtual uint16_t GetMtu(void) const
virtual bool SupportsSendFrom(void) const
virtual bool NeedsArp(void) const
virtual Address GetAddress(void) const
virtual void DoDispose(void)
Dispose of this class instance.
TracedCallback< const Time &, const Address & > m_rxLinkDelayTrace
Traced callback for all received packets, including link delay information and the address of the sen...
void SetPhy(Ptr< SatPhy > phy)
TracedCallback< Ptr< const Packet >, const Address & > m_rxTrace
Traced callback for all received packets, including the address of the senders.
virtual bool IsBroadcast(void) const
Ptr< SatLlc > GetLlc(void) const
Get Llc pointer.
Ptr< SatNodeInfo > m_nodeInfo
virtual Address GetMulticast(Ipv4Address multicastGroup) const
virtual void Receive(Ptr< const Packet > packet)
TracedCallback< Time, SatEnums::SatPacketEvent_t, SatEnums::SatNodeType_t, uint32_t, Mac48Address, SatEnums::SatLogLevel_t, SatEnums::SatLinkDir_t, std::string > m_packetTrace
static TypeId GetTypeId(void)
Get the type ID.
Ptr< SatPhy > GetPhy(void) const
Get a Phy pointer.
virtual Address GetBroadcast(void) const
virtual uint32_t GetIfIndex(void) const
void SetMac(Ptr< SatMac > mac)
virtual void SetIfIndex(const uint32_t index)
virtual void SetAddress(Address address)
Ptr< SatPacketClassifier > GetPacketClassifier() const
Get a pointer to packet classifier class.
bool SendControlMsg(Ptr< SatControlMessage > msg, const Address &dest)
NetDevice::PromiscReceiveCallback m_promiscCallback
virtual Ptr< Node > GetNode(void) const
virtual void AddLinkChangeCallback(Callback< void > callback)
TracedCallback< const Time &, const Address & > m_rxJitterTrace
Traced callback for all received packets, including jitter information and the address of the senders...
void SetPacketClassifier(Ptr< SatPacketClassifier > classifier)
Set the packet classifier class.
NetDevice::ReceiveCallback m_rxCallback
void SetNodeInfo(Ptr< SatNodeInfo > nodeInfo)
Set the node info.
virtual void SetPromiscReceiveCallback(PromiscReceiveCallback cb)
TracedCallback< const Time &, const Address & > m_rxLinkJitterTrace
Traced callback for all received packets, including link jitter information and the address of the se...
virtual bool IsPointToPoint(void) const
virtual bool IsMulticast(void) const
void SetReceiveErrorModel(Ptr< ErrorModel > em)
Attach a receive ErrorModel to the SatNetDevice.
virtual bool IsBridge(void) const
bool m_isStatisticsTagsEnabled
EnableStatisticsTags attribute.
virtual void SetReceiveCallback(NetDevice::ReceiveCallback cb)
TracedCallback< Ptr< const Packet >, const Address & > m_signallingTxTrace
Traced callback for all signalling (control message) packets sent, including the destination address.
virtual void SetNode(Ptr< Node > node)
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.