Link makes connections among multiple Wires. It supports packet switching and output queuing. Random drop occurs when the queue is full.
More...
#include <E_Link.hpp>
|
enum | MessageType { CHECK_QUEUE
} |
|
using | Message = std::unique_ptr< MessageBase > |
|
|
| Link (std::string name, NetworkSystem &system) |
|
virtual void | enablePCAPLogging (const std::string &filename, Size snaplen=65535) final |
| Make a PCAP formatted log file.
|
|
virtual void | setLinkSpeed (Size bps) final |
|
virtual void | setQueueSize (Size max_queue_length) final |
|
| NetworkModule (System &system) |
|
int | connectWire (const ModuleID moduleID) |
|
size_t | getPortCount () |
|
| Module (System &system) |
| Module must belong to a System. Module is registered to a System when it is created.
|
|
std::string | getModuleName () |
|
std::string | getModuleName (const ModuleID moduleID) |
|
Time | getCurrentTime () |
|
|
virtual void | packetArrived (const ModuleID inWireID, Packet &&packet)=0 |
|
virtual void | packetSent (const ModuleID wireID, Packet &&packet) |
|
virtual void | sendPacket (const ModuleID wireID, Packet &&packet) final |
|
virtual UUID | sendMessage (const ModuleID to, Module::Message message, Time timeAfter) final |
| Send a Message to other Module. Every message has its own delay before it is actually sent. The System guarantees the total ordering of all delayed messages in the System.
|
|
virtual UUID | sendMessageSelf (Module::Message message, Time timeAfter) final |
| Send a Message to self Every message has its own delay before it is actually sent. The System guarantees the total ordering of all delayed messages in the System.
|
|
virtual bool | cancelMessage (UUID messageID) final |
| Cancel the raised Message. If a message is not actually sent yet, you can cancel the message. If the message is already sent, this function has no effect.
|
|
|
std::unordered_map< ModuleID, Time > | nextAvailable |
|
std::unordered_map< ModuleID, std::list< Packet > > | outputQueue |
|
Size | bps |
|
Size | max_queue_length |
|
std::vector< ModuleID > | ports |
|
Link makes connections among multiple Wires. It supports packet switching and output queuing. Random drop occurs when the queue is full.
◆ enablePCAPLogging()
void E::Link::enablePCAPLogging |
( |
const std::string & |
filename, |
|
|
Size |
snaplen = 65535 |
|
) |
| |
|
finalvirtual |
Make a PCAP formatted log file.
- Parameters
-
filename | Name of the log file. |
snaplen | Length of packet data to be recorded. |
- Note
- You cannot override this function.
◆ setLinkSpeed()
void E::Link::setLinkSpeed |
( |
Size |
bps | ) |
|
|
finalvirtual |
- Parameters
-
bps | Set link speed to bps. |
◆ setQueueSize()
void E::Link::setQueueSize |
( |
Size |
max_queue_length | ) |
|
|
finalvirtual |
- Parameters
-
max_queue_length | Set the maximum queue length. Zero indicates infinite queue. |
The documentation for this class was generated from the following files:
- include/E/Networking/E_Link.hpp
- src/Networking/E_Link.cpp