USRP Hardware Driver and USRP Manual: uhd::msg_task Class Reference

| USRP Hardware Driver and USRP Manual Version: 4.8.0.makepkg-0-g308126a4 UHD and USRP Manual |

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | List of all members
uhd::msg_task Class Referenceabstract

`#include <uhd/utils/msg_task.hpp>`

Inheritance diagram for uhd::msg_task:

## Public Types
typedef std::shared_ptr< msg_task > | sptr
typedef std::vector< uint8_t > | msg_payload_t
typedef std::pair< uint32_t, msg_payload_t > | msg_type_t
typedef std::function< boost::optional< msg_type_t >(void)> | task_fcn_type

## Public Member Functions
virtual msg_payload_t | get_msg_from_dump_queue (uint32_t sid)=0
virtual | ~msg_task (void)=0

## Static Public Member Functions
static UHD_INLINE std::vector< uint8_t > | buff_to_vector (uint8_t *p, size_t n)
static sptr | make (const task_fcn_type &task_fcn)

## Member Typedef Documentation

## ◆ msg_payload_t

typedef std::vector<uint8_t> uhd::msg_task::msg_payload_t

## ◆ msg_type_t

typedef std::pair<uint32_t, msg_payload_t> uhd::msg_task::msg_type_t

## ◆ sptr

typedef std::shared_ptr<msg_task> uhd::msg_task::sptr

## ◆ task_fcn_type

typedef std::function<boost::optional<msg_type_t>(void)> uhd::msg_task::task_fcn_type

## Constructor & Destructor Documentation

## ◆ ~msg_task()

virtual uhd::msg_task::~msg_task | ( | void |  | ) |
| pure virtual

## Member Function Documentation

## ◆ buff_to_vector()

static UHD_INLINE std::vector< uint8_t > uhd::msg_task::buff_to_vector | ( | uint8_t * | p,
|  | size_t | n )
| inlinestatic

## ◆ get_msg_from_dump_queue()

virtual msg_payload_t uhd::msg_task::get_msg_from_dump_queue | ( | uint32_t | sid | ) |
| pure virtual

## ◆ make()

static sptr uhd::msg_task::make | ( | const task_fcn_type & | task_fcn | ) |
| static

Create a new task object with function callback. The task function callback will be run in a loop. until the thread is interrupted by the deconstructor.

A function may return payload which is then pushed to a synchronized message queue.

A task should return in a reasonable amount of time or may block forever under the following conditions:

- The blocking call is interruptible.
- The task polls the interrupt condition.

Parameters

  task_fcn | the task callback function

Returns
  a new task object

The documentation for this class was generated from the following file:

- msg_task.hpp