Skip to content

Commit

Permalink
build: raise version of protobuf
Browse files Browse the repository at this point in the history
  • Loading branch information
kschrab committed Feb 28, 2024
1 parent 09e7fda commit cbaef6f
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 14 deletions.
3 changes: 2 additions & 1 deletion bundle/src/assembly/resources/fed/ns3/ns3_installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ ns3_scratch="${ns3_simulator_folder}/scratch"
ns3_source="${ns3_simulator_folder}/src"

####### semi automatic parameters ########
ns3_federate_url="https://github.com/mosaic-addons/ns3-federate/archive/refs/tags/23.1.zip"
#ns3_federate_url="https://github.com/mosaic-addons/ns3-federate/archive/refs/tags/23.1.zip"
ns3_federate_url="https://github.com/mosaic-addons/ns3-federate/archive/refs/heads/main.zip"
ns3_url="https://www.nsnam.org/releases/$ns3_version_affix.tar.bz2"

###### more automatic parameters #########
Expand Down
8 changes: 4 additions & 4 deletions bundle/src/assembly/resources/fed/omnetpp/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:bionic
FROM ubuntu:jammy

LABEL \
description="Docker image containing the MOSAIC adapted OMNeT++ federate" \
Expand All @@ -14,10 +14,10 @@ RUN \
libprotobuf-dev \
protobuf-compiler \
libxml2-dev \
python \
python3 \
python-is-python3 \
unzip \
wget \
zlib1g-dev
wget

WORKDIR /home/mosaic/bin/fed/omnetpp

Expand Down
5 changes: 3 additions & 2 deletions bundle/src/assembly/resources/fed/omnetpp/omnet_installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ check_shell
required_programs=( unzip tar bison flex protoc gcc python )
required_libraries=( "libprotobuf-dev >= 3.7.0" "libxml2-dev" )

omnet_federate_url="https://github.com/mosaic-addons/omnetpp-federate/archive/refs/tags/23.1.zip"
#omnet_federate_url="https://github.com/mosaic-addons/omnetpp-federate/archive/refs/tags/23.1.zip"
omnet_federate_url="https://github.com/mosaic-addons/ns3-federate/archive/refs/heads/main.zip"
omnet_src_url="https://github.com/omnetpp/omnetpp/releases/download/omnetpp-5.5.1/omnetpp-5.5.1-src-linux.tgz"
inet_src_url="https://github.com/inet-framework/inet/releases/download/v4.1.1/inet-4.1.1-src.tgz"

Expand Down Expand Up @@ -714,7 +715,7 @@ configure_inet() {
cd "${inet_src_dir}"

# Patch inet feature tool if python >= 3.0.0
python_version_current="$(python --version 2>&1)"
python_version_current="$(python3 --version 2>&1)"
python_version_3="Python 3."
if [[ "$python_version_current" == "$python_version_3"* ]]; then
sed -i -e "s|raw_input|input|" ./bin/inet_featuretool
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,7 @@ public int writeRemoveNodesMessage(long time, List<Integer> ids) throws IOExcept
}

// @param channelId the channelID //TODO:make enum from

