|
OverSim
|
#include <apptunoutscheduler.h>
Public Member Functions | |
| virtual | ~AppTunOutScheduler () |
Public Member Functions inherited from RealtimeScheduler | |
| RealtimeScheduler () | |
| Constructor. | |
| virtual | ~RealtimeScheduler () |
| Destructor. | |
| virtual void | startRun () |
| Called at the beginning of a simulation run. | |
| virtual void | endRun () |
| Called at the end of a simulation run. | |
| virtual void | executionResumed () |
| Recalculates "base time" from current wall clock time. | |
| virtual void | setInterfaceModule (cModule *module, cMessage *notificationMsg, PacketBuffer *buffer, int mtu, bool isApp=false) |
| To be called from the module which wishes to receive data from the tun device. | |
| void | registerSocket (SOCKET fd, cModule *mod, cMessage *notifMsg, PacketBuffer *buffer, int mtu) |
| virtual cMessage * | getNextEvent () |
| Scheduler function – it comes from cScheduler interface. | |
| void | sendNotificationMsg (cMessage *msg, cModule *mod) |
| send notification msg to module | |
| virtual ssize_t | sendBytes (const char *buf, size_t numBytes, sockaddr *addr=0, socklen_t addrlen=0, bool isApp=false, SOCKET fd=INVALID_SOCKET) |
| Send data to network. | |
| void | closeAppSocket (SOCKET fd) |
| Close the application TCP socket. | |
| virtual SOCKET | getAppTunFd () |
| Returns the FD for the application TUN socket. | |
Protected Member Functions | |
| virtual int | initializeNetwork () |
| Initialize the network. | |
| virtual void | additionalFD () |
| This function is called from main loop if data is accessible from "additional_fd". | |
Protected Member Functions inherited from RealtimeScheduler | |
| virtual bool | receiveWithTimeout (long usec) |
| Waits for incoming data on the tun device. | |
| virtual int | receiveUntil (const timeval &targetTime) |
| Tries to read data until the given time is up. | |
Protected Attributes | |
| char * | dev |
Protected Attributes inherited from RealtimeScheduler | |
| std::map< SOCKET, SocketContext > | socketContextMap |
| fd_set | all_fds |
| SOCKET | maxfd |
| SOCKET | netw_fd |
| SOCKET | apptun_fd |
| cModule * | module |
| cMessage * | notificationMsg |
| PacketBuffer * | packetBuffer |
| size_t | buffersize |
| cModule * | appModule |
| cMessage * | appNotificationMsg |
| PacketBuffer * | appPacketBuffer |
| size_t | appBuffersize |
| int | appConnectionLimit |
| SOCKET | additional_fd |
| timeval | baseTime |
Definition at line 40 of file apptunoutscheduler.h.
|
virtual |
Definition at line 33 of file apptunoutscheduler.cc.
|
protectedvirtual |
This function is called from main loop if data is accessible from "additional_fd".
This FD can be set in initializeNetwork by concrete implementations.
Reimplemented from RealtimeScheduler.
Definition at line 195 of file apptunoutscheduler.cc.
|
protectedvirtual |
Initialize the network.
Implements RealtimeScheduler.
Definition at line 44 of file apptunoutscheduler.cc.
|
protected |
Definition at line 43 of file apptunoutscheduler.h.
Referenced by initializeNetwork().