+As a further extension, the C++ consumer and the Python producer examples have been extended to exchange structured data via [cppystruct](https://github.com/karkason/cppystruct) and [Python.struct](https://docs.python.org/3/library/struct.html). This way, `struct` like data can be exchanged (written and read from both sides) easily. In this example, the producer increases a counter for every "produced" image and updates/writes the file name of the produced image into the "struct". On the other side, the consumer sets a "stop flag" to `true` if it gets terminated. This way, when the producer produces its next image, it exists as well. The format of the struct is specified as string (here: "`<I?30s`" which means data is stored in little endian order (`<`), a uint32_t first (`I`), followed by a boolean (`?`), and finally a fixed 30 byte string (`30s`)).
0 commit comments