generate_packets.py: check for errors when sending all fields
Note: This patch puts simplicity of the generation code over simplicity of the generated code, producing clunky-looking code for simple fields, like
instead of the simpler
This will be a trend in further patches – the advantage being that the e |= DIO_PUT(...); line can be reused in other places (such as for array elements) in the future, and the surrounding code works equally well for less-simple fields (i.e. arrays).
Part of #43927. Follow-up to #45000. Check return values of dio_put_*() for everything that is sent and move common parts out of Field.get_put_real() into Field.get_put() or (where applicable) Variant.get_send().