S7NetPlus / s7netplus

S7.NET+ -- A .NET library to connect to Siemens Step7 devices
MIT License
1.3k stars 580 forks source link

Modify rack/slot data type to byte #474

Closed LUJIAN2020 closed 1 year ago

mycroes commented 1 year ago

LGTM. I think GitVersion is having issues, will have to look into that before I can merge this...

gfoidl commented 1 year ago

This is a breaking change (change in public contract). What's the benefit of having byte instead of short here? Using only 1 bytes instead of 2 won't have any real effect on this type. If something is changed I'd do Int16 -> short.

mycroes commented 1 year ago

One benefit is that you can't use negative values. I'm not sure why this ever was declared as short, because the allowed values are constrained between 0 and 15 either way...

I'm not necessarily opposed to this (breaking) change.