Hello,
decimal element could contain individual field operators. for exampe,
decimal id=“1” presence=“optional” name="value"
exponent copy/ /exponent
mantissa delta/ /mantissa
/decimal
would it be possible only one of individual operators appears in the definition?
for example,
decimal id=“1” presence=“optional” name="value"
exponent copy/ /exponent
/decimal
please advise
thanks & regards
fengwei
Yes, that is possible. Default is no field operator.
thanks for the answer.
in my above example, only exponent field operator is available, does it mean mantissa should be read off the wire using mandatory presence?
thanks & regards
fengwei
Optional decimal means optional exponent (since it is written first on the wire). If the exponent is present, then the mantissa follows using the mandatory encoding.
The value 1.5 = 15e-1 is written as -1 (exp), 15 (mantissa). Null value is written as null (exp).
In your example, where exponent is copy encoded, the value of the exponent might be taken from the dictionary. Encoding the sequence reset, null decimal, null decimal is encoded like this:
PMAP bit = 1, exp = NULL // first null, exp null -> mantissa not on the wire
PMAP bit = 0 // exp is copied from dictionary = null -> mantissa not on the wire
Regards,
Mikael Brännström
hello Mikael,
thanks for the explanation.
is following definition possible (exponent field operator is not in)?
decimal id=“1” presence=“optional” name="value"
mantissa /mantissa
/decimal
thanks & regards
fengwei
Yes. It just means that you haven’t specified an operator for the exponent, which defaults to “no operator”.