OMNeT++/OMNEST Bug Tracker - OMNeT++
View Issue Details
0000391OMNeT++simulation kernelpublic2011-08-05 13:142011-08-30 15:41
normalfeaturehave not tried
0000391: Allow connections defined in a baseclass to be overridden in a subclasses.
See EthernetInterface in INET for an example.

It contains some special IHook module vectors to allow injecting behavior into the NIC. This makes harder to understand the module's internal structure and it is not used 99% of the time. It may also be insufficient and we could potentially insert them everywhere.

The goal is clear: we have to have a way to customize connections without copying the whole module and editing the connections section. If we were subclassing EthernetInterface and override the connections in the subclass, then we would clearly be in a much better situation. The subclass would only contain the differences and the base class would not know about that at all.

Suggested syntax:

module MyEthernetInterface extends EthernetInterface {
      myCustomSubmodule: MyCustomSubmodule;
      netwIn --> { @override(); } -->;
      myCustomSubmodule.out --> { @override(); } -->;
No tags attached.
Issue History
2011-08-05 13:14levyNew Issue
2011-08-30 15:41andrasNote Added: 0000538

2011-08-30 15:41   
Use @reconnect instead of @override, it's more explicit...