Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

♻ Improve memory driver #106

Open
rneswold opened this issue Mar 7, 2024 · 1 comment
Open

♻ Improve memory driver #106

rneswold opened this issue Mar 7, 2024 · 1 comment
Labels
difficulty:easy Issue should be easy to fix driver Issue is about a driver enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed priority This issue needs immediate attention.

Comments

@rneswold
Copy link
Contributor

rneswold commented Mar 7, 2024

The memory driver has two deficiencies:

  • Before a memory device is set to a value, it is "typeless". In other words, if a client tries to read a memory device that has never been set, it doesn't know what type it is. This is a problem in the DrMem browser app. When the browser receives the first value from a device, it knows the type and creates appropriate widgets to view and set it. But with memory devices that haven't been initialized, it doesn't know what setting widget to use. This means, when you create a new memory device, it's difficult to set its first value (I end up using a GraphQL client.)
  • The current driver only allows one variable to be created per driver instance. If a site uses many memory devices, the config file can get quite large and confusing.

To fix these problems, this issue proposes to change the driver configuration and driver itself. The base config key will be vars and it will return an array of maps. In the maps are two keys, name and initial. name takes a String and represents the name of the memory device. initial can take any value DrMem device value. If the memory device has not yet been set, this value will be immediately reported.

All the variables will be handled by the one instance.

Note that all variables defined in one instance of the driver will have the same path prepended to their names. If different paths are desired, then multiple instances of the driver will have to be used.

@rneswold rneswold self-assigned this Mar 7, 2024
@rneswold rneswold added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed driver Issue is about a driver priority This issue needs immediate attention. difficulty:easy Issue should be easy to fix labels Mar 7, 2024
@rneswold rneswold added this to the Release v0.4.0 milestone Mar 7, 2024
@rneswold
Copy link
Contributor Author

rneswold commented Apr 8, 2024

#109 adds the initial value to the config parameters. This driver still needs updating to allow a list of devices to be created using one instance.

@rneswold rneswold removed their assignment Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty:easy Issue should be easy to fix driver Issue is about a driver enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed priority This issue needs immediate attention.
Projects
None yet
Development

No branches or pull requests

1 participant