Loading...
Searching...
No Matches
short_to_char.h
Go to the documentation of this file.
/* -*- c++ -*- */
/*
* Copyright 2012 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
* SPDX-License-Identifier: GPL-3.0-or-later
*
*/
#ifndef INCLUDED_BLOCKS_SHORT_TO_CHAR_H
#define INCLUDED_BLOCKS_SHORT_TO_CHAR_H
#include <gnuradio/blocks/api.h>
#include <gnuradio/sync_block.h>
namespace gr {
namespace blocks {
/*!
* \brief Convert stream of shorts to a stream of chars.
*
* This block strips off the least significant byte from the
* short value.
*
* [0x00ff, 0x0ff0, 0xff00] => [0x00, 0x0f, 0xff]
*
* \ingroup type_converters_blk
*
* \details
* Converts \p vlen length vectors of input short samples to chars,
* dividing each element by 256.
*/
class BLOCKS_API short_to_char : virtual public sync_block
{
public:
// gr::blocks::short_to_char_ff::sptr
typedef std::shared_ptr<short_to_char> sptr;
/*!
* Build a short to char block.
*
* \param vlen vector length of data streams.
*/
static sptr make(size_t vlen = 1);
};
} /* namespace blocks */
} /* namespace gr */
#endif /* INCLUDED_BLOCKS_SHORT_TO_CHAR_H */
gr::blocks::short_to_char
Convert stream of shorts to a stream of chars.
Definition short_to_char.h:35
gr::blocks::short_to_char::sptr
std::shared_ptr< short_to_char > sptr
Definition short_to_char.h:38
gr::blocks::short_to_char::make
static sptr make(size_t vlen=1)
gr::sync_block::sync_block
sync_block(void)
Definition sync_block.h:28
api.h
BLOCKS_API
#define BLOCKS_API
Definition gr-blocks/include/gnuradio/blocks/api.h:18
gr::blocks
Definition abs_blk.h:20
gr
GNU Radio logging wrapper.
Definition basic_block.h:29
sync_block.h