Skip to content

Conversation

dancrossnyc
Copy link

At OxCon, Ry and I briefly spoke about how to gracefully accommodate the need to inject additional data into rsf so that, for example, one could specify how to format a field, as some AMD registers report things like power or voltage or current in odd units (such as eights of a volt or similar) and it would be nice to normalize those into a standard unit. One could image doing this with something like a snippet of rhai code, but then how would one inject that into an rsf specification?

Ry suggested using attributes; this introduces a familiar #[attr(id = "string")] syntax and corresponding parser support for such constucts.

@rcgoodfellow
Copy link
Collaborator

Thanks Dan! Are you planning on using RSF interfaces from Rust? If so we should probably add attributes methods to the Rust code generators for blocks, registers and enums, <field_name>_attributes for fields and <element_name>_attributes block elements.

At OxCon, Ry and I briefly spoke about how to gracefully
accommodate the need to inject additional data into rsf so
that, for example, one could specify how to format a field, as
some AMD registers report things like power or voltage or
current in odd units (such as eights of a volt or similar) and
it would be nice to normalize those into a standard unit.  One
could image doing this with something like a snippet of rhai
code, but then how would one inject that into an rsf
specification?

Ry suggested using attributes; this introduces a familiar
`#[attr(id = "string")]` syntax and corresponding parser support
for such constucts.
@dancrossnyc
Copy link
Author

I believe this is done; PTAL.

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