Skip to content

Commit

Permalink
Merge branch 'inet-framework:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
aarizaq authored Oct 22, 2024
2 parents cf8fc15 + bc27466 commit 0972bda
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 10 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/chart-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ jobs:
echo "::endgroup::"
echo "::group::Installing Python packages"
python3 -m pip install --upgrade matplotlib numpy pandas seaborn scipy ipython posix-ipc cppyy sewar dask distributed optimparallel --break-system-packages
python3 -m venv $GITHUB_WORKSPACE/venv
source $GITHUB_WORKSPACE/venv/bin/activate
python3 -m pip install --upgrade matplotlib numpy pandas seaborn scipy ipython posix-ipc cppyy sewar dask distributed optimparallel requests
echo "::endgroup::"
source $GITHUB_WORKSPACE/inet/_scripts/github/build-inet.sh
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/statistical-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ jobs:
echo "::endgroup::"
echo "::group::Installing Python packages"
python3 -m pip install --upgrade matplotlib numpy pandas seaborn scipy ipython posix-ipc cppyy sewar dask distributed optimparallel --break-system-packages
python3 -m venv $GITHUB_WORKSPACE/venv
source $GITHUB_WORKSPACE/venv/bin/activate
python3 -m pip install --upgrade matplotlib numpy pandas seaborn scipy ipython posix-ipc cppyy sewar dask distributed optimparallel requests
echo "::endgroup::"
source $GITHUB_WORKSPACE/inet/_scripts/github/build-inet.sh
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/validation-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ jobs:
echo "::endgroup::"
echo "::group::Installing Python packages"
python3 -m pip install --upgrade matplotlib numpy pandas seaborn scipy ipython posix-ipc cppyy sewar dask distributed optimparallel --break-system-packages
python3 -m venv $GITHUB_WORKSPACE/venv
source $GITHUB_WORKSPACE/venv/bin/activate
python3 -m pip install --upgrade matplotlib numpy pandas seaborn scipy ipython posix-ipc cppyy sewar dask distributed optimparallel requests
echo "::endgroup::"
source $GITHUB_WORKSPACE/inet/_scripts/github/build-inet.sh
Expand Down
2 changes: 2 additions & 0 deletions src/inet/applications/voipstream/AudioOutFile.cc
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,8 @@ bool AudioOutFile::close()
// free the stream
avformat_free_context(oc);
oc = nullptr;

avcodec_free_context(&codecCtx);
return true;
}

Expand Down
2 changes: 2 additions & 0 deletions src/inet/applications/voipstream/VoipStreamSender.cc
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ void VoipStreamSender::finish()
if (pFormatCtx) {
avformat_close_input(&pFormatCtx);
}
if (pCodecCtx)
avcodec_free_context(&pCodecCtx);
}

void VoipStreamSender::openSoundFile(const char *name)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -357,11 +357,16 @@ const Ieee80211HtMode *Ieee80211HtCompliantModes::getCompliantMode(const Ieee802
Ieee80211Htmcs::~Ieee80211Htmcs()
{
delete code;
delete stream1Modulation;
delete stream2Modulation;
delete stream3Modulation;
delete stream4Modulation;
}

Ieee80211HtSignalMode::~Ieee80211HtSignalMode()
{
delete code;
delete modulation;
}

const DI<Ieee80211Htmcs> Ieee80211HtmcsTable::htMcs0BW20MHz([](){ return new Ieee80211Htmcs(0, &BpskModulation::singleton, &Ieee80211OfdmCompliantCodes::ofdmConvolutionalCode1_2, MHz(20));});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ class INET_API Ieee80211OfdmModulation : public IModulation
public:
Ieee80211OfdmModulation(int numSubcarriers, const ApskModulationBase *subcarrierModulation);

virtual cObject *dup() const override { return new Ieee80211OfdmModulation(numSubcarriers, subcarrierModulation); }

virtual int getNumSubcarriers() const { return numSubcarriers; }
const ApskModulationBase *getSubcarrierModulation() const { return subcarrierModulation; }

Expand Down
22 changes: 15 additions & 7 deletions src/inet/physicallayer/wireless/ieee80211/mode/Ieee80211VhtMode.cc
Original file line number Diff line number Diff line change
Expand Up @@ -204,19 +204,19 @@ Ieee80211Vhtmcs::Ieee80211Vhtmcs(unsigned int mcsIndex, const ApskModulationBase
bandwidth(bandwidth)
{
if (nss > 1)
stream2Modulation = stream1Modulation;
stream2Modulation = static_cast<Ieee80211OfdmModulation *>(stream1Modulation->dup());
if (nss > 2)
stream3Modulation = stream1Modulation;
stream3Modulation = static_cast<Ieee80211OfdmModulation *>(stream1Modulation->dup());
if (nss > 3)
stream4Modulation = stream1Modulation;
stream4Modulation = static_cast<Ieee80211OfdmModulation *>(stream1Modulation->dup());
if (nss > 4)
stream5Modulation = stream1Modulation;
stream5Modulation = static_cast<Ieee80211OfdmModulation *>(stream1Modulation->dup());
if (nss > 5)
stream6Modulation = stream1Modulation;
stream6Modulation = static_cast<Ieee80211OfdmModulation *>(stream1Modulation->dup());
if (nss > 6)
stream7Modulation = stream1Modulation;
stream7Modulation = static_cast<Ieee80211OfdmModulation *>(stream1Modulation->dup());
if (nss > 7)
stream8Modulation = stream1Modulation;
stream8Modulation = static_cast<Ieee80211OfdmModulation *>(stream1Modulation->dup());
code = Ieee80211VhtCompliantCodes::getCompliantCode(convolutionalCode, stream1Modulation, stream2Modulation, stream3Modulation, stream4Modulation, stream5Modulation, stream6Modulation, stream7Modulation, stream8Modulation, bandwidth);
}

Expand Down Expand Up @@ -709,6 +709,14 @@ const Ieee80211VhtMode *Ieee80211VhtCompliantModes::getCompliantMode(const Ieee8
Ieee80211Vhtmcs::~Ieee80211Vhtmcs()
{
delete code;
delete stream1Modulation;
delete stream2Modulation;
delete stream3Modulation;
delete stream4Modulation;
delete stream5Modulation;
delete stream6Modulation;
delete stream7Modulation;
delete stream8Modulation;
}

Ieee80211VhtSignalMode::~Ieee80211VhtSignalMode()
Expand Down

0 comments on commit 0972bda

Please sign in to comment.