/**
* Write send message header to stream.
* Not used in eWorld visualizer.
Expand Down Expand Up @@ -406,7 +407,7 @@ public int writeSendMessage(long time, int srcNodeId,
//builder for rectangular addresses
rectangleAddress.setIpAddress(buffer.getInt()); //write the ip address as flat integer into the builder
//convert coordinates etc.
CartesianRectangle projectedRectangle = ((GeoRectangle)dac.getGeoArea()).toCartesian();
CartesianRectangle projectedRectangle = ((GeoRectangle) dac.getGeoArea()).toCartesian();
//write the coordinates of the area into the builder
rectangleAddress.setAX(projectedRectangle.getA().getX());
rectangleAddress.setAY(projectedRectangle.getA().getY());
Expand All @@ -418,7 +419,7 @@ public int writeSendMessage(long time, int srcNodeId,
SendMessageMessage.GeoCircleAddress.Builder circleAddress = SendMessageMessage.GeoCircleAddress.newBuilder();
circleAddress.setIpAddress(buffer.getInt());

CartesianCircle projectedCircle = ((GeoCircle)dac.getGeoArea()).toCartesian();
CartesianCircle projectedCircle = ((GeoCircle) dac.getGeoArea()).toCartesian();
//write area into the address object
circleAddress.setCenterX(projectedCircle.getCenter().getX());
circleAddress.setCenterY(projectedCircle.getCenter().getY());
Expand All @@ -428,7 +429,7 @@ public int writeSendMessage(long time, int srcNodeId,
} else {
throw new IllegalArgumentException("Addressing does support GeoCircle and GeoRectangle only.");
}
} else if (dac.getTimeToLive() > -1){ //Topocast addresses
} else if (dac.getTimeToLive() > -1) { //Topocast addresses
SendMessageMessage.TopoAddress.Builder topoAddress = SendMessageMessage.TopoAddress.newBuilder();
topoAddress.setIpAddress(buffer.getInt()); //Add IP as flat int
topoAddress.setTtl(dac.getTimeToLive()); //add time to live
Expand Down Expand Up @@ -471,7 +472,7 @@ public int writeConfigMessage(long time, int msgID, int externalId, AdHocConfigu
radioConfig1.setReceivingMessages(false); //!!Semantic in Java: true -> only routing
radioConfig1.setIpAddress(inet4ToInt(configuration.getConf0().getNewIP())); //Semantic in federates: false -> only routing
radioConfig1.setSubnetAddress(inet4ToInt(configuration.getConf0().getNewSubnet()));
radioConfig1.setTransmissionPower(configuration.getConf0().getNewPower());
radioConfig1.setTransmissionPower((int) configuration.getConf0().getNewPower());
radioConfig1.setPrimaryRadioChannel(translateChannel(configuration.getConf0().getChannel0()));
if (configuration.getConf0().getMode() == InterfaceConfiguration.MultiChannelMode.ALTERNATING) {
radioConfig1.setSecondaryRadioChannel(translateChannel(configuration.getConf0().getChannel1()));
Expand All @@ -486,7 +487,7 @@ public int writeConfigMessage(long time, int msgID, int externalId, AdHocConfigu
radioConfig2.setReceivingMessages(false); //!!Semantic in Java: true -> only routing
radioConfig2.setIpAddress(inet4ToInt(configuration.getConf1().getNewIP())); //Semantic in federates: false -> only routing
radioConfig2.setSubnetAddress(inet4ToInt(configuration.getConf1().getNewSubnet()));
radioConfig2.setTransmissionPower(configuration.getConf1().getNewPower());
radioConfig2.setTransmissionPower((int) configuration.getConf1().getNewPower());
radioConfig2.setPrimaryRadioChannel(translateChannel(configuration.getConf1().getChannel0()));
if (configuration.getConf1().getMode() == InterfaceConfiguration.MultiChannelMode.ALTERNATING) {
radioConfig2.setSecondaryRadioChannel(translateChannel(configuration.getConf1().getChannel1()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ message ConfigureRadioMessage {
required bool receiving_messages = 1; //Determines whether the radio receives messages or only routes
required uint32 ip_address = 2;
required uint32 subnet_address = 3;
required double transmission_power = 4;
required uint32 transmission_power = 4;
enum RadioMode {
SINGLE_CHANNEL = 1;
DUAL_CHANNEL = 2;
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
<version.justify>1.1.0</version.justify><!-- 1.1.0 is approved in CQ22341 -->
<version.logback>1.5.0</version.logback><!-- 1.5.0 is approved in #13282 and 13283 -->
<version.mockito>5.6.0</version.mockito><!-- approval not required, we do not ship this library -->
<version.protobuf>3.8.0</version.protobuf><!-- 3.8.0 is approved in CQ20405 -->
<version.protobuf>3.23.2</version.protobuf><!-- 3.8.0 is approved in #8634 -->
<version.slf4j>2.0.12</version.slf4j><!-- 2.0.12 is approved #13344 -->
<version.sqlite-jdbc>3.42.0.0</version.sqlite-jdbc><!-- 3.42.0.0 is approved in #9089 -->
<!-- note, when upgrading, the field LibSumoAmbassador#VALID_LIBSUMO_VERSIONS needs to be changed too -->
Expand Down

0 comments on commit cbaef6f

Please sign in to comment.