Skip to content

[FEATURE]-Add event when ConfigWriter writes the file #929

@jtalborough

Description

@jtalborough

Is your feature request related to a problem? Please describe.
The class ReconfigurableDevice (BridgeableReconfigurableDevice) contains a method CustomSetConfig(DeviceConfig config) which uses ConfigWriter.UpdateDeviceConfig to write new config data to file. The ConfigWriter uses a Timer mechanism to rate limit the file write. This can take up to 30 sec. There is no event fired when write is complete and no return from the method CustomSetConfig(). So at the device implementation there is no way to know if a file has been successfully written or not. There is also a circumstance where a device can make the write using. CustomWriteConfig and restart the app within the 30sec window. This would result in the new values not being written.

Describe the solution you'd like

  1. Add an event to ConfigWriter and ReconfigurableDevice when the file write is completed successfully.
  2. Write any pending files on a reboot or program reset

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions