Re: [Owfs-developers] Creating owlua...

2007-02-01 Thread Matthew Percival
G'Day,

> Well, the goal is that no network packets can crash owserver, so let
> me chase this down.

I have been tracing this and have found the exact line where it
crashes.  ow_locks.c, line 89, pn->ft is NULL and as such, when it is
used, it causes the crash.  I can provide the full context for how it
gets to this line if that helps.

Trying to follow the logic for where it *should* be set, it looks like
it should be set by Parse_Property(), which should be called by
FS_ParsedName_anywhere() when I call FS_ParsedName(path, pn) in my owlua
library.  Following FS_ParsedName_anywhere(), because path == "/", it
will skip the code where Parse_Property() would have been called (the
skipping occurs on ow_parsename.c:144).  It could be that it is supposed
to be set at some other time, but that is how I have understood the
code.

> You are the world's expert on OMAP and OWFS. Are you maintaining that
> adapter code yourself? Where can it be found? Perhaps, if it's ready,
> it can be included in OWFS and thus track changes in the library. 

I wrote the adaptor code some time back.  I meant to merge it in a year
or two ago, but things kept coming up (eg I had to modify the kernel
driver, which meant changes to the ow adaptor code, etc) and it never
happened.  It has been on my `I really aught to do this soon' list for a
while.  When I last tested the OMAP adaptor with owfs it seemed to work.

> You might find testing owlua easier if you try it with owserver
> --fake=01,10,22,05 (i.e. simulated devices). That way you separate
> OMAP and owlua issues.

I have verified that it is not using the OMAP adaptor (though it
*should* be).  For some reason it is using the `bad adaptor' adaptor
(presumably a bug in my owlua code).

-- Matthew

