|
From: | Firas abbas |
Subject: | Re: [Discuss-gnuradio] gr_message documentation |
Date: | Thu, 8 Nov 2007 22:02:14 -0800 (PST) |
On Thu, Nov 08, 2007 at 09:36:23PM -0800, Eng. Firas wrote:
>
> Hi,
>
> Does any one have a documentation about gr_message. In the official doxygen
> documentation it was said ["The ideas and method names for adjustable
> message length were lifted from the click modular router "Packet" class"].
> Doing a Google search about the click packet class did not lead to something
> useful. Help will be appreciated.
>
> Regards,
>
> Firas
Ignoring the comment about click, what isn't clear about the public interface?
(FYI, the adjustable length wasn't implemented. The comment should probably be removed.)
Eric
/*!
* \brief public constructor for gr_message
*/
gr_message_sptr
gr_make_message(long type = 0, double arg1 = 0, double arg2 = 0, size_t length = 0);
gr_message_sptr
gr_make_message_from_string(const std::string s, long type = 0, double arg1 = 0, double arg2 = 0);
/*!
* \brief Message.
*
* The ideas and method names for adjustable message length were
* lifted from the click modular router "Packet" class.
*/
class gr_message {
public:
~gr_message ();
long type() const { return d_type; }
double arg1() const { return d_arg1; }
double arg2() const { return d_arg2; }
void set_type(long type) { d_type = type; }
void set_arg1(double arg1) { d_arg1 = arg1; }
void set_arg2(double arg2) { d_arg2 = arg2; }
unsigned char *msg() const { return d_msg_start; }
size_t length() const { return d_msg_end - d_msg_start; }
std::string to_string() const;
};
[Prev in Thread] | Current Thread | [Next in Thread] |