Download OMNeT++

Transcript
OMNeT++ Manual – NED Reference
A.2
Built-in Definitions
The NED language has the following built-in definitions, all in the ned package: channels
IdealChannel, DelayChannel, and DatarateChannel; module interfaces IBidirectionalChannel, and IUnidirectionalChannel. The latter two are reserved for future use.
The bodies of @statistic properties have been omitted for brevity from the following listing.
NOTE: You can print the full definitions by running opp_run -h neddecls.
package ned;
@namespace("");
channel IdealChannel
{
@class(cIdealChannel);
}
channel DelayChannel
{
@class(cDelayChannel);
@signal[messageSent](type=cMessage);
@signal[messageDiscarded](type=cMessage);
@statistic[messages](...);
@statistic[messagesDiscarded](...);
bool disabled = default(false);
double delay = default(0s) @unit(s); // propagation delay
}
channel DatarateChannel
{
@class(cDatarateChannel);
@signal[channelBusy](type="int");
@signal[messageSent](type=cMessage);
@signal[messageDiscarded](type=cMessage);
@statistic[busy](...);
@statistic[utilization](...);
@statistic[packets](...);
@statistic[packetBytes](...);
@statistic[packetsDiscarded](...);
@statistic[throughput](...);
bool disabled = default(false);
double delay = default(0s) @unit(s); // propagation delay
double datarate = default(0bps) @unit(bps); // bits per second; 0=infinite
double ber = default(0); // bit error rate (BER)
double per = default(0); // packet error rate (PER)
}
moduleinterface IBidirectionalChannel
{
gates:
inout a;
301