Used to read and write to Wireless Nodes' eeproms and provide caching functionality.
NodeEeprom( |
| ) |
Creates an Eeprom object.
nodeAddress | The address of the Node to access the Eeprom of. |
base const BaseStation& | The BaseStation to use for communicating with the Node. |
protocol const WirelessProtocol& | The WirelessProtocol that is supported by the Node. |
setttings | The NodeEepromSettings to use. |
Whether we can use a group eeprom read when reading from eeprom.
virtual bool updateCacheFromDevice( |
| ) final |
Attempts to update the cache by reading the value from the Node with the nodeAddress given at initialization. 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.
Error_NotSupported: Unsupported eeprom location.
virtual void parseEepromPage( |
| ) |
Parses a page download result containing eeprom values. The eeprom cache will be updated with all the parsed values.
pageData const ByteStream& | The ByteStream that contains the data read from the page download command |
pageIndex uint16 | The 0-based index that was used to download the page |
void updateSettings( |
| ) |
Changes the settings for this eeprom object.
void setBaseStation( |
| ) |
Updates the BaseStation object that is set for use in communicating with the Node.
virtual uint16 readEeprom( |
| ) override |
Attempts to read an eeprom value from the Node. 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 Node.
location uint16 | The eeprom location to read from the Node and update in the cache. |
The eeprom value for the requested location.
Error_NotSupported: Unsupported eeprom location.
Error_NodeCommunication: Failed to read the value from the Node.
Error_Connection: A connection error has occurred with the BaseStation.
virtual void writeEeprom( |
| ) override |
Attempts to write an eeprom value to the Node. 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 Node and update in the cache. |
value uint16 | The value to write to the eeprom on the Node and update in the cache. |
Error_NodeCommunication: Failed to write the value to the Node.
Error_Connection: A connection error has occurred with the BaseStation.