How does SMBus receive byte command protocol know what to send

digital-communicationsi2cpmbussmbus

Im programming an I2C device to act as a PMBus slave. Looking at the SMBus protocols (which PMBus is built on) the Receive Byte command has a format described as follows:

+---+---------------+---+---+-----------+---+---+
| S | Slave Address | R | A | Data Byte | A | P |
+---+---------------+---+---+-----------+---+---+

My question then is how is a slave supposed to know which commands data it is supposed to be returning? Is it dependent upon a preceding communications transaction, like reading from a device to which the read location has already been set??

Best Answer

Receive Byte is a low-level function, equivalent to a simple I2C read. It's up to the slave to decide what data to send in response. It could depend on the context of the previous communications, or there could be some default data such as a status code or sensor value. If the slave device can accept multiple addresses, then the choice of data could be based on the address. Or the command might not be useful at all.