41 m_deviceAPI(deviceAPI),
43 m_settingsMutex(QMutex::Recursive)
107 for ( j=0; j <
max; j++)
110 text[j] =
toGray(bin >> 1);
120 for ( j=0; j < max / 2; j++)
122 text[j] = (text[j * 2 + 1] << 4) | (0xf & text[j * 2 + 0]);
124 if ((text[j] < 32 )||( text[j] > 126))
135 printf(
"%s\n", &text[1]);
195 short i, result, negresult, movpoint;
196 float peak, negpeak, tfloat;
213 peak = negpeak = 0.0f;
214 result = negresult = 0;
218 if (rev[i] > negpeak)
224 tfloat =
mov[
i] +
mov[LORA_SFFT_LEN +
i] +
mov[2 * LORA_SFFT_LEN +
i]
225 +
mov[3 * LORA_SFFT_LEN +
i] + mag[
i];
233 mov[movpoint * LORA_SFFT_LEN +
i] = mag[
i];
237 q = (result + 1) & (LORA_SFFT_LEN -1);
245 result =
synch(result);
255 void LoRaDemod::feed(
const SampleVector::const_iterator& begin,
const SampleVector::const_iterator& end,
bool pO)
265 for(SampleVector::const_iterator it = begin; it < end; ++it)
275 newangle =
detect(ci, cangle);
302 qDebug() <<
"LoRaDemod::handleMessage";
317 qDebug() <<
"LoRaDemod::handleMessage: MsgChannelizerNotification: m_sampleRate: " <<
m_sampleRate 330 qDebug() <<
"LoRaDemod::handleMessage: MsgConfigureChannelizer: sampleRate: " << cfg.
getSampleRate()
349 qDebug() <<
"LoRaDemod::handleMessage: MsgConfigureLoRaDemod: m_Bandwidth: " <<
m_Bandwidth;
int detect(Complex sample, Complex angle)
Complex nextIQ()
Return next complex sample.
bool decimate(Real *distance, const Complex &next, Complex *result)
void configure(MessageQueue *messageQueue, int sampleRate, int centerFrequency)
void push(Message *message, bool emitSignal=true)
Push message onto queue.
Fixed< IntType, IntBits > cos(Fixed< IntType, IntBits > const &x)
void removeChannelSinkAPI(ChannelAPI *channelAPI, int streamIndex=0)
void addChannelSinkAPI(ChannelAPI *channelAPI, int streamIndex=0)
void create(int phaseSteps, double sampleRate, double cutoff, double nbTapsPerPhase=4.5)
MessageQueue * getInputMessageQueue()
Get the queue for asynchronous inbound communication.
virtual bool deserialize(const QByteArray &data)
void prng6(char *inout, int size)
Real m_sampleDistanceRemain
int getSampleRate() const
DownChannelizer * m_channelizer
static const int bandwidths[]
virtual void feed(const SampleVector::const_iterator &begin, const SampleVector::const_iterator &end, bool positiveOnly)=0
MessageQueue m_inputMessageQueue
Queue for asynchronous inbound communication.
bool deserialize(const QByteArray &data)
void fetch(float *result)
static const QString m_channelId
BasebandSampleSink * m_sampleSink
virtual bool handleMessage(const Message &cmd)=0
Processing of a message. Returns true if message has actually been processed.
void run(const cmplx &input)
#define MESSAGE_CLASS_DEFINITION(Name, BaseClass)
Interpolator m_interpolator
Fixed< IntType, IntBits > sin(Fixed< IntType, IntBits > const &x)
static bool match(const Message *message)
void setFreq(Real freq, Real sampleRate)
void removeChannelSink(ThreadedBasebandSampleSink *sink, int streamIndex=0)
Remove a channel sink (Rx)
LoRaDemod(DeviceAPI *deviceAPI)
ThreadedBasebandSampleSink * m_threadedChannelizer
void interleave6(char *inout, int size)
void addChannelSink(ThreadedBasebandSampleSink *sink, int streamIndex=0)
Add a channel sink (Rx)
virtual bool handleMessage(const Message &cmd)
Processing of a message. Returns true if message has actually been processed.
LoRaDemodSettings m_settings
virtual void feed(const SampleVector::const_iterator &begin, const SampleVector::const_iterator &end, bool pO)
static const QString m_channelIdURI
QByteArray serialize() const
virtual QByteArray serialize() const
std::complex< Real > Complex
SampleVector m_sampleBuffer
qint64 getFrequencyOffset() const
T max(const T &x, const T &y)
void hamming6(char *inout, int size)