![]() |
KENSv3
KAIST Educational Network System
|
NetworkModule is a abstract class for wired connection. More...
#include <E_Networking.hpp>
Public Member Functions | |
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. More... | |
std::string | getModuleName () |
std::string | getModuleName (const ModuleID moduleID) |
Time | getCurrentTime () |
Protected Attributes | |
std::vector< ModuleID > | ports |
Additional Inherited Members | |
![]() | |
using | Message = std::unique_ptr< MessageBase > |
![]() | |
virtual Module::Message | messageReceived (const ModuleID from, Module::MessageBase &message) |
This is a callback function called by the System. This function is automatically called when you received a Message. If you want to handle Message, override this function with your own handler. More... | |
virtual void | messageFinished (const ModuleID to, Message message, Module::MessageBase &response) |
This is a callback function called by the System. This function is automatically called after your message is processed by the destination module. If you want to handle Message, override this function with your own handler. YOU MUST DEALLOCATE EVERY SUCCESSFUL MESSAGE YOU ALLOCATED JUST HERE. INSTANT RESPONSE messages(return value of messageReceived) are also deallocated here. SELF messages are also deallocated here. More... | |
virtual void | messageCancelled (const ModuleID to, Message message) |
This is a callback function called by the System. This function is automatically called when the message is cancelled before it is processed. This function is called AT THE TIME WHEN THE MESSAGE WAS SUPPOSED TO BE SENT. If you want to handle Message, override this function with your own handler. YOU MUST DEALLOCATE EVERY CANCELLED MESSAGE YOU ALLOCATED JUST HERE. More... | |
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. More... | |
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. More... | |
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. More... | |
NetworkModule is a abstract class for wired connection.