Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce splitter interface #8

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

mxsrc
Copy link
Member

@mxsrc mxsrc commented Apr 1, 2021

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 and headOrTail members have been replaced by a accessTechnology 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 the SimpleVlcApp 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.

mxsrc added 5 commits April 1, 2021 12:26
Move the computation of the access technology to be used to a separate
function. This enables child classes of the Splitter to customize this
process by overriding the base implementation.

The base implementation is unchanged:
- use explicit information if a VlcMessage is passed
- fall back to dsrc for basic wsms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant