Monitor needs information from the driver

I ran into a case where my monitor needs to know the size of the data being transmitted by the driver. The problem is that the protocol (i2c in this case) does not require the data size to be transmitted. I understand that ideally, the monitor should be observing what goes on the serial bus and should not have any communication with the driver, but I just don’t see how I could solve this problem unless the driver somehow passes the data size to the monitor. Assuming that my understanding of the i2c protocol is correct and that, without knowing the data size, there is no way for the monitor to determine the difference between a nack that indicates the last byte was successfully received or a nack that indicates that the previous byte was rejected, then what is the best way for the driver to pass the data size to the monitor? Should I use a global variable in my interface, where the driver sets it and the monitor uses it?

In reply to RaulAguilarPA:

Your agent should have a configuration object which contains all the parameters relevent to its behavior. Both the driver and the monitor should use this configuration object and operate accordingly.

The configuration object should be created/randomized in the test so that you can change the behavior for each test if desired.