root / host / include / uhd / transport / convert_types.ipp @ 99494305
History | View | Annotate | Download (1.5 kB)
| 1 |
// |
|---|---|
| 2 |
// Copyright 2010 Ettus Research LLC |
| 3 |
// |
| 4 |
// This program is free software: you can redistribute it and/or modify |
| 5 |
// it under the terms of the GNU General Public License as published by |
| 6 |
// the Free Software Foundation, either version 3 of the License, or |
| 7 |
// (at your option) any later version. |
| 8 |
// |
| 9 |
// This program is distributed in the hope that it will be useful, |
| 10 |
// but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 |
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 |
// GNU General Public License for more details. |
| 13 |
// |
| 14 |
// You should have received a copy of the GNU General Public License |
| 15 |
// along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 16 |
// |
| 17 |
|
| 18 |
#ifndef INCLUDED_UHD_TRANSPORT_CONVERT_TYPES_IPP |
| 19 |
#define INCLUDED_UHD_TRANSPORT_CONVERT_TYPES_IPP |
| 20 |
|
| 21 |
UHD_INLINE void uhd::transport::convert_io_type_to_otw_type( |
| 22 |
const void *io_buff, const io_type_t &io_type, |
| 23 |
void *otw_buff, const otw_type_t &otw_type, |
| 24 |
size_t num_samps |
| 25 |
){
|
| 26 |
std::vector<const void *> buffs(1, io_buff); |
| 27 |
return uhd::transport::convert_io_type_to_otw_type( |
| 28 |
buffs, io_type, otw_buff, otw_type, num_samps |
| 29 |
); |
| 30 |
} |
| 31 |
|
| 32 |
UHD_INLINE void uhd::transport::convert_otw_type_to_io_type( |
| 33 |
const void *otw_buff, const otw_type_t &otw_type, |
| 34 |
void *io_buff, const io_type_t &io_type, |
| 35 |
size_t num_samps |
| 36 |
){
|
| 37 |
std::vector<void *> buffs(1, io_buff); |
| 38 |
return uhd::transport::convert_otw_type_to_io_type( |
| 39 |
otw_buff, otw_type, buffs, io_type, num_samps |
| 40 |
); |
| 41 |
} |
| 42 |
|
| 43 |
#endif /* INCLUDED_UHD_TRANSPORT_CONVERT_TYPES_IPP */ |