~ubuntu-branches/ubuntu/precise/gnuradio/precise

« back to all changes in this revision

Viewing changes to gnuradio-core/src/lib/general/gr_packed_to_unpacked_ii.h

  • Committer: Bazaar Package Importer
  • Author(s): Kamal Mostafa
  • Date: 2010-03-13 07:46:01 UTC
  • mfrom: (2.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20100313074601-zjsa893a87bozyh7
Tags: 3.2.2.dfsg-1ubuntu1
* Fix build for Ubuntu lucid (LP: #260406)
  - add binary package dep for libusrp0, libusrp2-0: adduser
  - debian/rules clean: remove pre-built Qt moc files

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* -*- c++ -*- */
2
 
/*
3
 
 * Copyright 2006 Free Software Foundation, Inc.
4
 
 * 
5
 
 * This file is part of GNU Radio
6
 
 * 
7
 
 * GNU Radio is free software; you can redistribute it and/or modify
8
 
 * it under the terms of the GNU General Public License as published by
9
 
 * the Free Software Foundation; either version 3, or (at your option)
10
 
 * any later version.
11
 
 * 
12
 
 * GNU Radio is distributed in the hope that it will be useful,
13
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 
 * GNU General Public License for more details.
16
 
 * 
17
 
 * You should have received a copy of the GNU General Public License
18
 
 * along with GNU Radio; see the file COPYING.  If not, write to
19
 
 * the Free Software Foundation, Inc., 51 Franklin Street,
20
 
 * Boston, MA 02110-1301, USA.
21
 
 */
22
 
 
23
 
// WARNING: this file is machine generated.  Edits will be over written
24
 
 
25
 
#ifndef INCLUDED_GR_PACKED_TO_UNPACKED_II_H
26
 
#define INCLUDED_GR_PACKED_TO_UNPACKED_II_H
27
 
 
28
 
#include <gr_block.h>
29
 
#include <gr_endianness.h>
30
 
 
31
 
class gr_packed_to_unpacked_ii;
32
 
typedef boost::shared_ptr<gr_packed_to_unpacked_ii> gr_packed_to_unpacked_ii_sptr;
33
 
 
34
 
gr_packed_to_unpacked_ii_sptr 
35
 
gr_make_packed_to_unpacked_ii (unsigned int bits_per_chunk, gr_endianness_t endianness);
36
 
 
37
 
/*!
38
 
 * \brief Convert a stream of packed bytes or shorts to stream of unpacked bytes or shorts.
39
 
 * \ingroup block
40
 
 *
41
 
 * input: stream of int; output: stream of int
42
 
 *
43
 
 * This is the inverse of gr_unpacked_to_packed_XX.
44
 
 *
45
 
 * The bits in the bytes or shorts input stream are grouped into chunks of 
46
 
 * \p bits_per_chunk bits and each resulting chunk is written right-
47
 
 * justified to the output stream of bytes or shorts.  
48
 
 * All b or 16 bits of the each input bytes or short are processed.  
49
 
 * The right thing is done if bits_per_chunk is not a power of two.
50
 
 *
51
 
 * The combination of gr_packed_to_unpacked_XX_ followed by
52
 
 * gr_chunks_to_symbols_Xf or gr_chunks_to_symbols_Xc handles the
53
 
 * general case of mapping from a stream of bytes or shorts into 
54
 
 * arbitrary float or complex symbols.
55
 
 *
56
 
 * \sa gr_packed_to_unpacked_bb, gr_unpacked_to_packed_bb,
57
 
 * \sa gr_packed_to_unpacked_ss, gr_unpacked_to_packed_ss,
58
 
 * \sa gr_chunks_to_symbols_bf, gr_chunks_to_symbols_bc.
59
 
 * \sa gr_chunks_to_symbols_sf, gr_chunks_to_symbols_sc.
60
 
 */
61
 
 
62
 
class gr_packed_to_unpacked_ii : public gr_block
63
 
{
64
 
  friend gr_packed_to_unpacked_ii_sptr 
65
 
  gr_make_packed_to_unpacked_ii (unsigned int bits_per_chunk, gr_endianness_t endianness);
66
 
 
67
 
  gr_packed_to_unpacked_ii (unsigned int bits_per_chunk, gr_endianness_t endianness);
68
 
 
69
 
  unsigned int    d_bits_per_chunk;
70
 
  gr_endianness_t d_endianness;
71
 
  unsigned int    d_index;
72
 
 
73
 
 public:
74
 
  void forecast(int noutput_items, gr_vector_int &ninput_items_required);
75
 
  int general_work (int noutput_items,
76
 
                    gr_vector_int &ninput_items,
77
 
                    gr_vector_const_void_star &input_items,
78
 
                    gr_vector_void_star &output_items);
79
 
 
80
 
  bool check_topology(int ninputs, int noutputs) { return ninputs == noutputs; }
81
 
 
82
 
};
83
 
 
84
 
#endif