Skip to content

Device-implemented Settings fields#78

Merged
calvinleng-science merged 1 commit into
mainfrom
calvin/generalize-settings
Apr 29, 2026
Merged

Device-implemented Settings fields#78
calvinleng-science merged 1 commit into
mainfrom
calvin/generalize-settings

Conversation

@calvinleng-science
Copy link
Copy Markdown
Contributor

@calvinleng-science calvinleng-science commented Apr 23, 2026

Summary

The old specification for settings was rather SciFi-specific. It assumed the notion of name, time source, and FPGA clock frequency were valid notions for all Synapse devices, which could be true, but it could also just be generalized. This generalization will likely especially be appreciated once we implement PRIMA as a Synapse device.

This change makes settings defined by the device with the schema for each field returned as part of the GetSettingsResponse.

Changes

  • Removed "name", "time_source", and "fpga_clock_freq_hz" and reserved them to prevent future use of these fields in the case of new client implementations making requests to outdated server implementations
  • Added SettingDescriptor to hold information on a setting's fields' schemas
  • Updated GetSettingResponse to return the schemas

Testing

image ^ synapsectl showing all the fields registered by scifi-server in headstage. Registered a "hello_world" field to 100% guarantee that clients do not need to be aware of the fields at "compile time".

Note that up-to-date clients asking out-of-date SciFis will show that the SciFi has no settings. People will need to update their SciFis. I can make the clients backwards compatible, but that will be a little ugly: will either have to keep the old fields in DeviceSettings, or will have to put legacy protos in all of our clients.

Copy link
Copy Markdown
Contributor

@namthor9 namthor9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved, good change

@calvinleng-science calvinleng-science merged commit 551e247 into main Apr 29, 2026
2 checks passed
@calvinleng-science calvinleng-science deleted the calvin/generalize-settings branch April 29, 2026 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants