pcdshub / pytmc

Generate EPICS IOCs and records from TwinCAT projects - along with many TwinCAT project tools
https://pcdshub.github.io/pytmc/
Other
10 stars 11 forks source link

Support pragma specification of ADS poll/notify rate #146

Closed n-wbrown closed 4 years ago

n-wbrown commented 4 years ago

Proposed syntax for controlling ADS poll rate.

poll:
    init
    no[tify]
    1hz
    1s[ec]
klauer commented 4 years ago

Agreed-upon INP @asyn options:

IOC startup will have configurable default polling rate

poll: init won't be an option, and I think we need to rethink the pragma syntax given the above

n-wbrown commented 4 years ago

how about this:

poll:
    0.1s        # Notify, rate limited to 10hz
    poll=1hz    # Attach to the 1hz poll group

I'm not sure I like specifying T for the notify rate but if we specify frequency, we flip the convention that asyn is using. This does seem to be less than ideal for the intended use cases for both types of communication.

I'm also not happy about the double use of the poll keyword in this draft. Very open to better ideas.

klauer commented 4 years ago

How about consistent handling of the time/frequency, but then just having 'notify' as a separate word?

poll: 1hz notify = poll: 1s notify poll: 1s = poll: 1hz

Or:

update: 1hz notify = update: 1s notify update: 1s poll = update: 1hz poll = update: 1s (default is 'poll')

klauer commented 4 years ago

@n-wbrown and I discussed in person and like update.

If the pragma is unspecified, the default is assumed to be update: 1s poll. We will not support the additional sec vs s or variants thereof.