allow python connivence syntax for sub-nodes in devices #2550
Closed
joshStillerman
started this conversation in
Ideas
Replies: 1 comment
-
|
done |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Devices provide 'original_part_name' methods which can be used to access the device's member nodes as lower-case part-name properties of the device head. For example givent a device with a sub-node 'COMMENT', its methods could refer to self.comment to refer to that node, or head-node.comment to refer to that node. Nodes deeper in the hierarchy from the top level of the device like that 'START_IDX' under the 'INPUT_xx' nodes have convenience names replacing the punctuation with '_'. So the device subnode: 'INPUT_01:OFFSET' can be referred to as self.input_01_offset. or head-node.input_01_offset. I propose that this be extended so that given a node like INPUT_01 it have a property 'offset'. For example:
chan = self.input_01
offset = chan.offset
This could be done in the generic property code of tree nodes:
Something like:
What do people think?
-Josh
Beta Was this translation helpful? Give feedback.
All reactions