Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces changes that rework the existing splitter to make it more easily usable. The result is a splitter that can be inherited from where subclasses can compute which of the interfaces should be used for each given message. The base implementation has the same behavior as the current splitter, however, the application does not have to specify the interface to use with the
VlcMessage
.To make this work, I refactored the existing constants, I dropped the integer definitions used to code interfaces in favor of a bitset the splitter defines. This means existing code will have to be adapted, the previous
transmissionTechnology
andheadOrTail
members have been replaced by aaccessTechnology
member that encodes both, and is more flexible (e.g., it is possible to send a packet via DSRC and the taillight. The changes to theSimpleVlcApp
should be a good example of how this looks now.I have used this code for my simulations, and reran the example with Veins 5.0 to confirm that it works.