TTEthernet Model for INET Framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
TTEthernetModel::RCTrafficSourceApp Class Reference

Simple Test-Application. More...

#include <RCTrafficSourceApp.h>

Inheritance diagram for TTEthernetModel::RCTrafficSourceApp:
TTEthernetModel::TrafficSourceAppBase TTEthernetModel::TTEApplicationBase

Protected Member Functions

virtual void initialize ()
 Initialization of the module. More...
 
virtual void handleMessage (cMessage *msg)
 Handles message generation. More...
 
- Protected Member Functions inherited from TTEthernetModel::TrafficSourceAppBase
virtual void sendMessage ()
 Generates and sends a new Message. More...
 

Additional Inherited Members

- Public Member Functions inherited from TTEthernetModel::TTEApplicationBase
virtual void executeCallback (Callback *cb)
 executes the given Callback in the context of the Application More...
 
virtual void handleParameterChange (const char *parname)
 Indicates a parameter has changed. More...
 
- Protected Attributes inherited from TTEthernetModel::TTEApplicationBase
std::map< uint16_t, std::list
< Buffer * > > 
buffers
 Map of critical traffic identifies with their corresponding Buffers. More...
 

Detailed Description

Simple Test-Application.

See Also
TTEApplicationBase

Definition at line 31 of file RCTrafficSourceApp.h.

Member Function Documentation

void TTEthernetModel::RCTrafficSourceApp::handleMessage ( cMessage *  msg)
protectedvirtual

Handles message generation.

Definition at line 35 of file RCTrafficSourceApp.cc.

35  {
36 
37  if(msg->arrivedOn("schedulerIn")){
38  sendMessage();
39 
40  TTEScheduler *tteScheduler = (TTEScheduler*) getParentModule()->getSubmodule("tteScheduler");
41  SchedulerTimerEvent *event = (SchedulerTimerEvent *)msg;
42  event->setTimer(par("interval").doubleValue()/tteScheduler->par("tick").doubleValue());
43  tteScheduler->registerEvent(event);
44  }
45  else{
46  delete msg;
47  }
48 }
void TTEthernetModel::RCTrafficSourceApp::initialize ( )
protectedvirtual

Initialization of the module.

Sends activator message

Reimplemented from TTEthernetModel::TrafficSourceAppBase.

Definition at line 24 of file RCTrafficSourceApp.cc.

25 {
27 
28  TTEScheduler *tteScheduler = (TTEScheduler*) getParentModule()->getSubmodule("tteScheduler");
29  SchedulerTimerEvent *event = new SchedulerTimerEvent("API Scheduler Task Event", TIMER_EVENT);
30  event->setTimer(par("interval").doubleValue()/tteScheduler->par("tick").doubleValue());
31  event->setDestinationGate(gate("schedulerIn"));
32  tteScheduler->registerEvent(event);
33 }

The documentation for this class was generated from the following files: