libplctag / libplctag.NET

A .NET wrapper for libplctag.
https://libplctag.github.io/
Mozilla Public License 2.0
194 stars 50 forks source link

Allow `AutoSyncReadInterval` and `AutoSyncWriteInterval` to be set after tag is Initialized #383

Closed timyhac closed 2 weeks ago

timyhac commented 2 weeks ago

Most tag attributes are only used during the creation of the tag object, but some can be configured afterwards:

  1. read_cache_ms
  2. debug_level
  3. auto_sync_read_ms
  4. auto_sync_write_ms

Currently, libplctag.NET wrapper allows 1 and 2 to be set but prevents 3 andd 4 by throwing an exception.

Having the ability to set these at runtime can be useful for interactive applications that need to change the update frequency.

Notes:

kyle-github commented 2 weeks ago

Oops. They are documented now! Thanks for noticing they were missing!

I should come up with something a bit more coherent for how attributes are described so that it is clear which ones can be changed at runtime.