Skip to content

Commit

Permalink
fix: Reverted renaming of CELL_GEOCAST_MBMS
Browse files Browse the repository at this point in the history
  • Loading branch information
FunKuchen committed Nov 19, 2024
1 parent 5a39ff1 commit bcb6fcb
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"AD_HOC_GEOCAST": false,
"AD_HOC_TOPOCAST": true,
"CELL_GEOCAST": false,
"CELL_GEOCAST_MBS": false,
"CELL_GEOCAST_MBMS": false,
"CELL_TOPOCAST": false
},
"destinationAddress": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"AD_HOC_GEOCAST": false,
"AD_HOC_TOPOCAST": true,
"CELL_GEOCAST": false,
"CELL_GEOCAST_MBS": false,
"CELL_GEOCAST_MBMS": false,
"CELL_TOPOCAST": false
},
"destinationAddress": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"AD_HOC_GEOCAST": false,
"AD_HOC_TOPOCAST": true,
"CELL_GEOCAST": false,
"CELL_GEOCAST_MBS": false,
"CELL_GEOCAST_MBMS": false,
"CELL_TOPOCAST": false
},
"destinationAddress": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public Integer sendCam() {
return switch (camConfiguration.getAddressingMode()) {
case CELL_TOPOCAST -> sendCamViaTopocast(camConfiguration);
case CELL_GEOCAST -> sendCamViaGeoBroadcast(camConfiguration);
case CELL_GEOCAST_MBS -> sendCamViaGeoBroadcastMbms(camConfiguration);
case CELL_GEOCAST_MBMS -> sendCamViaGeoBroadcastMbms(camConfiguration);
default -> {
log.warn("sendCam: Unsupported addressing mode {}.", camConfiguration.getAddressingMode());
yield null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ private void processMessage(CellModuleMessage message, long time) {
} else if (type.equals(DestinationType.CELL_GEOCAST) && address.isBroadcast() && !protocol.equals(ProtocolType.TCP)) {
// Geocasts require broadcast, but don't allow tcp (as ack for broadcasts is denied)
geocasterCellGeoUnicast(time, nextModule, streamResult, isFullMessage);
} else if (type.equals(DestinationType.CELL_GEOCAST_MBS) && address.isBroadcast() && !protocol.equals(ProtocolType.TCP)) {
} else if (type.equals(DestinationType.CELL_GEOCAST_MBMS) && address.isBroadcast() && !protocol.equals(ProtocolType.TCP)) {
// Geocasts require broadcast, but don't allow tcp (as ack for broadcasts is denied)
geocasterCellGeoBroadcast(time, nextModule, streamResult, isFullMessage);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ static class CMessages {
routingType.put(DestinationType.AD_HOC_GEOCAST, false);
routingType.put(DestinationType.AD_HOC_TOPOCAST, true);
routingType.put(DestinationType.CELL_GEOCAST, false);
routingType.put(DestinationType.CELL_GEOCAST_MBS, false);
routingType.put(DestinationType.CELL_GEOCAST_MBMS, false);
routingType.put(DestinationType.CELL_TOPOCAST, false);

protocolType.put(ProtocolType.UDP, true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ public enum DestinationType {
AD_HOC_TOPOCAST,
// cell types
CELL_GEOCAST,
CELL_GEOCAST_MBS,
CELL_GEOCAST_MBMS,
CELL_TOPOCAST;

public boolean isAdHoc() {
return this == AD_HOC_GEOCAST || this == AD_HOC_TOPOCAST;
}

public boolean isCell() {
return this == CELL_GEOCAST || this == CELL_GEOCAST_MBS || this == CELL_TOPOCAST;
return this == CELL_GEOCAST || this == CELL_GEOCAST_MBMS || this == CELL_TOPOCAST;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ public CellMessageRoutingBuilder broadcast() {

public CellMessageRoutingBuilder mbs() {
Validate.isTrue(!mbsChanged, "MBS was already chosen!");
routing = DestinationType.CELL_GEOCAST_MBS;
routing = DestinationType.CELL_GEOCAST_MBMS;
mbsChanged = true;
return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public void geoBroadcastMbsCircle() {
MessageRouting routing = builder.broadcast().mbs().geographical(geoCircle).build();

// assert
assertEquals(DestinationType.CELL_GEOCAST_MBS, routing.getDestination().getType());
assertEquals(DestinationType.CELL_GEOCAST_MBMS, routing.getDestination().getType());
assertTrue(routing.getDestination().isGeocast());
assertTrue(routing.getDestination().getGeoArea() instanceof GeoCircle);
assertTrue(routing.getDestination().getAddress().isBroadcast());
Expand All @@ -91,7 +91,7 @@ public void geoBroadcastMbsRectangle() {
MessageRouting routing = builder.broadcast().mbs().geographical(geoRectangle).build();

// assert
assertEquals(DestinationType.CELL_GEOCAST_MBS, routing.getDestination().getType());
assertEquals(DestinationType.CELL_GEOCAST_MBMS, routing.getDestination().getType());
assertTrue(routing.getDestination().isGeocast());
assertTrue(routing.getDestination().getGeoArea() instanceof GeoRectangle);
assertTrue(routing.getDestination().getAddress().isBroadcast());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
{
"name": "VEH",
"applications": [
"org.eclipse.mosaic.test.app.sendandreceive.SendCamAppCell(150, \"CELL_GEOCAST_MBS\", 150d, 300l, 400l)"
"org.eclipse.mosaic.test.app.sendandreceive.SendCamAppCell(150, \"CELL_GEOCAST_MBMS\", 150d, 300l, 400l)"
]
}
]
Expand Down

0 comments on commit bcb6fcb

Please sign in to comment.