INET Framework for OMNeT++/OMNEST
inet::physicallayer::CommunicationCacheBase Class Referenceabstract

#include <CommunicationCacheBase.h>

Inheritance diagram for inet::physicallayer::CommunicationCacheBase:
inet::physicallayer::ICommunicationCache inet::physicallayer::IPrintableObject inet::physicallayer::MapCommunicationCache inet::physicallayer::ReferenceCommunicationCache inet::physicallayer::VectorCommunicationCache

Classes

class  RadioCacheEntry
 Caches the intermediate computation results related to a radio. More...
 
class  ReceptionCacheEntry
 Caches the intermediate computation results related to a reception. More...
 
class  TransmissionCacheEntry
 Caches the intermediate computation results related to a transmission. More...
 

Public Member Functions

 CommunicationCacheBase ()
 
virtual ~CommunicationCacheBase ()
 
Interference cache
virtual std::vector< const ITransmission * > * computeInterferingTransmissions (const IRadio *radio, const simtime_t startTime, const simtime_t endTime) override
 
Transmission cache
virtual const simtime_t getCachedInterferenceEndTime (const ITransmission *transmission) override
 
virtual void setCachedInterferenceEndTime (const ITransmission *transmission, const simtime_t interferenceEndTime) override
 
virtual void removeCachedInterferenceEndTime (const ITransmission *transmission) override
 
virtual const IRadioFramegetCachedFrame (const ITransmission *transmission) override
 
virtual void setCachedFrame (const ITransmission *transmission, const IRadioFrame *frame) override
 
virtual void removeCachedFrame (const ITransmission *transmission) override
 
Reception cache
virtual const IArrivalgetCachedArrival (const IRadio *receiver, const ITransmission *transmission) override
 
virtual void setCachedArrival (const IRadio *receiver, const ITransmission *transmission, const IArrival *arrival) override
 
virtual void removeCachedArrival (const IRadio *receiver, const ITransmission *transmission) override
 
virtual const IntervalgetCachedInterval (const IRadio *receiver, const ITransmission *transmission) override
 
virtual void setCachedInterval (const IRadio *receiver, const ITransmission *transmission, const Interval *interval) override
 
virtual void removeCachedInterval (const IRadio *receiver, const ITransmission *transmission) override
 
virtual const IListeninggetCachedListening (const IRadio *receiver, const ITransmission *transmission) override
 
virtual void setCachedListening (const IRadio *receiver, const ITransmission *transmission, const IListening *listening) override
 
virtual void removeCachedListening (const IRadio *receiver, const ITransmission *transmission) override
 
virtual const IReceptiongetCachedReception (const IRadio *receiver, const ITransmission *transmission) override
 
virtual void setCachedReception (const IRadio *receiver, const ITransmission *transmission, const IReception *reception) override
 
virtual void removeCachedReception (const IRadio *receiver, const ITransmission *transmission) override
 
virtual const IInterferencegetCachedInterference (const IRadio *receiver, const ITransmission *transmission) override
 
virtual void setCachedInterference (const IRadio *receiver, const ITransmission *transmission, const IInterference *interference) override
 
virtual void removeCachedInterference (const IRadio *receiver, const ITransmission *transmission) override
 
virtual const INoisegetCachedNoise (const IRadio *receiver, const ITransmission *transmission) override
 
virtual void setCachedNoise (const IRadio *receiver, const ITransmission *transmission, const INoise *noise) override
 
virtual void removeCachedNoise (const IRadio *receiver, const ITransmission *transmission) override
 
virtual const ISNIRgetCachedSNIR (const IRadio *receiver, const ITransmission *transmission) override
 
virtual void setCachedSNIR (const IRadio *receiver, const ITransmission *transmission, const ISNIR *snir) override
 
virtual void removeCachedSNIR (const IRadio *receiver, const ITransmission *transmission) override
 
virtual const IReceptionDecisiongetCachedReceptionDecision (const IRadio *receiver, const ITransmission *transmission, IRadioSignal::SignalPart part) override
 
virtual void setCachedReceptionDecision (const IRadio *receiver, const ITransmission *transmission, IRadioSignal::SignalPart part, const IReceptionDecision *receptionDecision) override
 
virtual void removeCachedReceptionDecision (const IRadio *receiver, const ITransmission *transmission, IRadioSignal::SignalPart part) override
 
