diff options
Diffstat (limited to 'gnuradio-core/src/lib/io/gr_pdu.cc')
-rw-r--r-- | gnuradio-core/src/lib/io/gr_pdu.cc | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/gnuradio-core/src/lib/io/gr_pdu.cc b/gnuradio-core/src/lib/io/gr_pdu.cc index b2757c307..302fd7b9b 100644 --- a/gnuradio-core/src/lib/io/gr_pdu.cc +++ b/gnuradio-core/src/lib/io/gr_pdu.cc @@ -29,11 +29,11 @@ size_t gr_pdu_itemsize(gr_pdu_vector_type type){ switch(type){ - case BYTE: + case pdu_byte: return 1; - case FLOAT: + case pdu_float: return sizeof(float); - case COMPLEX: + case pdu_complex: return sizeof(gr_complex); default: throw std::runtime_error("bad type!"); @@ -43,11 +43,11 @@ gr_pdu_itemsize(gr_pdu_vector_type type){ bool gr_pdu_type_matches(gr_pdu_vector_type type, pmt::pmt_t v){ switch(type){ - case BYTE: + case pdu_byte: return pmt::pmt_is_u8vector(v); - case FLOAT: + case pdu_float: return pmt::pmt_is_f32vector(v); - case COMPLEX: + case pdu_complex: return pmt::pmt_is_c32vector(v); default: throw std::runtime_error("bad type!"); @@ -57,11 +57,11 @@ gr_pdu_type_matches(gr_pdu_vector_type type, pmt::pmt_t v){ pmt::pmt_t gr_pdu_make_vector(gr_pdu_vector_type type, const uint8_t* buf, size_t items){ switch(type){ - case BYTE: + case pdu_byte: return pmt::pmt_init_u8vector(items, buf); - case FLOAT: + case pdu_float: return pmt::pmt_init_f32vector(items, (const float*)buf); - case COMPLEX: + case pdu_complex: return pmt::pmt_init_c32vector(items, (const gr_complex*)buf); default: throw std::runtime_error("bad type!"); @@ -70,10 +70,10 @@ gr_pdu_make_vector(gr_pdu_vector_type type, const uint8_t* buf, size_t items){ gr_pdu_vector_type type_from_pmt(pmt::pmt_t vector){ if(pmt_is_u8vector(vector)) - return BYTE; + return pdu_byte; if(pmt_is_f32vector(vector)) - return FLOAT; + return pdu_float; if(pmt_is_c32vector(vector)) - return COMPLEX; + return pdu_complex; throw std::runtime_error("bad type!"); } |