This is difficult(TM) at the moment, because we don't know which registers were written. If the user sends a tag ID byte for byte, we would have to use some timing magic to know when to inject the current register content. (i.e. "inject if no tag ID register was written for a second" or something similar). This is made even more difficult by the fact that we don't know which registers were written, because ESP-Modbus just writes the memory block in an interrupt and does not notify us of anything.
Wouldn't it be possible to have a tag id buffer that can be written at any time and does nothing and then have a "inject now" coil that injects the tag id currently in the buffer?
This is difficult(TM) at the moment, because we don't know which registers were written. If the user sends a tag ID byte for byte, we would have to use some timing magic to know when to inject the current register content. (i.e. "inject if no tag ID register was written for a second" or something similar). This is made even more difficult by the fact that we don't know which registers were written, because ESP-Modbus just writes the memory block in an interrupt and does not notify us of anything.