Hello everybody!
I am working on INET layered transmission for my project and am using 5 nodes having APSK Layered Transmitter and Receiver.
The problem is that whenever one of the radios transmits, the following runtime error occurs:
check_and_cast(): Cannot cast (inet::physicallayer::LayeredReception*) to type 'const inet::physicallayer::ScalarReception *' -- in module (inet::physicallayer::ApskRadio)
This happens in the following code fragment in the ApskLayeredReciver::computeNoise():
for (auto reception : *interferingReceptions) {
const ISignalAnalogModel *signalAnalogModel = reception->getAnalogModel();
const INarrowbandSignal *narrowbandSignalAnalogModel = check_and_cast<const INarrowbandSignal *>(signalAnalogModel);
Hz signalCarrierFrequency = narrowbandSignalAnalogModel->getCarrierFrequency();
Hz signalBandwidth = narrowbandSignalAnalogModel->getBandwidth();
if (commonCarrierFrequency == signalCarrierFrequency && commonBandwidth >= signalBandwidth)
addReception(check_and_cast<const ScalarReception *>(reception), noiseStartTime, noiseEndTime, powerChanges);
I tried to recreate this error in layeredApsk example but found that in that case, the control nevers flows into the for loop.
Can anyone please help me with this?
bests,
Nikita