Am 17.11.2015 um 15:59 schrieb Matthias Urlichs: > On 17.11.2015 15:12, Jan Kandziora wrote: >> Errm. That's exactly the same as a "two-bit-array" with valid values 00, >> 01, 10. > > Right. However, bits are supposed to be independent of each other. These > are not. > > I suppose one could use "main", "aux" and "none" instead. Or define > these constants as such, somewhere. > Please, not. That's even worse as it requires strings to be parsed. "Things go wrong with strings attached."
>> The reason I have used "mainselect" and "auxselect" in my patch was it >> is a write-only value anyway and I did not want to introduce arbitrary >> numerical values to have a meaning. > > I disagree. You have state ("the branch that's currently active") which > you can read (or at least you could, up to April 2010 …) and write. > IIRC reading "branch" had made no sense at all because the bus selection scheme back then always disabled all branches first, then selected all DS2409 up to the one in question. So it had always read "no branch active". It's different now but I can't remember when Paul made the change. > The fact that the implementation of reading vs. writing this state is > wildly different at the chip level is not something I want the user of > OWFS to concern themselves with. > Well, ok. Then making the "branch" node read/write is the way to go. Kind regards Jan ------------------------------------------------------------------------------ _______________________________________________ Owfs-developers mailing list Owfs-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/owfs-developers