When setting up a query condition, the comparision operation fails when trying to compare a numeric value with a char.
For example, in the IDL, if there is a opic defined as:
struct EntityType
{
char m_domain;
}
the query condition will fail if using a query condition such as "m_domain = 1"
but if the IDL is changed so that m_domain is of type "short", then the query condition comparision works properly.
I also tried "m_domain = '1'" whichdidn't work.
Is there any way to compare an 8bit value as a numeric value?
Hello David,
What version of RTI Connext DDS are you using?
I verified that the expression
"m_domain = '1' "
does work in Connext DDS 5.1. However the '1' is being interpreted as the character '1', which maps to a numeric value of 49 (per ascii standard). If you want the numeric value 1 as an 8 bit value, then you could use the type "octet" in your IDL as in:Then the expression: "m_domain = 1" should work.
-Gerardo
Using octet works as expected. Thanks for your help