> Paul Alfille
> 
> On 1/31/07, Matthew Percival <[EMAIL PROTECTED]> wrote:
> G'Day,
> 
> > If by path you mean something like
> "/10.23AD234523/temperature" the
> > answer is simple:
> > You use "get" for  the root path ("/" or actually just "")
> and build 
> > from there.
> 
> I had actually tried that before, curious to what
> would happen rather
> than expecting it to be the answer to my question.  That it
> did not
> accept "/" meant nothing to me before, but has now allowed me
> to spot a 
> bug in my code.  It now accepts "/", but I am getting a
> segmentation
> fault in owlib instead.  I have tried to trace it as best I
> can, but can
> only get as far as the `BUS_select(pn2)' call in FS_realdir() 
> (ow_dir.c:459).  I am not sure if it is crashing on that line,
> or within
> the function it calls, but I cannot trace any further.
> 
> I believe this is where it calls the adaptor-specific
> X_select()
> function.  It should be calling OMAP_select() for me, but I do
> not 
> believe it is.  I am calling `owopt('o', optarg, opt_server)'
> in my
> init() function, which should set it to the OMAP
> adaptor.  Unless there
> is another step I have missed along the way.
> 
> -- Matthew 
> 
> > The explanations for what devices support what properties,
> their
> > format, function, measurement units, etc is in the man
> files. That is
> > domain-specific information that the user must know
> indep[endently 
> > (though we'endeavored to make function pretty transparent,
> and must
> > data is returned as straight ascii characters.)
> >
> > Paul Alfille
> >
> > On 1/31/07, Matthew Percival <[EMAIL PROTECTED]> wrote:
> > G'Day,
> >
> > I have been trying to create a owlua using
> owcapi as a
> > basis.  As far
> > as this is concerned, it has been a success --- I
> have an 
> > exact
> > equivalent to owcapi that can now be used from
> Lua.  I just
> > cannot make
> > any use of it!  I can use the OW_init() and
> OW_finish()
> > equivalent 
> > functions without any trouble, but I cannot for the
> life of me
> > work out
> > how to use put/get.  In both cases I need to provide
> a path,
> > and this is
> > where it feels like I am missing a function or two. 
> >
> > How does a person writing their Lua script
> know what
> > path is needed?
> > Presumably they would need to call a function that
> tells them
> > the
> > relevant paths or something.  For

Re: [Owfs-developers] Creating owlua...

2007-02-01 Thread Paul Alfille

Well, the goal is that no network packets can crash owserver, so let me
chase this down.

You are the world's expert on OMAP and OWFS. Are you maintaining that
adapter code yourself? Where can it be found? Perhaps, if it's ready, it can
be included in OWFS and thus track changes in the library.

You might find testing owlua easier if you try it with owserver
--fake=01,10,22,05 (i.e. simulated devices). That way you separate OMAP and
owlua issues.

Paul Alfille

On 1/31/07, Matthew Percival <[EMAIL PROTECTED]> wrote:


G'Day,

> If by path you mean something like "/10.23AD234523/temperature" the
> answer is simple:
> You use "get" for  the root path ("/" or actually just "") and build
> from there.

I had actually tried that before, curious to what would happen
rather
than expecting it to be the answer to my question.  That it did not
accept "/" meant nothing to me before, but has now allowed me to spot a
bug in my code.  It now accepts "/", but I am getting a segmentation
fault in owlib instead.  I have tried to trace it as best I can, but can
only get as far as the `BUS_select(pn2)' call in FS_realdir()
(ow_dir.c:459).  I am not sure if it is crashing on that line, or within
the function it calls, but I cannot trace any further.

I believe this is where it calls the adaptor-specific X_select()
function.  It should be calling OMAP_select() for me, but I do not
believe it is.  I am calling `owopt('o', optarg, opt_server)' in my
init() function, which should set it to the OMAP adaptor.  Unless there
is another step I have missed along the way.

-- Matthew

> The explanations for what devices support what properties, their
> format, function, measurement units, etc is in the man files. That is
> domain-specific information that the user must know indep[endently
> (though we'endeavored to make function pretty transparent, and must
> data is returned as straight ascii characters.)
>
> Paul Alfille
>
> On 1/31/07, Matthew Percival <[EMAIL PROTECTED]> wrote:
> G'Day,
>
> I have been trying to create a owlua using owcapi as a
> basis.  As far
> as this is concerned, it has been a success --- I have an
> exact
> equivalent to owcapi that can now be used from Lua.  I just
> cannot make
> any use of it!  I can use the OW_init() and OW_finish()
> equivalent
> functions without any trouble, but I cannot for the life of me
> work out
> how to use put/get.  In both cases I need to provide a path,
> and this is
> where it feels like I am missing a function or two.
>
> How does a person writing their Lua script know what
> path is needed?
> Presumably they would need to call a function that tells them
> the
> relevant paths or something.  For that matter, what devices
> are
> available and what can we do with them?
>
> I have been trying to work these things out from the
> source code, but I
> am just going around in circles.  I have a C library written
> similar to
> owcapi that allows people to access the 1-Wire net from Lua,
> but no idea
> how to make any practical application of this.  Can anyone
> direct me on
> where to find the answers to this?
>
> Thanks,
>
> Matthew
>
>
>
-
> 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
>
>
-
> 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


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job
easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_

Re: [Owfs-developers] Creating owlua...

2007-01-31 Thread Matthew Percival
G'Day,

> If by path you mean something like "/10.23AD234523/temperature" the
> answer is simple:
> You use "get" for  the root path ("/" or actually just "") and build
> from there.

I had actually tried that before, curious to what would happen rather
than expecting it to be the answer to my question.  That it did not
accept "/" meant nothing to me before, but has now allowed me to spot a
bug in my code.  It now accepts "/", but I am getting a segmentation
fault in owlib instead.  I have tried to trace it as best I can, but can
only get as far as the `BUS_select(pn2)' call in FS_realdir()
(ow_dir.c:459).  I am not sure if it is crashing on that line, or within
the function it calls, but I cannot trace any further.

I believe this is where it calls the adaptor-specific X_select()
function.  It should be calling OMAP_select() for me, but I do not
believe it is.  I am calling `owopt('o', optarg, opt_server)' in my
init() function, which should set it to the OMAP adaptor.  Unless there
is another step I have missed along the way.

-- Matthew

> The explanations for what devices support what properties, their
> format, function, measurement units, etc is in the man files. That is
> domain-specific information that the user must know indep[endently
> (though we'endeavored to make function pretty transparent, and must
> data is returned as straight ascii characters.)
> 
> Paul Alfille
> 
> On 1/31/07, Matthew Percival <[EMAIL PROTECTED]> wrote:
> G'Day,
> 
> I have been trying to create a owlua using owcapi as a
> basis.  As far
> as this is concerned, it has been a success --- I have an
> exact
> equivalent to owcapi that can now be used from Lua.  I just
> cannot make 
> any use of it!  I can use the OW_init() and OW_finish()
> equivalent
> functions without any trouble, but I cannot for the life of me
> work out
> how to use put/get.  In both cases I need to provide a path,
> and this is 
> where it feels like I am missing a function or two.
> 
> How does a person writing their Lua script know what
> path is needed?
> Presumably they would need to call a function that tells them
> the
> relevant paths or something.  For that matter, what devices
> are 
> available and what can we do with them?
> 
> I have been trying to work these things out from the
> source code, but I
> am just going around in circles.  I have a C library written
> similar to
> owcapi that allows people to access the 1-Wire net from Lua,
> but no idea 
> how to make any practical application of this.  Can anyone
> direct me on
> where to find the answers to this?
> 
> Thanks,
> 
> Matthew
> 
> 
> 
> - 
> 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
> 
> -
> 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


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] Creating owlua...

2007-01-31 Thread Paul Alfille

If by path you mean something like "/10.23AD234523/temperature" the answer
is simple:
You use "get" for  the root path ("/" or actually just "") and build from
there.

The explanations for what devices support what properties, their format,
function, measurement units, etc is in the man files. That is
domain-specific information that the user must know indep[endently (though
we'endeavored to make function pretty transparent, and must data is returned
as straight ascii characters.)

Paul Alfille

On 1/31/07, Matthew Percival <[EMAIL PROTECTED]> wrote:


G'Day,

I have been trying to create a owlua using owcapi as a basis.  As
far
as this is concerned, it has been a success --- I have an exact
equivalent to owcapi that can now be used from Lua.  I just cannot make
any use of it!  I can use the OW_init() and OW_finish() equivalent
functions without any trouble, but I cannot for the life of me work out
how to use put/get.  In both cases I need to provide a path, and this is
where it feels like I am missing a function or two.

How does a person writing their Lua script know what path is
needed?
Presumably they would need to call a function that tells them the
relevant paths or something.  For that matter, what devices are
available and what can we do with them?

I have been trying to work these things out from the source code,
but I
am just going around in circles.  I have a C library written similar to
owcapi that allows people to access the 1-Wire net from Lua, but no idea
how to make any practical application of this.  Can anyone direct me on
where to find the answers to this?

Thanks,

Matthew


-
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

-
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


Re: [Owfs-developers] Creating owlua...

2007-01-30 Thread Matthew Percival
G'Day,

I have been trying to create a owlua using owcapi as a basis.  As far
as this is concerned, it has been a success --- I have an exact
equivalent to owcapi that can now be used from Lua.  I just cannot make
any use of it!  I can use the OW_init() and OW_finish() equivalent
functions without any trouble, but I cannot for the life of me work out
how to use put/get.  In both cases I need to provide a path, and this is
where it feels like I am missing a function or two.

How does a person writing their Lua script know what path is needed?
Presumably they would need to call a function that tells them the
relevant paths or something.  For that matter, what devices are
available and what can we do with them?

I have been trying to work these things out from the source code, but I
am just going around in circles.  I have a C library written similar to
owcapi that allows people to access the 1-Wire net from Lua, but no idea
how to make any practical application of this.  Can anyone direct me on
where to find the answers to this?

Thanks,

Matthew


-
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


Re: [Owfs-developers] Creating owlua...

2006-12-13 Thread Paul Alfille

On 12/13/06, Matthew Percival <[EMAIL PROTECTED]> wrote:


G'Day,

I am looking to create a Lua interface to owlib --- effectively
owlua.
I would need to do this as a simple C library that makes the appropriate
calls, however, I have not been able to find any documentation that
would help with this.  owcapi seems like it would be something similar
to what I would need to do, so would I be able to use this as a
basis/guide to make owlua, or would that be a bad idea (incomplete, out
of date, etc)?



OWCAPI should work well. It is current. It's a thin wrapper over owlib (the
main part of OWFS) so your lua module will be a full OWFS prograsm, able to
talk to multiple adapters, owservers, and with local caching).

owtcl uses the owcapi approach.



   If owcapi is fine, I assume the key functions owlua needs are

init(),
get(), put() and finish().  I see owcapi also has OW_init_string(), but
I am unsure as to what its purpose is, or if I would need an equivilent
function for owlua.



init and init_string are equivalent. The only difference is the style that
you want to send the invokation parameters: one long text string
(_init_string e.g. "-F -d /dev/ttyS0 --link=/dev/ttyS1") or the traditional
unix-style array of text strings (_init e.g.
{"progname","-F","-d","/dev/ttyS0","--link=/dev/ttyS1"}


   If owcapi is insufficient, is there anywhere I could get find a

guide
to what would be necessary, or perhaps a owlib API summary?



That's essentially what owcapi is.

   -- Matthew



-
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

-
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


[Owfs-developers] Creating owlua...

2006-12-12 Thread Matthew Percival
G'Day,

I am looking to create a Lua interface to owlib --- effectively owlua.
I would need to do this as a simple C library that makes the appropriate
calls, however, I have not been able to find any documentation that
would help with this.  owcapi seems like it would be something similar
to what I would need to do, so would I be able to use this as a
basis/guide to make owlua, or would that be a bad idea (incomplete, out
of date, etc)?

If owcapi is fine, I assume the key functions owlua needs are init(),
get(), put() and finish().  I see owcapi also has OW_init_string(), but
I am unsure as to what its purpose is, or if I would need an equivilent
function for owlua.

If owcapi is insufficient, is there anywhere I could get find a guide
to what would be necessary, or perhaps a owlib API summary?

-- Matthew


-
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