Return controller default values in a metadata request #935
Replies: 2 comments
-
|
Default values has to be accessed via Then how to implement - duplicate code or refactor it? IMO duplicating is a no-go, it will only add maintenance costs. Will it be worth it? The only senders I know about that are using |
Beta Was this translation helpful? Give feedback.
-
|
Thanks @terjeio! I'm working on a sender as well, and this is a gap I'd like filled. I'll do my best to match your code with the refactor and I'll open a PR when I've got something put together. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi @terjeio,
I'd like to propose exposing settings defaults to
$ES, so senders can:Currently I believe some senders keep default maps of vendor-specific controllers to achieve some of this functionality, but it'd be great if this was just queryable from a connected system.
Before I fork and add this, do you have any preferences on:
$ESwith a new field:As I understand, most existing senders should just ignore a post-fixed new field without issue, and they can roll it in as needed. <reboot_required> and <allow_null> have already been extended here, so should be good to continue this pattern? I've audited ioSender, gSender, UGS, CNCjs, and they all seem like they should handle this fine.
Alternatively, if you prefer we could use a new command to be sure that an existing controller never receives a default on the
$ESmetadata report on accident:But this adds a round-trip and separates defaults from the metadata they describe.
Do you have any preferences on how
defaults.hgets wired through tosetting_detail_t, or should I just have a go at matching the surrounding code as best as possible (copying howvoid *valueis being included)?Plugins seem a little more complicated to support, as far as I can tell default values are captured imperatively in
restore(), instead of insetting_detail_t. We could either skip this for now, or stage it out (add plugin defaults tosetting_detail_tto support$ES/$EDnow, then in the future refactorrestore()to read fromsetting_detail_tso each plugin doesn't need to overriderestore()?). Am I understanding this correctly?Anything else I'm missing to get this to land cleanly?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions