read_message_data_string requiring a 'std::string &' type

Discussion in 'Module Connector (MC)' started by Remy Beaumont, Jan 31, 2019.

  1. Remy Beaumont

    Remy Beaumont New Member

    While working on our own firmware on a X4m02, we've been using dispatch_message_hostcom_send_data_string(...) to send back text messages to the host.

    On the python implementation of the Module Connector, the signature of the call to read the message looks like this:

    read_message_data_string(PyXEP self, uint32_t * content_id, uint32_t * info, std::string * data)

    Question is: How do we pass in a type "std::string" in the function ?

    We've tried pretty much all of the combinations we could think of, but we keep getting:

    TypeError: in method 'PyXEP_read_message_data_string', argument 4 of type 'std::string *'

    Could something be wrong with the SWIG configuration of this call ?

    Thanks,

    Rémy
     
  2. Charlie Shao

    Charlie Shao Moderator Staff Member

  3. Remy Beaumont

    Remy Beaumont New Member

    Thanks Charlie