GNU Radio 3.6.0 C++ API
|
00001 /* 00002 * Copyright 2011-2012 Free Software Foundation, Inc. 00003 * 00004 * This file is part of GNU Radio 00005 * 00006 * GNU Radio is free software; you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License as published by 00008 * the Free Software Foundation; either version 3, or (at your option) 00009 * any later version. 00010 * 00011 * GNU Radio is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with GNU Radio; see the file COPYING. If not, write to 00018 * the Free Software Foundation, Inc., 51 Franklin Street, 00019 * Boston, MA 02110-1301, USA. 00020 */ 00021 00022 #ifndef INCLUDED_GRUEL_PMT_BLOB_H 00023 #define INCLUDED_GRUEL_PMT_BLOB_H 00024 00025 #include <gnuradio/extras/api.h> 00026 #include <gruel/pmt.h> 00027 00028 namespace pmt{ 00029 00030 /* 00031 * ------------------------------------------------------------------------ 00032 * Binary Large Objects (BLOBs) 00033 * 00034 * Handy for passing around uninterpreted chunks of memory. 00035 * ------------------------------------------------------------------------ 00036 */ 00037 00038 //! Return true if \p x is a blob, othewise false. 00039 GR_EXTRAS_API bool pmt_is_ext_blob(pmt_t x); 00040 00041 /*! 00042 * \brief Allocate a blob given the length in bytes 00043 * 00044 * \param len is the size of the data in bytes. 00045 */ 00046 GR_EXTRAS_API pmt_t pmt_make_ext_blob(size_t len); 00047 00048 /*! 00049 * Return a pointer to the blob's data. 00050 */ 00051 GR_EXTRAS_API void *pmt_ext_blob_data(pmt_t blob); 00052 00053 //! Return the blob's length in bytes 00054 GR_EXTRAS_API size_t pmt_ext_blob_length(pmt_t blob); 00055 00056 //! Set the blob's length in bytes 00057 GR_EXTRAS_API void pmt_ext_blob_set_length(pmt_t blob, size_t len_in_bytes); 00058 00059 } 00060 00061 #endif /* INCLUDED_GRUEL_PMT_BLOB_H */