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

Simple Test-Application. More...

#include <TTETestApp.h>

Inheritance diagram for TTEthernetModel::TTETestApp:
TTEthernetModel::TTEApplicationBase

Protected Member Functions

virtual void initialize ()
 Initialization of the module. More...
 
virtual void handleMessage (cMessage *msg)
 Handles message generation. 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 TTETestApp.h.

Member Function Documentation

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

Handles message generation.

Definition at line 28 of file TTETestApp.cc.

29 {
30  if (!msg->arrivedOn("TTin") && *new std::string(getParentModule()->getName()) != "videoclient")
31  {
32  CTFrame *frame = new CTFrame("CT-ID=100");
33  MACAddress srcAddr;
34  srcAddr.setAddress("03 04 05 06 00 64");
35  frame->setDest(srcAddr);
36  frame->setCtID(100);
37  //ENDE TEST
38 
39  if (getParentModule()->getSubmodule("VL_TT_100_CTC"))
40  sendDirect(frame, getParentModule()->getSubmodule("VL_TT_100_CTC")->gate("in"));
41  }
42 
43  if (!msg->arrivedOn("TTin") && *new std::string(getParentModule()->getName()) != "videoclient")
44  {
45  CTFrame *frame = new CTFrame("CT-ID=101");
46  MACAddress srcAddr;
47  srcAddr.setAddress("03 04 05 06 00 65");
48  frame->setDest(srcAddr);
49  frame->setCtID(100);
50  frame->setByteLength(1500);
51  //ENDE TEST
52 
53  if (getParentModule()->getSubmodule("VL_TT_101_CTC"))
54  sendDirect(frame, getParentModule()->getSubmodule("VL_TT_101_CTC")->gate("in"));
55  }
56 
57  delete msg;
58  // TODO - Generated method body
59 }
void TTEthernetModel::TTETestApp::initialize ( )
protectedvirtual

Initialization of the module.

Sends activator message

Definition at line 23 of file TTETestApp.cc.

24 {
25  scheduleAt(simTime(), new cMessage("ACTIVATOR!"));
26 }

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