packet pad: make parameters unsigned
This commit is contained in:
@@ -37,6 +37,9 @@
|
||||
<type>int</type>
|
||||
</param>
|
||||
|
||||
<check>$pad_front >= 0</check>
|
||||
<check>$pad_tail >= 0</check>
|
||||
|
||||
<sink>
|
||||
<name>in</name>
|
||||
<type>complex</type>
|
||||
|
||||
@@ -28,7 +28,7 @@ class FOO_API packet_pad : virtual public gr::block
|
||||
public:
|
||||
|
||||
typedef boost::shared_ptr<packet_pad> sptr;
|
||||
static sptr make(bool debug = false, int pad_front = 0, int pad_tail = 0);
|
||||
static sptr make(bool debug = false, unsigned int pad_front = 0, unsigned int pad_tail = 0);
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -29,16 +29,13 @@ static const int SYMBOL_LENGTH = 80;
|
||||
#define dout d_debug && std::cout
|
||||
|
||||
public:
|
||||
packet_pad_impl(bool debug, int pad_front, int pad_tail) : block("packet_pad",
|
||||
packet_pad_impl(bool debug, unsigned int pad_front, unsigned int pad_tail) : block("packet_pad",
|
||||
gr::io_signature::make(1, 1, sizeof(gr_complex)),
|
||||
gr::io_signature::make(1, 1, sizeof(gr_complex))),
|
||||
d_debug(debug), d_pad_front(pad_front),
|
||||
d_pad_tail(pad_tail), d_front_left(0),
|
||||
d_tail_left(0), d_frame_left(0), d_state(IDLE) {
|
||||
|
||||
assert(pad_front >= 0);
|
||||
assert(pad_tail >= 0);
|
||||
|
||||
set_relative_rate(1);
|
||||
set_output_multiple(SYMBOL_LENGTH);
|
||||
set_tag_propagation_policy(block::TPP_DONT);
|
||||
@@ -232,6 +229,6 @@ private:
|
||||
};
|
||||
|
||||
packet_pad::sptr
|
||||
packet_pad::make(bool debug, int pad_front, int pad_tail) {
|
||||
packet_pad::make(bool debug, unsigned int pad_front, unsigned int pad_tail) {
|
||||
return gnuradio::get_initial_sptr(new packet_pad_impl(debug, pad_front, pad_tail));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user