From 8a9da7c66aaec826e756ab2411b9d40aa3f1f10c Mon Sep 17 00:00:00 2001 From: Brent Stapleton Date: Mon, 6 Nov 2017 09:50:38 -0800 Subject: fpga load: adding component_file type Adding struct that contains the data and metadata for a file that defines a component. --- host/include/uhd/types/component_file.hpp | 35 +++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 host/include/uhd/types/component_file.hpp 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 +#include +#include + +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 metadata; + std::vector data; + }; + +}} // namespace uhd::usrp + +#endif /* INCLUDED_UHD_USRP_COMPONENT_FILE_HPP */ -- cgit v1.2.3