Revision history [back]

click to hide/show revision 1
initial version

Hi,

This is actually quite simple to solve. When you construct your message arg you have "(us)" which is a record/structure of an unsigned int and a string, which does not match with a unsigned int and string that you have defined for the interface "us". The print out of the message arg should just be the inner parts of the struct tag to match the definition of the signal arguments. So you should have the following and then your code will work:

MsgArg deviceStatusChangedArg("us", i + 1, deviceStatusArray[i]);

remove the "(" and ")" and you will be all good.

Hi,

This is actually quite simple to solve. When you construct your message arg you have "(us)" which is a record/structure of an unsigned int and a string, which does not match with a unsigned int and string that you have defined for the interface "us". The print out of the message arg should just be the inner parts of the struct tag to match the definition of the signal arguments. So you should have the following and then your code will work:

MsgArg deviceStatusChangedArg("us", i + 1, deviceStatusChangedArg[2];
deviceStatusChangedArg[0].Set("u", i+1);
deviceStatusChangedArg[1].Set("s", deviceStatusArray[i]);

remove You should be good once you make the "(" and ")" and you will be all good.above change.