pez-globo / pufferfish-software

All software for the Pufferfish ventilator.
Apache License 2.0
0 stars 1 forks source link

Initialize backend store from fallbacks when files aren't available #377

Closed ethanjli closed 3 years ago

ethanjli commented 3 years ago

This PR adds the following functionality to the backend: If the backend starts and there are no files in the filesystem (in the statestore directory), then ventserver.application should initialize its store with some default values. This bootstraps the store so that those values will be written to the filesystem for the next time the backend is started. Until #340, we relied on the frontend to initialize those values, so this issue was not visible in ventserver.application; and ventserver.simulator doesn't use the filesystem to initialize its store, so this issue wasn't visible there either.

For records-keeping:

  1. This project is licensed under Apache License v2.0 for any software, and Solderpad Hardware License v2.1 for any hardware - do you agree that your contributions to this project will be under these licenses, too? Yes
  2. Were any of these contributions also part of work you did for an employer or a client? No
  3. Does this work include, or is it based on, any third-party work which you did not create? No