COMMS
Template library intended to help with implementation of communication protocols.
|
#include "comms/options.h"
Option to specify scaling ratio.
Applicable only to comms::field::IntValue. Sometimes the protocol specifies values being transmitted in one units while when handling the message they are better to be handled in another. For example, some distance information is transmitted as integer value of millimetres, but while processing it should be handled as floating point value of meters. Such field is defined as:
Then, to accessed the scaled value of the field use scaleAs() or setScaled() methods of comms::field::IntValue field:
TNum | Numerator of the scaling ratio. |
TDenom | Denominator of the scaling ratio. |