virtual const IReceptionResultgetCachedReceptionResult (const IRadio *receiver, const ITransmission *transmission) override
 
virtual void setCachedReceptionResult (const IRadio *receiver, const ITransmission *transmission, const IReceptionResult *receptionResult) override
 
virtual void removeCachedReceptionResult (const IRadio *receiver, const ITransmission *transmission) override
 
virtual const IRadioFramegetCachedFrame (const IRadio *receiver, const ITransmission *transmission) override
 
virtual void setCachedFrame (const IRadio *receiver, const ITransmission *transmission, const IRadioFrame *frame) override
 
virtual void removeCachedFrame (const IRadio *receiver, const ITransmission *transmission) override
 
- Public Member Functions inherited from inet::physicallayer::ICommunicationCache
virtual void addRadio (const IRadio *radio)=0
 
virtual void removeRadio (const IRadio *radio)=0
 
virtual void addTransmission (const ITransmission *transmission)=0
 
virtual void removeTransmission (const ITransmission *transmission)=0
 
virtual void removeNonInterferingTransmissions ()=0
 
- Public Member Functions inherited from inet::physicallayer::IPrintableObject
virtual ~IPrintableObject ()
 
virtual std::ostream & printToStream (std::ostream &stream, int level) const
 Prints this object to the provided output stream. More...
 
virtual std::string getInfoStringRepresentation () const
 
virtual std::string getDetailStringRepresentation () const
 
virtual std::string getDebugStringRepresentation () const
 
virtual std::string getTraceStringRepresentation () const
 
virtual std::string getCompleteStringRepresentation () const
 

Protected Member Functions

Cache data structures
virtual RadioCacheEntrygetRadioCacheEntry (const IRadio *radio)=0
 
virtual TransmissionCacheEntrygetTransmissionCacheEntry (const ITransmission *transmission)=0
 
virtual ReceptionCacheEntrygetReceptionCacheEntry (const IRadio *radio, const ITransmission *transmission)=0
 

Additional Inherited Members

- Public Types inherited from inet::physicallayer::IPrintableObject
enum  PrintLevel {
  PRINT_LEVEL_TRACE, PRINT_LEVEL_DEBUG, PRINT_LEVEL_DETAIL, PRINT_LEVEL_INFO,
  PRINT_LEVEL_COMPLETE = INT_MIN
}
 

Constructor & Destructor Documentation

inet::physicallayer::CommunicationCacheBase::CommunicationCacheBase ( )
148 {
149 }
inet::physicallayer::CommunicationCacheBase::~CommunicationCacheBase ( )
virtual
152 {
153 }

Member Function Documentation

std::vector< const ITransmission * > * inet::physicallayer::CommunicationCacheBase::computeInterferingTransmissions ( const IRadio radio,
const simtime_t  startTime,
const simtime_t  endTime 
)
overridevirtual

Implements inet::physicallayer::ICommunicationCache.

Reimplemented in inet::physicallayer::ReferenceCommunicationCache.

156 {
157  RadioCacheEntry *radioCacheEntry = getRadioCacheEntry(radio);
158  std::vector<const ITransmission *> *interferingTransmissions = new std::vector<const ITransmission *>();
159  if (radioCacheEntry->receptionIntervals != nullptr) {
160  std::deque<const Interval *> interferingIntervals = radioCacheEntry->receptionIntervals->query(startTime, endTime);
161  for (auto interferingInterval : interferingIntervals) {
162  const ITransmission *interferingTransmission = (ITransmission *)interferingInterval->value;
163  interferingTransmissions->push_back(interferingTransmission);
164  }
165  }
166  return interferingTransmissions;
167 }
virtual RadioCacheEntry * getRadioCacheEntry(const IRadio *radio)=0
const IArrival * inet::physicallayer::CommunicationCacheBase::getCachedArrival ( const IRadio receiver,
const ITransmission transmission 
)
overridevirtual

Implements inet::physicallayer::ICommunicationCache.

200 {
201  ReceptionCacheEntry *cacheEntry = getReceptionCacheEntry(receiver, transmission);
202  return cacheEntry ? cacheEntry->arrival : nullptr;
203 }
virtual ReceptionCacheEntry * getReceptionCacheEntry(const IRadio *radio, const ITransmission *transmission)=0
const IRadioFrame * inet::physicallayer::CommunicationCacheBase::getCachedFrame ( const ITransmission transmission)
overridevirtual

