18 #ifndef INCLUDED_UHD_UTILS_MSG_TASK_HPP
19 #define INCLUDED_UHD_UTILS_MSG_TASK_HPP
23 #include <boost/shared_ptr.hpp>
24 #include <boost/function.hpp>
25 #include <boost/utility.hpp>
26 #include <boost/optional/optional.hpp>
27 #include <boost/cstdint.hpp>
33 typedef boost::shared_ptr<msg_task>
sptr;
35 typedef std::pair<boost::uint32_t, msg_payload_t >
msg_type_t;
36 typedef boost::function<boost::optional<msg_type_t>(void)>
task_fcn_type;
43 virtual msg_payload_t get_msg_from_dump_queue(boost::uint32_t sid) = 0;
45 inline static std::vector<boost::uint8_t>
buff_to_vector(boost::uint8_t* p,
size_t n) {
47 std::vector<boost::uint8_t> v(n);
48 memcpy(&v.front(), p, n);
51 return std::vector<boost::uint8_t>();
72 static sptr make(
const task_fcn_type &task_fcn);