GNU Radio 3.4.2 C++ API
copiers.h
Go to the documentation of this file.
00001 /* -*- c++ -*- */
00002 /*
00003  * Copyright 2008 Free Software Foundation, Inc.
00004  *
00005  * This program is free software: you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License as published by
00007  * the Free Software Foundation, either version 3 of the License, or
00008  * (at your option) any later version.
00009  *
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
00017  */
00018 
00019 #ifndef INCLUDED_USRP2_COPIERS_H
00020 #define INCLUDED_USRP2_COPIERS_H
00021 
00022 #include <complex>
00023 #include <stdint.h>
00024 
00025 namespace usrp2 {
00026 
00027   // FIXME we may want to rework this, but this will get us on the air
00028 
00029   /*
00030    * ----------------------------------------------------------------
00031    * Copy and convert from USRP2 wire format to host format
00032    * ----------------------------------------------------------------
00033    */
00034 
00035   void 
00036   copy_u2_16sc_to_host_16sc(size_t nitems,
00037                             const uint32_t *items,
00038                             std::complex<int16_t> *host_items);
00039 
00040   void 
00041   copy_u2_16sc_to_host_32fc(size_t nitems,
00042                             const uint32_t *items,
00043                             std::complex<float> *host_items);
00044 
00045   /*
00046    * ----------------------------------------------------------------
00047    * Copy and convert from host format to USRP2 wire format
00048    * ----------------------------------------------------------------
00049    */
00050 
00051   void 
00052   copy_host_16sc_to_u2_16sc(size_t nitems,
00053                             const std::complex<int16_t> *host_items,
00054                             uint32_t *items);
00055 
00056   void 
00057   copy_host_32fc_to_u2_16sc(size_t nitems,
00058                             const std::complex<float> *host_items,
00059                             uint32_t *items);
00060 }
00061 
00062 
00063 #endif /* INCLUDED_USRP2_COPIERS_H */