libplctag / libplctag.NET

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

Expose `max_requests_in_flight` on `Tag` or `Tag<M,T>`. #384

Open timyhac opened 2 weeks ago

timyhac commented 2 weeks ago

max_requests_in_flight is currently not exposed to Tag or Tag<M,T>.

It is a modbus-specific attribute.

This issue requests that is is exposed for those classes.

I think it is possible for this attribute to be configured after the tag has been Initialized. Note, it may be preferable to just allow all attributes to be configured after Initialize, and let the core library make the determination of whether this is sensible or not.

kyle-github commented 2 weeks ago

It would be difficult to make this work when setting it lower at runtime. It could orphan some requests. Setting it higher could possibly work but is probably not a good idea. I think it is best to make this one only work at creation time.

kyle-github commented 2 weeks ago

BTW, this is exposed in the wiki section on type-specific attributes. This is a bit of a mess, isn't it?

timyhac commented 2 weeks ago

It would be difficult to make this work when setting it lower at runtime. It could orphan some requests. Setting it higher could possibly work but is probably not a good idea. I think it is best to make this one only work at creation time.

Yes no problem I can check for this. I'm more thinking that it might make more sense to let the core library decide what can be changed after creation time and just pass through the error - rather doing that logic in the wrapper.

BTW, this is exposed in the wiki section on type-specific attributes.

This is where I saw it - I imagine that this has been there for some time, not sure how I missed it.