diff options
author | Brent Stapleton <brent.stapleton@ettus.com> | 2017-11-06 09:50:38 -0800 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2017-11-14 09:45:53 -0800 |
commit | 8a9da7c66aaec826e756ab2411b9d40aa3f1f10c (patch) | |
tree | 2fe846d9a02ea1d93738bc3f993c3d2e49b8193f /host | |
parent | 3b206caa2cfdaff7db2c6cef56596369317fbbc6 (diff) | |
download | uhd-8a9da7c66aaec826e756ab2411b9d40aa3f1f10c.tar.gz uhd-8a9da7c66aaec826e756ab2411b9d40aa3f1f10c.tar.bz2 uhd-8a9da7c66aaec826e756ab2411b9d40aa3f1f10c.zip |
fpga load: adding component_file type
Adding struct that contains the data and metadata for a file that
defines a component.
Diffstat (limited to 'host')
-rw-r--r-- | host/include/uhd/types/component_file.hpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/host/include/uhd/types/component_file.hpp b/host/include/uhd/types/component_file.hpp new file mode 100644 index 000000000..e0761fecb --- /dev/null +++ b/host/include/uhd/types/component_file.hpp @@ -0,0 +1,35 @@ +// +// Copyright 2017 Ettus Research, a National Instruments Company +// +// SPDX-License-Identifier: GPL-3.0 +// + +#ifndef INCLUDED_UHD_USRP_COMPONENT_FILE_HPP +#define INCLUDED_UHD_USRP_COMPONENT_FILE_HPP + +#include <uhd/types/dict.hpp> +#include <string> +#include <vector> + +namespace uhd{ namespace usrp{ + + /*! Defines a file that can be sent using update_component + * + * \param metadata dictionary of strings that define the metadata + * associated with the file. + * + * Keys must include "id" and "filename", and may include an "md5" hash, + * as well as other, device- or component-specific keys. + * + * \param data the binary data file + * + * Can be the contents of the FPGA image file, for example. + */ + struct component_file_t { + uhd::dict<std::string, std::string> metadata; + std::vector<uint8_t> data; + }; + +}} // namespace uhd::usrp + +#endif /* INCLUDED_UHD_USRP_COMPONENT_FILE_HPP */ |