I'm still having difficulties with structure.
For example, I would expect /opt/owfs/bin/owread -s
192.168.1.10:3001/structure/1F/main to return proper response saying
this is a directory
instead of: ServerRead: Data error on /structure/1F/main
And I would expect /opt/owfs/bin/owpresent -s
192.168.1.10:3001/structure/10/id/foobar to return 0 (instead of 1).
Can I add these to the feature request list? :)
Or is there a rationale to why this is so?
Cheers,
Patrik
Den 26 april 2011 11:00 skrev Patrik Åkerfeldt <patrik.akerfe...@gmail.com>:
> I'm running 2.7p35 and owdir /structure/ does not list my alias. And
> owdir /structure/MyAlias/ shows nothing. Furthermore owread
> /structure/MyAlias/family gives:
> ServerRead: Data error on /structure/MyAlias/family
>
> Was the support for using alias name in structure path added after
> 2.7p35 perhaps?
>
> Even if that was possible, say I have the path:
> /A/aux/B/main/C/errata/die
>
> How would I manage to know which "directories" in the path corresponds
> to devices? In this case, most likely "A", "B" and "C".
>
> Would the right approach be to see that there is no "B" in
> /structure/A/aux/, hence it must be a separate 1-wire device? And
> similar, there is no "C" in /structure/B/main => separate 1-wire
> device.
>
> /på
>
>
> 2011/4/26 Paul Alfille <paul.alfi...@gmail.com>:
> > The next release will improve alias handling.
> >
> > Nevertheless, alias_name->family should give family code.
> >
> > /structure/(alias_name/family)/...
> >
> > In general you can get data about an alias' unique code by using the
> properties:
> >
> > # first byte
> > alias_name/family
> >
> > # middle 6 bytes
> > alias_name/id
> >
> > # last byte
> > alias_name/crc8
> >
> > # all together
> > alias_name/address
> >
> > When not using an alias name these are purely convenience properties.
> > With an alias, you need a way to get the address. (Of course you
> > specified the alias->address mapping in the configuration file and can
> > retrieve it with /settings/alias/list.
> >
> > Paul Alfille
> >
> > 2011/4/25 Patrik Åkerfeldt <patrik.akerfe...@gmail.com>:
> >> Hi,
> >>
> >> I'm looking to update the jowfsclient library with both fixes and new
> >> features. But I just ran into some problems.
> >>
> >> My user story is pretty much this: I want a generic way of reading the
> >> structure information from any type of address (including aliases).
> >>
> >> So, for example:
> >> Given /10.AC8CB6110800/temperature I want to read information from
> >> /structure/10/temperature
> >> But also:
> >> Given /MyAlias/vis I want to read information from /structure/26/vis
> >> (if MyAlias is of family 26).
> >> Or even messier:
> >> Given /MyOtherAlias/errata/die I want to read information from
> >> /structure/10/errata/die (or whatever family MyOtherAlias is of).
> >> Or worst of all?:
> >> Given /MyThirdAlias/main/FF.940400110100/backlight I want to read
> >> information from /structure/FF/backlight
> >>
> >> Okay, so I have two problems as it seems.
> >> 1. How do I get the family code from the last device id in a full
> address.
> >> 2. How do I find the "property path" following the the last device id
> >> in a full address (this is perhaps straightforward if 1. is solved).
> >>
> >> My most recent approach was this (illustrated with an example):
> >> Given the address /MyAlias/vis, check if /MyAlias/vis/family exists
> >> (with the PRESENCE message type).
> >> If not, pull vis from the address and check if /MyAlias/family exists.
> >> If yes, we have found the last device id = /MyAlias with family code
> >> accessible through /MyAlias/family and the property path /vis
> >>
> >> The issue with this approach (which I just noticed) is that owserver
> >> claims that /MyAlias/vis/id is present. It's even possible to read
> >> from this address (and by that reading the vis property).
> >>
> >> So, is there any other way of solving my user story? The cleaner the
> >> better of course. The issue is really about finding the root path to a
> >> device in an address.
> >>
> >>
> ------------------------------------------------------------------------------
> >> WhatsUp Gold - Download Free Network Management Software
> >> The most intuitive, comprehensive, and cost-effective network
> >> management toolset available today. Delivers lowest initial
> >> acquisition cost and overall TCO of any competing solution.
> >> http://p.sf.net/sfu/whatsupgold-sd
> >> _______________________________________________
> >> Owfs-developers mailing list
> >> Owfs-developers@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/owfs-developers
> >>
> >
> >
> ------------------------------------------------------------------------------
> > WhatsUp Gold - Download Free Network Management Software
> > The most intuitive, comprehensive, and cost-effective network
> > management toolset available today. Delivers lowest initial
> > acquisition cost and overall TCO of any competing solution.
> > http://p.sf.net/sfu/whatsupgold-sd
> > _______________________________________________
> > Owfs-developers mailing list
> > Owfs-developers@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/owfs-developers
> >
>
------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers