Am Mittwoch, 13. Dezember 2006 03:28 schrieb Paul Alfille: > > > > I'm impressed. You certainly figured out the code style. > > > > Questions: > > 1. We "read_ROM" and get a positlve result if any devices exist on the > > selected path? > > You currently return the name a of single device. And error if there are > none, or more than one. > > What do you really intend? Do you want to know if there are > A. exactly 1 (and it's number) ? > B more than 0 ? > C more than 1 ? > The "read ROM" onewire command will either return the ID of the single connected device, obviously nothing if no slave is connected, or just plain garbarge if more than a single slave is connected.
I'm after the ID, it saves me from doing a "search ROM". The "no chip connected" situation should return an empty string instead of FF.FFFFFFFFFFFF, just like reading "uncached" would do. I will try to implement it today. It would be nice if we could tell apart the return of "garbage", but I'm currently having problems to identify this situation. In addition, it doesn't seem to be possible to return errors like -ENODEV in aREAD_FUNCTIONs. > > 2. Should we use a name like "not_empty" or "search" ? > > > "search" would be a clear misnomer to me, as there is a "search ROM" command, and "read_ROM" is there to *avoid* the need to issue a "search ROM". Maybe just "simultaneous/id" (and r_id, of course)? Kind regards Jan ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Owfs-developers mailing list Owfs-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/owfs-developers