|
|
|
@ -927,12 +927,12 @@ mosquitto_sub -t 'bbc/#' -T bbc/bbc1 --remove-retained</programlisting>
|
|
|
|
|
|
|
|
|
|
<refsect2>
|
|
|
|
|
<title>Flag characters</title>
|
|
|
|
|
<para>The parameters %A, %C, %E, %F, %I, %l, %m, %p, %R, %S, %t, %x, and %X can have optional flags immediately after the % character.</para>
|
|
|
|
|
<para>The parameters %A, %C, %E, %F, %I, %l, %m, %p, %R, %S, %t, %f, %d, %x, and %X can have optional flags immediately after the % character.</para>
|
|
|
|
|
<variablelist>
|
|
|
|
|
<varlistentry>
|
|
|
|
|
<term><option>0</option></term>
|
|
|
|
|
<listitem><para>The value should be zero padded.
|
|
|
|
|
This applies to the parameters %A, %E, %F, %l, %m, %S, %X, and %x.
|
|
|
|
|
This applies to the parameters %A, %E, %F, %l, %m, %S, %f, %d, %X, and %x.
|
|
|
|
|
It will be ignored for other parameters. If used with the
|
|
|
|
|
<option>-</option> flag, the <option>0</option> flag will be
|
|
|
|
|
ignored.</para></listitem>
|
|
|
|
@ -954,7 +954,7 @@ mosquitto_sub -t 'bbc/#' -T bbc/bbc1 --remove-retained</programlisting>
|
|
|
|
|
option to set their field width in a similar way to regular
|
|
|
|
|
printf style formats, i.e. this sets the minimum width when
|
|
|
|
|
printing this parameter. This applies to the options %A, %C,
|
|
|
|
|
%E, %F, %I, %l, %m, %p, %R, %S, %t, %x, %X.
|
|
|
|
|
%E, %F, %I, %l, %m, %p, %R, %S, %t, %f, %d, %x, %X.
|
|
|
|
|
</para>
|
|
|
|
|
<para>
|
|
|
|
|
For example <option>%10t</option> would set the minimum topic
|
|
|
|
@ -977,6 +977,28 @@ mosquitto_sub -t 'bbc/#' -T bbc/bbc1 --remove-retained</programlisting>
|
|
|
|
|
</para>
|
|
|
|
|
</refsect2>
|
|
|
|
|
|
|
|
|
|
<refsect2>
|
|
|
|
|
<title>Floating point number printing consideration</title>
|
|
|
|
|
<para>
|
|
|
|
|
Mosquitto supports only IEEE754 floating point standard as
|
|
|
|
|
described in Annex F of ISO/IEC 9899:1999. Don't try to
|
|
|
|
|
use %f or %d if publisher's platform uses different
|
|
|
|
|
floating point representation standard than IEEE754 or you
|
|
|
|
|
will get invalid data. If you are unsure what floating
|
|
|
|
|
representation your platform is using, then it's most
|
|
|
|
|
likely IEEE754. If you get malformed and unexpected values,
|
|
|
|
|
check if float number in payload from publisher is encoded
|
|
|
|
|
in IEEE754.
|
|
|
|
|
</para>
|
|
|
|
|
<para>
|
|
|
|
|
If want to print floats, make sure you subscribe only
|
|
|
|
|
to topics that send only IEEE754 formatted floats.
|
|
|
|
|
Mosquitto is very strict about floats and if anything
|
|
|
|
|
that is not float is received, an error message will
|
|
|
|
|
be printed.
|
|
|
|
|
</para>
|
|
|
|
|
</refsect2>
|
|
|
|
|
|
|
|
|
|
<refsect2>
|
|
|
|
|
<title>MQTT related parameters</title>
|
|
|
|
|
<itemizedlist mark="circle">
|
|
|
|
@ -1000,6 +1022,8 @@ mosquitto_sub -t 'bbc/#' -T bbc/bbc1 --remove-retained</programlisting>
|
|
|
|
|
<listitem><para><option>%t</option> the message topic.</para></listitem>
|
|
|
|
|
<listitem><para><option>%x</option> the payload with each byte as a hexadecimal number (lower case).</para></listitem>
|
|
|
|
|
<listitem><para><option>%X</option> the payload with each byte as a hexadecimal number (upper case).</para></listitem>
|
|
|
|
|
<listitem><para><option>%f</option> the payload is treated as 4byte IEEE754 float.</para></listitem>
|
|
|
|
|
<listitem><para><option>%d</option> the payload is treated as 8byte IEEE754 float (double).</para></listitem>
|
|
|
|
|
</itemizedlist>
|
|
|
|
|
</refsect2>
|
|
|
|
|
|
|
|
|
|