Controlling individual gain elements using gain_group

Hi,

I am not a very experienced programmer and I’d really appreciate some
help.
I am working on a method to individually control gain elements of
daughter
boards on the USRP2. Following is my code so far. Here, rx_subdev_device
and
rx_codec_obj are of type wax::obj that I have passed from another
method. It
compiles ok but during runtime throws the following error:

terminate called after throwing an instance of

'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injectorboost::bad_lexical_cast


what(): bad lexical cast: source type value could not be interpreted as
target
Aborted

the code :

}

Thanks in advance,

Best Regards/Mit freundlichen Gren,
Sanat Dinker Gulvadi
Graduate student, TU Ilmenau.
98693 Ilmenau, Germany