Implements inet::physicallayer::ICommunicationCache.

185 {
186  return getTransmissionCacheEntry(transmission)->frame;
187 }
virtual TransmissionCacheEntry * getTransmissionCacheEntry(const ITransmission *transmission)=0
const IRadioFrame * frame
The radio frame that was created by the transmitter is never nullptr.
Definition: CommunicationCacheBase.h:100
const IRadioFrame * inet::physicallayer::CommunicationCacheBase::getCachedFrame ( const IRadio receiver,
const ITransmission transmission 
)
overridevirtual

Implements inet::physicallayer::ICommunicationCache.

408 {
409  ReceptionCacheEntry *cacheEntry = getReceptionCacheEntry(receiver, transmission);
410  return cacheEntry ? cacheEntry->frame : nullptr;
411 }
virtual ReceptionCacheEntry * getReceptionCacheEntry(const IRadio *radio, const ITransmission *transmission)=0
const IInterference * inet::physicallayer::CommunicationCacheBase::getCachedInterference ( const IRadio receiver,
const ITransmission transmission 
)
overridevirtual

Implements inet::physicallayer::ICommunicationCache.

Reimplemented in inet::physicallayer::ReferenceCommunicationCache.

292 {
293  ReceptionCacheEntry *cacheEntry = getReceptionCacheEntry(receiver, transmission);
294  return cacheEntry ? cacheEntry->interference : nullptr;
295 }
virtual ReceptionCacheEntry * getReceptionCacheEntry(const IRadio *radio, const ITransmission *transmission)=0
const simtime_t inet::physicallayer::CommunicationCacheBase::getCachedInterferenceEndTime ( const ITransmission transmission)
overridevirtual

Implements inet::physicallayer::ICommunicationCache.

170 {
171  return getTransmissionCacheEntry(transmission)->interferenceEndTime;
172 }
virtual TransmissionCacheEntry * getTransmissionCacheEntry(const ITransmission *transmission)=0
simtime_t interferenceEndTime
The last moment when this transmission may have any effect on other transmissions by interfering with...
Definition: CommunicationCacheBase.h:96
const Interval * inet::physicallayer::CommunicationCacheBase::getCachedInterval ( const IRadio receiver,
const ITransmission transmission 
)
overridevirtual

Implements inet::physicallayer::ICommunicationCache.

222 {
223  ReceptionCacheEntry *cacheEntry = getReceptionCacheEntry(receiver, transmission);
224  return cacheEntry ? cacheEntry->interval : nullptr;
225 }
virtual ReceptionCacheEntry * getReceptionCacheEntry(const IRadio *radio, const ITransmission *transmission)=0
const IListening * inet::physicallayer::CommunicationCacheBase::getCachedListening ( const IRadio receiver,
const ITransmission transmission 
)
overridevirtual

Implements inet::physicallayer::ICommunicationCache.

248 {
249  ReceptionCacheEntry *cacheEntry = getReceptionCacheEntry(receiver, transmission);
250  return cacheEntry ? cacheEntry->listening : nullptr;
251 }
virtual ReceptionCacheEntry * getReceptionCacheEntry(const IRadio *radio, const ITransmission *transmission)=0
const INoise * inet::physicallayer::CommunicationCacheBase::getCachedNoise ( const IRadio receiver,
const ITransmission transmission 
)
overridevirtual

Implements inet::physicallayer::ICommunicationCache.

Reimplemented in inet::physicallayer::ReferenceCommunicationCache.

314 {
315  ReceptionCacheEntry *cacheEntry = getReceptionCacheEntry(receiver, transmission);
316  return cacheEntry ? cacheEntry->noise : nullptr;
317 }
virtual ReceptionCacheEntry * getReceptionCacheEntry(const IRadio *radio, const ITransmission *transmission)=0
const IReception * inet::physicallayer::CommunicationCacheBase::getCachedReception ( const IRadio receiver,
const ITransmission transmission 
)
overridevirtual

Implements inet::physicallayer::ICommunicationCache.

Reimplemented in inet::physicallayer::ReferenceCommunicationCache.

