QuISP
Loading...
Searching...
No Matches
Gate.h
Go to the documentation of this file.
1#pragma once
2
3#include <omnetpp.h>
4#include "omnetpp/cmessage.h"
5
6namespace quisp_test {
7namespace gate {
8
9using omnetpp::cMessage;
10using omnetpp::cModule;
11using omnetpp::simtime_t;
12
18class TempGate : public omnetpp::cGate {
19 public:
20 TempGate();
21
22 protected:
23 bool deliver(cMessage *msg, const omnetpp::SendOptions &options, simtime_t at) override;
24};
25
30class TestGate : public omnetpp::cGate {
31 public:
32 explicit TestGate(cModule *mod, const char *name);
33 std::vector<cMessage *> messages;
34
35 protected:
37 bool deliver(cMessage *msg, const omnetpp::SendOptions &options, simtime_t at) override;
38};
39
40} // namespace gate
41} // namespace quisp_test
dumb class for TestGate. cGate needs nextGate or prevGate in TestGate to check the gate is output or ...
Definition Gate.h:18
bool deliver(cMessage *msg, const omnetpp::SendOptions &options, simtime_t at) override
Definition Gate.cc:11
TempGate()
Definition Gate.cc:10
this class can store received messages currently this class only for output gate. we may need to adap...
Definition Gate.h:30
TempGate temp_gate
Definition Gate.h:36
std::vector< cMessage * > messages
Definition Gate.h:33
bool deliver(cMessage *msg, const omnetpp::SendOptions &options, simtime_t at) override
this method called when a module sent cMessage to this gate. and then store the msg into messages
Definition Gate.cc:27
TestGate(cModule *mod, const char *name)
Definition Gate.cc:13
Definition test.h:15