OMNeT++ Simulation Library
6.0.3
|
16 #ifndef __OMNETPP_CSIMPLEMODULE_H
17 #define __OMNETPP_CSIMPLEMODULE_H
86 bool isUpdate =
false;
87 txid_t transmissionId_ = -1;
88 simtime_t remainingDuration = DURATION_UNSPEC;
151 SendOptions&
updateTx(
txid_t transmissionId) {this->isUpdate =
true; this->transmissionId_ = transmissionId; remainingDuration = DURATION_UNSPEC;
return *
this;}
158 SendOptions&
updateTx(
txid_t transmissionId,
simtime_t remainingDuration) {this->isUpdate =
true; this->transmissionId_ = transmissionId; this->remainingDuration = remainingDuration;
return *
this;}
163 std::string str()
const;
210 FL_USESACTIVITY = 1 << 13,
211 FL_ISTERMINATED = 1 << 14,
212 FL_STACKALREADYUNWOUND = 1 << 15,
213 FL_SUPPORTSTXUPDATES = 1 << 16,
220 static bool stackCleanupRequested;
225 static void activate(
void *p);
229 cGate *resolveSendDirectGate(
cModule *mod,
const char *gateName,
int gateIndex);
231 void deleteObsoletedTransmissionFromFES(
txid_t transmissionId,
cPacket *updatePkt);
232 void throwNotOwnerOfMessage(
const char *sendOp,
cMessage *msg);
236 virtual void doMessageEvent(
cMessage *msg);
255 virtual void activity();
261 virtual void handleMessage(
cMessage *msg);
288 virtual std::string str()
const override;
293 virtual bool isSimple()
const override;
299 virtual void forEachChild(
cVisitor *v)
override;
308 virtual void scheduleStart(
simtime_t t)
override;
375 virtual void snapshot(
cObject *obj=
nullptr,
const char *label=
nullptr);
390 virtual void send(
cMessage *msg,
const char *gatename,
int gateindex=-1) {
send(msg, gate(gatename, gateindex));}
406 virtual void send(
cMessage *msg,
const SendOptions& options,
const char *gatename,
int gateindex=-1) {
send(msg, options, gate(gatename, gateindex));}
433 virtual void sendDirect(
cMessage *msg,
cModule *mod,
const char *inputGateName,
int gateIndex=-1) {
sendDirect(msg, SendOptions::DEFAULT, resolveSendDirectGate(mod, inputGateName, gateIndex));}
490 virtual void sendDirect(
cMessage *msg,
simtime_t propagationDelay,
simtime_t duration,
cModule *mod,
const char *inputGateName,
int gateIndex=-1) {
sendDirect(msg, resolveSendDirectOptions(propagationDelay, duration), resolveSendDirectGate(mod, inputGateName, gateIndex));}
577 virtual void cancelAndDelete(
cMessage *msg);
636 virtual void endSimulation();
648 _OPP_GNU_ATTRIBUTE(format(printf, 2, 3))
649 virtual
void error(const
char *format,...) const;
663 virtual
bool hasStackOverflow() const;
669 virtual
unsigned getStackSize() const;
679 virtual
unsigned getStackUsage() const;
virtual void sendDirect(cMessage *msg, cModule *mod, int inputGateId)
Definition: csimplemodule.h:440
This class represents modules in the simulation.
Definition: cmodule.h:48
SendOptions & propagationDelay(simtime_t delay)
Definition: csimplemodule.h:114
SendOptions & updateTx(txid_t transmissionId, simtime_t remainingDuration)
Definition: csimplemodule.h:158
cObject is a lightweight class which serves as the root of the OMNeT++ class hierarchy....
Definition: cobject.h:92
virtual void sendDirect(cMessage *msg, const SendOptions &options, cModule *mod, int inputGateId)
Definition: csimplemodule.h:461
virtual void sendDelayed(cMessage *msg, simtime_t delay, cGate *outputgate)
Definition: csimplemodule.h:426
virtual void send(cMessage *msg, const SendOptions &options, int gateid)
Definition: csimplemodule.h:400
SendOptions()
Definition: csimplemodule.h:96
Simulation manager class.
Definition: csimulation.h:63
SendOptions & finishTx(txid_t transmissionId)
Definition: csimplemodule.h:142
Enables traversing the tree of (cObject-rooted) simulation objects.
Definition: cvisitor.h:56
virtual void sendDelayed(cMessage *msg, simtime_t delay, int gateid)
Definition: csimplemodule.h:416
virtual void sendDirect(cMessage *msg, cGate *inputGate)
Definition: csimplemodule.h:447
virtual void sendDirect(cMessage *msg, simtime_t propagationDelay, simtime_t duration, cModule *mod, const char *inputGateName, int gateIndex=-1)
Definition: csimplemodule.h:490
SendOptions & transmissionId(txid_t transmissionId)
Definition: csimplemodule.h:133
virtual void sendDirect(cMessage *msg, simtime_t propagationDelay, simtime_t duration, cModule *mod, int inputGateId)
Definition: csimplemodule.h:495
int64_t-based, base-10 fixed-point simulation time.
Definition: simtime.h:66
virtual void sendDirect(cMessage *msg, cModule *mod, const char *inputGateName, int gateIndex=-1)
Definition: csimplemodule.h:433
virtual void send(cMessage *msg, const char *gatename, int gateindex=-1)
Definition: csimplemodule.h:390
bool supportsTxUpdates() const
Definition: csimplemodule.h:348
Options for the cSimpleModule::send() and cSimpleModule::sendDirect() calls.
Definition: csimplemodule.h:82
Represents a module gate.
Definition: cgate.h:62
SendOptions & duration(simtime_t duration)
Definition: csimplemodule.h:124
virtual void send(cMessage *msg, int gateid)
Definition: csimplemodule.h:384
virtual void sendDirect(cMessage *msg, simtime_t propagationDelay, simtime_t duration, cGate *inputGate)
Definition: csimplemodule.h:500
virtual void sendDelayed(cMessage *msg, simtime_t delay, const char *gatename, int gateindex=-1)
Definition: csimplemodule.h:421
#define SIMTIME_ZERO
Zero simulation time.
Definition: simtime_t.h:70
int64_t txid_t
Transmission ID. See SendOptions::transmissionId(), cMessage::getTransmissionId().
Definition: simkerneldefs.h:92
Low-level coroutine library. Coroutines are used by cSimpleModule.
Definition: ccoroutine.h:66
The message class in OMNeT++. cMessage objects may represent events, messages, jobs or other entities...
Definition: cmessage.h:95
bool usesActivity() const
Definition: csimplemodule.h:324
SendOptions & updateTx(txid_t transmissionId)
Definition: csimplemodule.h:151
Base class for all simple module classes.
Definition: csimplemodule.h:202
A subclass of cMessage to represent packets, frames, datagrams, application messages,...
Definition: cpacket.h:52
virtual void sendDirect(cMessage *msg, const SendOptions &options, cModule *mod, const char *inputGateName, int gateIndex=-1)
Definition: csimplemodule.h:454
bool isTerminated() const
Definition: csimplemodule.h:354
SendOptions & after(simtime_t delay)
Definition: csimplemodule.h:108
Queue class for objects derived from cObject.
Definition: cqueue.h:42
virtual void send(cMessage *msg, cGate *outputgate)
Definition: csimplemodule.h:395
virtual void send(cMessage *msg, const SendOptions &options, const char *gatename, int gateindex=-1)
Definition: csimplemodule.h:406
void setTxUpdateSupport(bool b)
Definition: csimplemodule.h:341