- added parameter 'gap time'
git-svn-id: http://moon:8086/svn/software/trunk/projects/GnuRadio@419 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
<key>jay_bit_slicer</key>
|
<key>jay_bit_slicer</key>
|
||||||
<category>[JAY]</category>
|
<category>[JAY]</category>
|
||||||
<import>import jay</import>
|
<import>import jay</import>
|
||||||
<make>jay.bit_slicer($sampleRate, $samplesPerSym, $kLoopFilter, $kThreshold, $doPrintPackets)</make>
|
<make>jay.bit_slicer($sampleRate, $samplesPerSym, $kLoopFilter, $kThreshold, $numGapBits, $doPrintPackets)</make>
|
||||||
<param>
|
<param>
|
||||||
<name>Samplerate</name>
|
<name>Samplerate</name>
|
||||||
<key>sampleRate</key>
|
<key>sampleRate</key>
|
||||||
@@ -26,6 +26,11 @@
|
|||||||
<value>0.1</value>
|
<value>0.1</value>
|
||||||
<type>float</type>
|
<type>float</type>
|
||||||
</param>
|
</param>
|
||||||
|
<param>
|
||||||
|
<name>Gap time</name>
|
||||||
|
<key>numGapBits</key>
|
||||||
|
<type>int</type>
|
||||||
|
</param>
|
||||||
<param>
|
<param>
|
||||||
<name>Print packets</name>
|
<name>Print packets</name>
|
||||||
<key>doPrintPackets</key>
|
<key>doPrintPackets</key>
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ namespace gr {
|
|||||||
* class. jay::bit_slicer::make is the public interface for
|
* class. jay::bit_slicer::make is the public interface for
|
||||||
* creating new instances.
|
* creating new instances.
|
||||||
*/
|
*/
|
||||||
static sptr make(int sampleRate, int samplesPerSym, float kLoopfilter, float kThreshold, int doPrintPackets);
|
static sptr make(int sampleRate, int samplesPerSym, float kLoopfilter, float kThreshold, int numGapBits, int doPrintPackets);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace jay
|
} // namespace jay
|
||||||
|
|||||||
@@ -33,15 +33,15 @@ namespace gr
|
|||||||
namespace jay
|
namespace jay
|
||||||
{
|
{
|
||||||
|
|
||||||
bit_slicer::sptr bit_slicer::make(int sampleRate, int samplesPerSym, float kLoopFilter, float kThreshold, int doPrintPackets)
|
bit_slicer::sptr bit_slicer::make(int sampleRate, int samplesPerSym, float kLoopFilter, float kThreshold, int numGapBits, int doPrintPackets)
|
||||||
{
|
{
|
||||||
return gnuradio::get_initial_sptr(new bit_slicer_impl(sampleRate, samplesPerSym, kLoopFilter, kThreshold, doPrintPackets));
|
return gnuradio::get_initial_sptr(new bit_slicer_impl(sampleRate, samplesPerSym, kLoopFilter, kThreshold, numGapBits, doPrintPackets));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The private constructor
|
* The private constructor
|
||||||
*/
|
*/
|
||||||
bit_slicer_impl::bit_slicer_impl(int sampleRate, int samplesPerSym, float kLoopFilter, float kThreshold, int doPrintPackets)
|
bit_slicer_impl::bit_slicer_impl(int sampleRate, int samplesPerSym, float kLoopFilter, float kThreshold, int numGapBits, int doPrintPackets)
|
||||||
: gr::block("bit_slicer", gr::io_signature::make(1, 1, sizeof(float)),
|
: gr::block("bit_slicer", gr::io_signature::make(1, 1, sizeof(float)),
|
||||||
gr::io_signature::make(1, 1, sizeof(float)))
|
gr::io_signature::make(1, 1, sizeof(float)))
|
||||||
, m_sampleRate(sampleRate)
|
, m_sampleRate(sampleRate)
|
||||||
@@ -62,7 +62,7 @@ bit_slicer_impl::bit_slicer_impl(int sampleRate, int samplesPerSym, float kLoopF
|
|||||||
, m_id_bit(0)
|
, m_id_bit(0)
|
||||||
, m_bitZeroCross(0)
|
, m_bitZeroCross(0)
|
||||||
, m_i(0)
|
, m_i(0)
|
||||||
, m_gapDistance(8*m_samplesPerSym)
|
, m_gapDistance(numGapBits*m_samplesPerSym)
|
||||||
, m_gapCounter(0)
|
, m_gapCounter(0)
|
||||||
, m_gapCounterEnable(0)
|
, m_gapCounterEnable(0)
|
||||||
, m_packetCounter(0)
|
, m_packetCounter(0)
|
||||||
@@ -198,7 +198,7 @@ int bit_slicer_impl::general_work (int noutput_items, gr_vector_int &ninput_item
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
out[outCount++] = (float)0xFFFFFFFF;
|
// out[outCount++] = (float)0xFFFFFFFF;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ class bit_slicer_impl : public bit_slicer
|
|||||||
bool stop() override;
|
bool stop() override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
bit_slicer_impl(int sampleRate, int samplesPerSym, float kLoopFilter, float kThreshold, int doPrintPackets);
|
bit_slicer_impl(int sampleRate, int samplesPerSym, float kLoopFilter, float kThreshold, int numGapBits, int doPrintPackets);
|
||||||
~bit_slicer_impl();
|
~bit_slicer_impl();
|
||||||
|
|
||||||
// Where all the action really happens
|
// Where all the action really happens
|
||||||
|
|||||||
Reference in New Issue
Block a user