23 #ifndef INCLUDED_GR_MESSAGE_H
24 #define INCLUDED_GR_MESSAGE_H
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);
68 static sptr make_from_string(
const std::string s,
long type = 0,
69 double arg1 = 0,
double arg2 = 0);
74 long type()
const {
return d_type; }
75 double arg1()
const {
return d_arg1; }
76 double arg2()
const {
return d_arg2; }
82 unsigned char *
msg()
const {
return d_msg_start; }
83 size_t length()
const {
return d_msg_end - d_msg_start; }
84 std::string to_string()
const;
size_t length() const
Definition: message.h:83
#define GR_RUNTIME_API
Definition: gnuradio-runtime/include/gnuradio/api.h:30
GR_RUNTIME_API long message_ncurrently_allocated()
thread-safe message queue
Definition: msg_queue.h:36
void set_type(long type)
Definition: message.h:78
PMT_API size_t length(const pmt_t &v)
Return the number of elements in v.
unsigned char * msg() const
Definition: message.h:82
void set_arg2(double arg2)
Definition: message.h:80
double arg2() const
Definition: message.h:76
long type() const
Definition: message.h:74
boost::shared_ptr< message > sptr
Definition: message.h:42
void set_arg1(double arg1)
Definition: message.h:79
double arg1() const
Definition: message.h:75
Message class.
Definition: message.h:39