23#ifndef INCLUDED_GR_MESSAGE_H
24#define INCLUDED_GR_MESSAGE_H
42 typedef boost::shared_ptr<message>
sptr;
50 unsigned char* d_buf_start;
51 unsigned char* d_msg_start;
52 unsigned char* d_msg_end;
53 unsigned char* d_buf_end;
59 unsigned char* buf_data()
const {
return d_buf_start; }
60 size_t buf_len()
const {
return d_buf_end - d_buf_start; }
66 static sptr make(
long type = 0,
double arg1 = 0,
double arg2 = 0,
size_t length = 0);
76 long type()
const {
return d_type; }
77 double arg1()
const {
return d_arg1; }
78 double arg2()
const {
return d_arg2; }
84 unsigned char*
msg()
const {
return d_msg_start; }
85 size_t length()
const {
return d_msg_end - d_msg_start; }
Message class.
Definition: message.h:40
static sptr make_from_string(const std::string s, long type=0, double arg1=0, double arg2=0)
double arg1() const
Definition: message.h:77
static sptr make(long type=0, double arg1=0, double arg2=0, size_t length=0)
public constructor for message
size_t length() const
Definition: message.h:85
boost::shared_ptr< message > sptr
Definition: message.h:42
long type() const
Definition: message.h:76
void set_arg2(double arg2)
Definition: message.h:82
double arg2() const
Definition: message.h:78
std::string to_string() const
unsigned char * msg() const
Definition: message.h:84
void set_arg1(double arg1)
Definition: message.h:81
void set_type(long type)
Definition: message.h:80
thread-safe message queue
Definition: msg_queue.h:37
#define GR_RUNTIME_API
Definition: gnuradio-runtime/include/gnuradio/api.h:30
Include this header to use the message passing features.
Definition: basic_block.h:45
GR_RUNTIME_API long message_ncurrently_allocated()
PMT_API size_t length(const pmt_t &v)
Return the number of elements in v.