Hi,

Le 05/11/2011 20:38, Eloy Paris a écrit :
> In my particular case I was mostly thinking along the lines of "easier
> to implement on the microcontroller and in less space". Performance-wise
> I am sure there is a tiny advantage of doing an N-byte data transfer
> than N 1-byte transfers, especially since each 1-byte transfer requires
> sending to the device different function commands. As you say, however,
> I am not sure it is worth the departure from what seems to be the
> "standard" so far.

   Just some thoughts about your proposal.
   First, if the hardware (the 1-wire device) cannot get all the part of
the information in one transaction, like several people, I really think
that grouping information must be done above and not within owfs.

   That said, reading your mails, I'm under the impression that, for your
device, it is possible to retrieve the three info with only one 1-wire
transaction. If this is the case, it can be useful to allow (for
performance reason) to use this 'feature'. I see two ways to do this:

- add another file (as you suggested)
   * pro: interface similar to other ones (ie read in a file) for clients
   * cons: difficult to extend to different kind of devices, lots of
     new file names to get the same kinds of data (the temperature can be
     read from different files), lost of the 'paradigm' one file per value

- add a trigger file that, when wrote in it, trigger the read of all
   values. It can be improved by allowing to choose the read values
   with what we write in this trigger file (and with a write error if
   what we ask cannot be read by the hardware in one transaction)
   Then, values are read from the (cached) files without triggering
   any other 1-wire transaction.
   This is very similar (but not identical) to the behavior of the
   'simultaneous' file that allow to trigger the read of all temperatures
   on one 1-wire bus.
   * pro: we keep one file per value, it can be possible to ask the
     device to send some parts of the whole data (without adding lots
     of different files for all possible combination of data)
     I also think is it generic enough to allow implementation for
     different devices
   * cons: the software will still need to access different files
     (one write for the trigger, then all properties to get the values)
     but this can be mitigate by using an upper layer on top of owfs
     [I think but I do not check that cached owfs access are far more
     quicker than a real 1-wire transaction]

   Regards,
     Vincent

-- 
Vincent Danjean          Adresse: Laboratoire d'Informatique de Grenoble
Téléphone:  +33 4 76 61 20 11            ENSIMAG - antenne de Montbonnot
Fax:        +33 4 76 61 20 99            ZIRST 51, avenue Jean Kuntzmann
Email: [email protected]           38330 Montbonnot Saint Martin

------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to