270 {
271  ReceptionCacheEntry *cacheEntry = getReceptionCacheEntry(receiver, transmission);
272  return cacheEntry ? cacheEntry->reception : nullptr;
273 }
virtual ReceptionCacheEntry * getReceptionCacheEntry(const IRadio *radio, const ITransmission *transmission)=0
const IReceptionDecision * inet::physicallayer::CommunicationCacheBase::getCachedReceptionDecision ( const IRadio receiver,
const ITransmission transmission,
IRadioSignal::SignalPart  part 
)
overridevirtual

Implements inet::physicallayer::ICommunicationCache.

Reimplemented in inet::physicallayer::ReferenceCommunicationCache.

358 {
359  ReceptionCacheEntry *cacheEntry = getReceptionCacheEntry(receiver, transmission);
360  if (cacheEntry != nullptr)
361  cacheEntry->receptionDecisions.resize(part + 1);
362  return cacheEntry ? cacheEntry->receptionDecisions[part] : nullptr;
363 }
virtual ReceptionCacheEntry * getReceptionCacheEntry(const IRadio *radio, const ITransmission *transmission)=0
const IReceptionResult * inet::physicallayer::CommunicationCacheBase::getCachedReceptionResult ( const IRadio receiver,
const ITransmission transmission 
)
overridevirtual

Implements inet::physicallayer::ICommunicationCache.

386 {
387  ReceptionCacheEntry *cacheEntry = getReceptionCacheEntry(receiver, transmission);
388  return cacheEntry ? cacheEntry->receptionResult : nullptr;
389 }
virtual ReceptionCacheEntry * getReceptionCacheEntry(const IRadio *radio, const ITransmission *transmission)=0
const ISNIR * inet::physicallayer::CommunicationCacheBase::getCachedSNIR ( const IRadio receiver,
const ITransmission transmission 
)
overridevirtual

Implements inet::physicallayer::ICommunicationCache.

Reimplemented in inet::physicallayer::ReferenceCommunicationCache.

336 {
337  ReceptionCacheEntry *cacheEntry = getReceptionCacheEntry(receiver, transmission);
338  return cacheEntry ? cacheEntry->snir : nullptr;
339 }
virtual ReceptionCacheEntry * getReceptionCacheEntry(const IRadio *radio, const ITransmission *transmission)=0
virtual RadioCacheEntry* inet::physicallayer::CommunicationCacheBase::getRadioCacheEntry ( const IRadio radio)
protectedpure virtual
void inet::physicallayer::CommunicationCacheBase::removeCachedArrival ( const IRadio receiver,
const ITransmission transmission 
)
overridevirtual

Implements inet::physicallayer::ICommunicationCache.

215 {
216  ReceptionCacheEntry *cacheEntry = getReceptionCacheEntry(receiver, transmission);
217  if (cacheEntry != nullptr)
218  cacheEntry->arrival = nullptr;
219 }
virtual ReceptionCacheEntry * getReceptionCacheEntry(const IRadio *radio, const ITransmission *transmission)=0
void inet::physicallayer::CommunicationCacheBase::removeCachedFrame ( const ITransmission transmission)
overridevirtual

Implements inet::physicallayer::ICommunicationCache.

195 {
196  getTransmissionCacheEntry(transmission)->frame = nullptr;
197 }
virtual TransmissionCacheEntry * getTransmissionCacheEntry(const ITransmission *transmission)=0
const IRadioFrame * frame
The radio frame that was created by the transmitter is never nullptr.
Definition: CommunicationCacheBase.h:100
void inet::physicallayer::CommunicationCacheBase::removeCachedFrame ( const IRadio receiver,
const ITransmission transmission 
)
overridevirtual

Implements inet::physicallayer::ICommunicationCache.

423 {
424  ReceptionCacheEntry *cacheEntry = getReceptionCacheEntry(receiver, transmission);
425  if (cacheEntry != nullptr)
426  cacheEntry->frame = nullptr;
427 }
virtual ReceptionCacheEntry * getReceptionCacheEntry(const IRadio *radio, const ITransmission *transmission)=0
void inet::physicallayer::CommunicationCacheBase::removeCachedInterference ( const IRadio receiver,
const ITransmission transmission 
)
overridevirtual

Implements inet::physicallayer::ICommunicationCache.

307 {
308  ReceptionCacheEntry *cacheEntry = getReceptionCacheEntry(receiver, transmission);
309  if (cacheEntry != nullptr)
310  cacheEntry->interference = nullptr;
311 }
virtual ReceptionCacheEntry * getReceptionCacheEntry(const IRadio *radio, const ITransmission *transmission)=0
void inet::physicallayer::CommunicationCacheBase::removeCachedInterferenceEndTime ( const ITransmission transmission)
overridevirtual

Implements inet::physicallayer::ICommunicationCache.

180 {
182 }
virtual TransmissionCacheEntry * getTransmissionCacheEntry(const ITransmission *transmission)=0
simtime_t interferenceEndTime
The last moment when this transmission may have any effect on other transmissions by interfering with...
Definition: CommunicationCacheBase.h:96
void inet::physicallayer::CommunicationCacheBase::removeCachedInterval ( const IRadio receiver,
const ITransmission transmission 
)
overridevirtual

Implements inet::physicallayer::ICommunicationCache.

241 {
242  ReceptionCacheEntry *cacheEntry = getReceptionCacheEntry(receiver, transmission);
243  if (cacheEntry != nullptr)
244  cacheEntry->interval = nullptr;
245 }
virtual ReceptionCacheEntry * getReceptionCacheEntry(const IRadio *radio, const ITransmission *transmission)=0
void inet::physicallayer::CommunicationCacheBase::removeCachedListening ( const IRadio receiver,
const ITransmission transmission 
)
overridevirtual

Implements inet::physicallayer::ICommunicationCache.

263 {
264  ReceptionCacheEntry *cacheEntry = getReceptionCacheEntry(receiver, transmission);
265  if (cacheEntry != nullptr)
266  cacheEntry->listening = nullptr;
267 }
virtual ReceptionCacheEntry * getReceptionCacheEntry(const IRadio *radio, const ITransmission *transmission)=0
void inet::physicallayer::CommunicationCacheBase::removeCachedNoise ( const IRadio receiver,
const ITransmission transmission 
)
overridevirtual

Implements inet::physicallayer::ICommunicationCache.

329 {
330  ReceptionCacheEntry *cacheEntry = getReceptionCacheEntry(receiver, transmission);
331  if (cacheEntry != nullptr)
332  cacheEntry->noise = nullptr;
333 }
virtual ReceptionCacheEntry * getReceptionCacheEntry(const IRadio *radio, const ITransmission *transmission)=0
void inet::physicallayer::CommunicationCacheBase::removeCachedReception ( const IRadio receiver,
const ITransmission transmission 
)
overridevirtual

Implements inet::physicallayer::ICommunicationCache.

285 {
286  ReceptionCacheEntry *cacheEntry = getReceptionCacheEntry(receiver, transmission);
287  if (cacheEntry != nullptr)
288  cacheEntry->reception = nullptr;
289 }
virtual ReceptionCacheEntry * getReceptionCacheEntry(const IRadio *radio, const ITransmission *transmission)=0
void inet::physicallayer::CommunicationCacheBase::removeCachedReceptionDecision ( const IRadio receiver,
const ITransmission transmission,
IRadioSignal::SignalPart  part 
)
overridevirtual

Implements inet::physicallayer::ICommunicationCache.

377 {
378  ReceptionCacheEntry *cacheEntry = getReceptionCacheEntry(receiver, transmission);
379  if (cacheEntry != nullptr) {
380  cacheEntry->receptionDecisions.resize(part + 1);
381  cacheEntry->receptionDecisions[part] = nullptr;
382  }
383 }
virtual ReceptionCacheEntry * getReceptionCacheEntry(const IRadio *radio, const ITransmission *transmission)=0
void inet::physicallayer::CommunicationCacheBase::removeCachedReceptionResult ( const IRadio receiver,
const ITransmission transmission 
)
overridevirtual

Implements inet::physicallayer::ICommunicationCache.

401 {
402  ReceptionCacheEntry *cacheEntry = getReceptionCacheEntry(receiver, transmission);
403  if (cacheEntry != nullptr)
404  cacheEntry->receptionResult = nullptr;
405 }
virtual ReceptionCacheEntry * getReceptionCacheEntry(const IRadio *radio, const ITransmission *transmission)=0
void inet::physicallayer::CommunicationCacheBase::removeCachedSNIR ( const IRadio receiver,
const ITransmission transmission 
)
overridevirtual

Implements inet::physicallayer::ICommunicationCache.

351 {
352  ReceptionCacheEntry *cacheEntry = getReceptionCacheEntry(receiver, transmission);
353  if (cacheEntry != nullptr)
354  cacheEntry->snir = nullptr;
355 }
virtual ReceptionCacheEntry * getReceptionCacheEntry(const IRadio *radio, const ITransmission *transmission)=0
void inet::physicallayer::CommunicationCacheBase::setCachedArrival ( const IRadio receiver,
const ITransmission transmission,
const IArrival arrival 
)
overridevirtual

Implements inet::physicallayer::ICommunicationCache.

206 {
207  ReceptionCacheEntry *cacheEntry = getReceptionCacheEntry(receiver, transmission);
208  if (cacheEntry == nullptr)
209  throw cRuntimeError("Cache entry not found");
210  else
211  cacheEntry->arrival = arrival;
212 }
virtual ReceptionCacheEntry * getReceptionCacheEntry(const IRadio *radio, const ITransmission *transmission)=0
void inet::physicallayer::CommunicationCacheBase::setCachedFrame ( const ITransmission transmission,
const IRadioFrame frame 
)
overridevirtual

Implements inet::physicallayer::ICommunicationCache.

190 {
191  getTransmissionCacheEntry(transmission)->frame = frame;
192 }
virtual TransmissionCacheEntry * getTransmissionCacheEntry(const ITransmission *transmission)=0
const IRadioFrame * frame
The radio frame that was created by the transmitter is never nullptr.
Definition: CommunicationCacheBase.h:100
void inet::physicallayer::CommunicationCacheBase::setCachedFrame ( const IRadio receiver,
const ITransmission transmission,
const IRadioFrame frame 
)
overridevirtual

Implements inet::physicallayer::ICommunicationCache.

414 {
415  ReceptionCacheEntry *cacheEntry = getReceptionCacheEntry(receiver, transmission);
416  if (cacheEntry == nullptr)
417  throw cRuntimeError("Cache entry not found");
418  else
419  cacheEntry->frame = frame;
420 }
virtual ReceptionCacheEntry * getReceptionCacheEntry(const IRadio *radio, const ITransmission *transmission)=0
void inet::physicallayer::CommunicationCacheBase::setCachedInterference ( const IRadio receiver,
const ITransmission transmission,
const IInterference interference 
)
overridevirtual

Implements inet::physicallayer::ICommunicationCache.

298 {
299  ReceptionCacheEntry *cacheEntry = getReceptionCacheEntry(receiver, transmission);
300  if (cacheEntry == nullptr)
301  throw cRuntimeError("Cache entry not found");
302  else
303  cacheEntry->interference = interference;
304 }
virtual ReceptionCacheEntry * getReceptionCacheEntry(const IRadio *radio, const ITransmission *transmission)=0
void inet::physicallayer::CommunicationCacheBase::setCachedInterferenceEndTime ( const ITransmission transmission,
const simtime_t  interferenceEndTime 
)
overridevirtual

Implements inet::physicallayer::ICommunicationCache.

175 {
176  getTransmissionCacheEntry(transmission)->interferenceEndTime = interferenceEndTime;
177 }
virtual TransmissionCacheEntry * getTransmissionCacheEntry(const ITransmission *transmission)=0
simtime_t interferenceEndTime
The last moment when this transmission may have any effect on other transmissions by interfering with...
Definition: CommunicationCacheBase.h:96
void inet::physicallayer::CommunicationCacheBase::setCachedInterval ( const IRadio receiver,
const ITransmission transmission,
const Interval interval 
)
overridevirtual

Implements inet::physicallayer::ICommunicationCache.

228 {
229  ReceptionCacheEntry *cacheEntry = getReceptionCacheEntry(receiver, transmission);
230  if (cacheEntry == nullptr)
231  throw cRuntimeError("Cache entry not found");
232  else
233  cacheEntry->interval = interval;
234  RadioCacheEntry *radioCacheEntry = getRadioCacheEntry(receiver);
235  if (radioCacheEntry->receptionIntervals == nullptr)
236  radioCacheEntry->receptionIntervals = new IntervalTree();
237  radioCacheEntry->receptionIntervals->insert(interval);
238 }
virtual ReceptionCacheEntry * getReceptionCacheEntry(const IRadio *radio, const ITransmission *transmission)=0
virtual RadioCacheEntry * getRadioCacheEntry(const IRadio *radio)=0
void inet::physicallayer::CommunicationCacheBase::setCachedListening ( const IRadio receiver,
const ITransmission transmission,
const IListening listening 
)
overridevirtual

Implements inet::physicallayer::ICommunicationCache.

254 {
255  ReceptionCacheEntry *cacheEntry = getReceptionCacheEntry(receiver, transmission);
256  if (cacheEntry == nullptr)
257  throw cRuntimeError("Cache entry not found");
258  else
259  cacheEntry->listening = listening;
260 }
virtual ReceptionCacheEntry * getReceptionCacheEntry(const IRadio *radio, const ITransmission *transmission)=0
void inet::physicallayer::CommunicationCacheBase::setCachedNoise ( const IRadio receiver,
const ITransmission transmission,
const INoise noise 
)
overridevirtual

Implements inet::physicallayer::ICommunicationCache.

320 {
321  ReceptionCacheEntry *cacheEntry = getReceptionCacheEntry(receiver, transmission);
322  if (cacheEntry == nullptr)
323  throw cRuntimeError("Cache entry not found");
324  else
325  cacheEntry->noise = noise;
326 }
virtual ReceptionCacheEntry * getReceptionCacheEntry(const IRadio *radio, const ITransmission *transmission)=0
void inet::physicallayer::CommunicationCacheBase::setCachedReception ( const IRadio receiver,
const ITransmission transmission,
const IReception reception 
)
overridevirtual

Implements inet::physicallayer::ICommunicationCache.

276 {
277  ReceptionCacheEntry *cacheEntry = getReceptionCacheEntry(receiver, transmission);
278  if (cacheEntry == nullptr)
279  throw cRuntimeError("Cache entry not found");
280  else
281  cacheEntry->reception = reception;
282 }
virtual ReceptionCacheEntry * getReceptionCacheEntry(const IRadio *radio, const ITransmission *transmission)=0
void inet::physicallayer::CommunicationCacheBase::setCachedReceptionDecision ( const IRadio receiver,
const ITransmission transmission,
IRadioSignal::SignalPart  part,
const IReceptionDecision receptionDecision 
)
overridevirtual

Implements inet::physicallayer::ICommunicationCache.

366 {
367  ReceptionCacheEntry *cacheEntry = getReceptionCacheEntry(receiver, transmission);
368  if (cacheEntry == nullptr)
369  throw cRuntimeError("Cache entry not found");
370  else {
371  cacheEntry->receptionDecisions.resize(part + 1);
372  cacheEntry->receptionDecisions[part] = receptionDecision;
373  }
374 }
virtual ReceptionCacheEntry * getReceptionCacheEntry(const IRadio *radio, const ITransmission *transmission)=0
void inet::physicallayer::CommunicationCacheBase::setCachedReceptionResult ( const IRadio receiver,
const ITransmission transmission,
const IReceptionResult receptionResult 
)
overridevirtual

Implements inet::physicallayer::ICommunicationCache.

392 {
393  ReceptionCacheEntry *cacheEntry = getReceptionCacheEntry(receiver, transmission);
394  if (cacheEntry == nullptr)
395  throw cRuntimeError("Cache entry not found");
396  else
397  cacheEntry->receptionResult = receptionResult;
398 }
virtual ReceptionCacheEntry * getReceptionCacheEntry(const IRadio *radio, const ITransmission *transmission)=0
void inet::physicallayer::CommunicationCacheBase::setCachedSNIR ( const IRadio receiver,
const ITransmission transmission,
const ISNIR snir 
)
overridevirtual

Implements inet::physicallayer::ICommunicationCache.

342 {
343  ReceptionCacheEntry *cacheEntry = getReceptionCacheEntry(receiver, transmission);
344  if (cacheEntry == nullptr)
345  throw cRuntimeError("Cache entry not found");
346  else
347  cacheEntry->snir = snir;
348 }
virtual ReceptionCacheEntry * getReceptionCacheEntry(const IRadio *radio, const ITransmission *transmission)=0

The documentation for this class was generated from the following files: