INET Framework for OMNeT++/OMNEST
inet::physicallayer::ScalarAnalogDigitalConverter Class Reference

#include <AnalogDigitalConverter.h>

Inheritance diagram for inet::physicallayer::ScalarAnalogDigitalConverter:
inet::physicallayer::IAnalogDigitalConverter inet::physicallayer::IPrintableObject

Public Member Functions

 ScalarAnalogDigitalConverter ()
 
virtual const IReceptionSampleModelconvertAnalogToDigital (const IReceptionAnalogModel *analogModel) const override
 
- 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 Attributes

W power
 
Hz carrierFrequency
 
Hz bandwidth
 
double sampleRate
 

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::ScalarAnalogDigitalConverter::ScalarAnalogDigitalConverter ( )
24  :
25  power(W(NaN)),
27  bandwidth(Hz(NaN)),
29 {}
pow< s,-1 > Hz
Definition: Units.h:766
W power
Definition: AnalogDigitalConverter.h:32
compose< J, pow< s,-1 > > W
Definition: Units.h:770
#define NaN
Definition: INETMath.h:103
Hz carrierFrequency
Definition: AnalogDigitalConverter.h:34
Hz bandwidth
Definition: AnalogDigitalConverter.h:35
double sampleRate
Definition: AnalogDigitalConverter.h:36

Member Function Documentation

const IReceptionSampleModel * inet::physicallayer::ScalarAnalogDigitalConverter::convertAnalogToDigital ( const IReceptionAnalogModel analogModel) const
overridevirtual

Implements inet::physicallayer::IAnalogDigitalConverter.

32 {
33  const simtime_t duration = analogModel->getDuration();
34  const int sampleLength = std::ceil(duration.dbl() / sampleRate);
35  return new ReceptionSampleModel(sampleLength, sampleRate, nullptr, W(0));
36 }
compose< J, pow< s,-1 > > W
Definition: Units.h:770
double sampleRate
Definition: AnalogDigitalConverter.h:36

Member Data Documentation

Hz inet::physicallayer::ScalarAnalogDigitalConverter::bandwidth
protected
Hz inet::physicallayer::ScalarAnalogDigitalConverter::carrierFrequency
protected
W inet::physicallayer::ScalarAnalogDigitalConverter::power
protected
double inet::physicallayer::ScalarAnalogDigitalConverter::sampleRate
protected

Referenced by convertAnalogToDigital().


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