Skip to content

Send Data to a Specific Vehicle #458

Answered by kschrab
yibork asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, theoretically you can send a message directly to a vehicle via a topological unicast. However, currently our couplings to OMNeT++ and ns-3 do not implement topological unicasts. Only SNS does. So If you are using SNS for adhoc-simulation, you can use:

MessageRouting receiverrouting = lastVehicleStatus.getRouting();

MessageRouting newRouting = getOs().getAdHocModule().createMessageRouting()
                .singlehop()
                .topological()
                .destination(receiverrouting.getSource().getSourceAddress())
                .build();

or in the old API format you are using:

MessageRouting receiverrouting = lastVehicleStatus.getRouting();

MessageRouting newRouting = getOs

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@yibork
Comment options

Answer selected by yibork
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants