There are two variant:
1. string coma-separated (API original):
% ::OW::get uncached
bus.0/,28.FB450B000000/,12.90D21C000000/,12.646A26000000/,12.0C4A02000000/,12.8C4229000000/,12.264329000000/,12.A76721000000/,26.0A3026000000/,alarm/,simultaneous/
%

2. "list" in terms tcl:
% ::OW::get -list uncached
bus.0/ 28.FB450B000000/ 12.90D21C000000/ 12.646A26000000/ 
12.0C4A02000000/ 12.8C4229000000/ 12.264329000000/ 12.A76721000000/ 
26.0A3026000000/ alarm/ simultaneous/
% lindex [::OW::get -list uncached] 1
28.FB450B000000/
%


Serg

Christian Magnusson wrote:
>  
> 
> I added a new example-file under module/swig/tcl/example/test.tcl, and 
> it works now.
> 
> I don’t have any tcl-knowledge at all, but do you say that the results 
> should be delimited by spaces and not “,” ?
> 
> The output of the example I added looks like this…
> 
>  
> 
> Directory-listing of /
> 
> structure/,bus.0/,bus.1/,uncached/,settings/,system/,statistics/,28.4AEC29CDBAAB/,10.67C6697351FF/,alarm/,simultaneous/
> 
>  
> 
> Read /10.67C6697351FF/temperature
> 
>      36.4784
> 
>  
> 
> Read /10.67C6697351FF/type
> 
> DS18S20
> 
>  
> 
> Read system/adapter/name.ALL
> 
> Simulated,Simulated
> 
>  
> 
> /Christian
> 
>  
> 
>  
> 
> *From:* [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] *On Behalf Of 
> *Steve Malenfant
> *Sent:* den 4 juni 2007 21:51
> *To:* [email protected]
> *Subject:* Re: [Owfs-developers] (C) API question
> 
>  
> 
> There is definitively something wrong in owfs-tcl in 2.6
> 
>  
> 
> The path returned always contains "," instead of white space " ".  Also 
> the result always comes back with nothing when it's at the end of the tree.
> 
>  
> 
> Steve M.
> 
>  
> 
> On 6/4/07, *Christian Magnusson* <[EMAIL PROTECTED] <mailto:[EMAIL 
> PROTECTED]>> wrote:
> 
> The problem is in Fowq_output_offset_and_size(). When I looked at the 
> variables, OWQ_size and OWQ_length didn't contain correct values.
> 
>  
> 
>   DEBUG: OWQ_size=0 OWQ_length=-1028883844 length=12 copy_length=12
> 
>  
> 
> After this, copy_length is set to 0 since OWQ_size == 0.
> 
> if ( copy_length > OWQ_size(owq) ) copy_length = OWQ_size(owq) ;
> 
>  
> 
> This results into a 0 copied bytes to the output-buffer.
> 
> I tried to just comment away this if-statement, and then it worked good… 
> I'm not sure if this is correct though… OWQ_size should be set to some 
> bigger value in some other place I guess.
> 
>  
> 
> /Christian
> 
>  
> 
>  
> 
>  
> 
> *From:* [EMAIL PROTECTED] 
> <mailto:[EMAIL PROTECTED]> 
> [mailto:[EMAIL PROTECTED] 
> <mailto:[EMAIL PROTECTED]>] *On Behalf Of 
> *Paul Alfille
> *Sent:* den 2 juni 2007 14:46
> *To:* [email protected] 
> <mailto:[email protected]>
> *Subject:* Re: [Owfs-developers] (C) API question
> 
>  
> 
> Sounds like a bug in owcapi -- I'll check.
> 
> Paul Alfille
> 
> On 6/2/07, *Sven Geggus* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:
> 
> Hi there,
> 
> my last posting I assumed this to be a bug of owtcl, but its not!
> 
> Presumably I have just got some misunderstanding of the API.
> 
> Anyway, this did work with some older Version of owfs!
> 
> So, whats wrong with this piece of code:
> 
> --cut--
> int main() {
>   char *s;
>   size_t n;
> 
>   if(OW_init("localhost:55555") !=0) exit(1);;
> 
>   OW_get("/10.B963D4000800/type",&s,&n);
>   printf("%d\n",n);
>   if (n >0) printf("%s\n",s);
> 
>   OW_finish();
>   exit(EXIT_SUCCESS);
> }
> --cut--
> 
> BTW, it works just fine, when I replace "/10.B963D4000800/type" by
> "/10.B963D4000800" only.
> 
> Sven
> 
> --
> /* Fuck me gently with a chainsaw... */
> (David S. Miller in /usr/src/linux/arch/sparc/kernel/ptrace.c)
> 
> /me is [EMAIL PROTECTED], http://sven.gegg.us/ on the Web
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/ <http://sourceforge.net/powerbar/db2/>
> _______________________________________________
> Owfs-developers mailing list
> [email protected] 
> <mailto:[email protected]>
> https://lists.sourceforge.net/lists/listinfo/owfs-developers
> 
>  
> 
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/ <http://sourceforge.net/powerbar/db2/>
> _______________________________________________
> Owfs-developers mailing list
> [email protected] 
> <mailto:[email protected]>
> https://lists.sourceforge.net/lists/listinfo/owfs-developers
> 
>  
> 
> 
> ------------------------------------------------------------------------
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Owfs-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/owfs-developers

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to