packet pad: make parameters unsigned

This commit is contained in:
Bastian Bloessl
2013-06-05 08:22:55 +02:00
parent 9bd3e7d45f
commit 87269f084c
3 changed files with 6 additions and 6 deletions
+3
View File
@@ -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>
+1 -1
View File
@@ -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);
};
+2 -5
View File
@@ -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));
}