inet
inet copied to clipboard
IpvxTrafGen doesn't evaulate destAddr until message is sent
In IpvxTrafGen, the destination addresses string is not evaluated until the first message is sent. https://github.com/inet-framework/inet/blob/be4e4cd2953f564cdfca8cbbaaeb476b8df795aa/src/inet/applications/generic/IpvxTrafGen.cc#L96-L106
Is there a good reason for this. I think it would make more sense to be evaluated in the initialize() "INITSTAGE_APPLICATION_LAYER" part.
Not evaluating it until the first message is sent makes the class less useful when inherited from, since this property cannot be used if it is not evaluated.
The token maybe stay unresolved in initialize, but resolved in handleMessage: for example, dinamically generated network node, IPv6 addresses, etc.
I think we can close this issue because the current behavior is better than the one suggested.