Used to read and write to BaseStations' eeproms and provide caching functionality.
explicit BaseStationEeprom( |
| ) |
Creates a BaseStationEeprom object.
nodeAddress | The address of the Node to access the Eeprom of. |
base | The BaseStation_Impl to use for communication. This reference must stay alive for the life of this object. |
useCache | Whether or not to use the eeprom cache. |
virtual bool updateCacheFromDevice( |
| ) override |
Attempts to update the cache by reading the value from the BaseStation. Any values that are read from the Node will be updated in the cache.
location uint16 | The eeprom location to read from the device and update in the cache. |
true if the value was read from the device and the cache has been updated, false otherwise.
virtual uint16 readEeprom( |
| ) override |
Attempts to read an eeprom value from the BaseStation. If caching is enabled and there is a previously cached value available, this will just return the value from the cache and will not communicate with the BaseStation.
location uint16 | The eeprom location to read from the BaseStation and update in the cache. |
The eeprom value for the requested location.
Error_Connection: Failed to read the value from the BaseStation. A connection error has occurred with the BaseStation.
virtual void writeEeprom( |
| ) override |
Attempts to write an eeprom value to the BaseStation. If successful, the cache will be updated with the changed value as well. If caching is enabled and the value in the cache is the same as that attempting to be written, nothing will be written to the Node and this function will have no affect.
location uint16 | The eeprom location to write to on the BaseStation and update in the cache. |
value uint16 | The value to write to the eeprom on the Node and update in the cache. |
Error_Connection: Failed to read the value from the BaseStation. A connection error has occurred with the BaseStation.