Thanks Stefano,

You are right, the code checks for the null-terminated string.

In theory this shouldn't be needed, the length of the data and the path are
also sent. I just have to make sure that all the ownet clients are rigorous
about filling out those fields correctly.

Paul


On Sat, Apr 5, 2014 at 6:43 PM, Stefano Miccoli <mo...@icloud.com> wrote:

> Hi all,
>
> it's a long time that I'm using owfs/owserver to read a network of 1-wire
> sensors in a server room, with great satisfaction for it's stability and
> ease of use.
>
> My main scripting language is python, and somehow I do not like the
> official python packages, so I decided to write my own implementation of
> the ownet protocol. If you are interested you can find my implementation on
> pypi https://pypi.python.org/pypi/pyownet or github
> https://github.com/miccoli/pyownet/ (The code should be pretty stable,
> I'm using it 24/7 in a production environment, but docs are scarce,
> therefore it is still marked as alpha development status.)
>
> While implementing the package, I found some problems and difficulties
> that I would like to share with you.
>
>
> 1) Null terminated strings.
>
> The payload in most messages has to be null-terminated. While this can be
> regarded as natural for the C programmer, it is somehow unusual from the
> python point of view, where '/' and '/\x00' are different strings.
>
> Maybe this should be made more clear in
> http://owfs.org/index.php?page=tcp-messages where I read
>
> Payload: data string. Either just a filename path (for read or directory,
> or a null terminated path with data to be written afterwards
>
>
> It should be
>
> Payload: *null terminated* data string...
>
> just to make clear that the null terminator has to be always present, even
> when no data follows the path.
>
>
> 2) Error codes / strings.
>
> Error messages associated with the error codes can be retrieved with
> "owserver --help=error" or read from '/settings/return_codes'. I use this
> error messages in the exceptions raised by my code, but there are some
> inconsistencies.
>
> a) when you try to access a non existent path, you get error
> 1 'Startup - command line parameters invalid'
> while it should be
> 2 'legacy - No such entity'
>
> b) all owserver/ownet error messages start with 'legacy - '... why?
> Shouldn't this be 'owserver - ...' or 'ownet - ..."
>
>
> 3) Server version
>
> I was not able to find any way to determine the owserver version from a
> client: couldn't be useful to add a '/settings/version' node to owfs?
>
>
>
> Bye and compliments to all for the excellent work
>
> Stefano
>
>
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Owfs-developers mailing list
> Owfs-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/owfs-developers
>
>
------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment 
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to