# Constellation Objects & Messages

**URL:** <https://www.ruby-forum.com/t/constellation-objects-messages/243255>\
**Category:** GNU Radio\
**Created:** [September 4, 2015, 3:46pm UTC](https://www.ruby-forum.com/t/constellation-objects-messages/243255 "2015-09-04T15:46:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sadaf\_N](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/858c86/32.png) [@Sadaf\_N](https://www.ruby-forum.com/u/Sadaf_N)\
**Post date:** [September 4, 2015, 3:46pm UTC](https://www.ruby-forum.com/t/constellation-objects-messages/243255/1 "2015-09-04T15:46:08Z")

</div>

Hi,

I’m using the gr-digital constellation decoder block in GRC  
(digital\_constellation\_decoder\_cb) with constellation objects such as  
digital.constellation\_qpsk(), etc.

I want to modify the block such that it accepts a message and from  
that message the block can infer which constellation object to use. This  
will all be done in the message handler function. So for example:

std::string message = pmt::symbol\_to\_string(msg);

if(strcmp(message, “BPSK”) == 0)  
d\_constellation = constellation\_bpsk();  
else if(strcmp(message, “QPSK”) == 0)  
d\_constellation = constellation\_qpsk();  
…etc

Any ideas on how to set d\_constellation as one of these objects?

It is to operate in an OFDM receiver whereby the header of a packet  
transmission is decoded and from that, information about the payload  
constellation can be acquired. (802.11)

Thanks
