Eclipse Tahu addresses the existence of legacy SCADA/DCS/ICS protocols and infrastructures and provides a much-needed definition of how best to apply MQTT into these existing industrial operational environments.
Avoid warnings about printf parameter types not matching the format specifiers by using the macros defined by #include <inttypes.h> to construct the format specifiers. Also fix some format specifiers for parameters of type size_t.
The types of pb_size_t and pb_ssize_t depend on whether the PB_FIELD_32BIT macro is defined or not in "pb.h", so add macros to "tahu.h" that expand to the correct printf and scanf format specifiers for pb_size_t and pb_ssize_t. For example, define PRI_u_PB_SIZE to expand to PRIu32 if PB_FIELD_32BIT is defined, or to PRIuLEAST16 if PB_FIELD_32BIT is undefined. (The underscore after PRI avoids clashes with identifiers reserved for future use by <inttypes.h>.)
Avoid warnings about printf parameter types not matching the format specifiers by using the macros defined by
#include <inttypes.h>
to construct the format specifiers. Also fix some format specifiers for parameters of typesize_t
.The types of
pb_size_t
andpb_ssize_t
depend on whether thePB_FIELD_32BIT
macro is defined or not in "pb.h", so add macros to "tahu.h" that expand to the correct printf and scanf format specifiers forpb_size_t
andpb_ssize_t
. For example, definePRI_u_PB_SIZE
to expand toPRIu32
ifPB_FIELD_32BIT
is defined, or toPRIuLEAST16
ifPB_FIELD_32BIT
is undefined. (The underscore afterPRI
avoids clashes with identifiers reserved for future use by<inttypes.h>
.)