> On 25 Nov 2015, at 14:56, Jan Kandziora <j...@gmx.de> wrote:
>
>> I understand that ow_get cannot be scrapped right now, but
>> it should at least be deprecated.
> Well, please suggest a mechanism which does not break existing ownet
> language bindings. Or you have to clean up the mess all on your own.
I agree… API changes are a mess, and should not be implemented lightheartedly.
But as as you clearly stated ownet clients should always first try owdir and,
on an EISDIR error, issue owread. (Or use the dirslash command from the
beginning.) I cannot think of a meaningful use of owget, so I was suggesting
only to deprecate it: that is clearly state in all possible places that owget
should not be used. But of course, dropping support for owget in it’s present
state should be delayed to OWFS 4.0.
My personal suggestion is to try to start thinking about OWFS resources (ownet
flavour) like URIs:
owserver://hostname:port/sensorXY/a-value
<owserver://hostname:port/sensorXY/a-value>
owserver://hostname:port/sensorXY/sub-dir/
<owserver://hostname:port/sensorXY/sub-dir/>
The first URI (not ending with a slash) denotes something that can be read (a
temperature, e.g).
The second URI (ending with a slash) denotes a subdirectory, which can be
listed.
In this scheme
owserver://hostname:port/sensorXY/a-value
<owserver://hostname:port/sensorXY/a-value>/
owserver://hostname:port/sensorXY/sub-dir
<owserver://hostname:port/sensorXY/sub-dir>
are invalid URIs, since you cannot dir a value or read a directory.
If this scheme is implemented owget(‘/a/b/c’) and owget(‘/a/b/c/‘) would
clearly denote different operations and there is no more ambiguity.
A concrete implementation of this idea is in my example program
https://github.com/miccoli/pyownet/blob/master/examples/owget.py
S.
------------------------------------------------------------------------------
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741551&iu=/4140
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers