I think I'm starting to see your question. You are wondering how to read and
write in the middle of a "file" (memory buffer).

The command line is an awkward place to do partial file operations.

>From a C program, you can use lseek and read
>From the owshell routines, there is
owread --size=nnn --start=nnn --hex ....
owwrite --start=nnn --hex ....

>From the language bindings there is ow_lread and ow_lwrite

Also OWNet (like OWNet.pm the perl routine) use the ownet protocol (the tcp
protocol) that includes size and offset.

I don't think you can use the web interface to do partial reads or writes,
and I'm not sure about ftp.

What we did with BAE is make distinct memory areas (like the eeprom area)
have their own property, and then expect users to use them as atomic blocks.
The fact that the chip only permits smaller pages to be written at a time is
hidden.

Can you explain your requirements more extensively?

Paul Alfille

On Thu, Jul 7, 2011 at 3:22 PM, Eloy Paris <pe...@chapus.net> wrote:

> On 07/07/2011 03:15 PM, Eloy Paris wrote:
>
> [...]
>
> > Writing the micro-controller code to handle the memory read (and
> > subsequent 1-Wire transfer from micro-controller to bus master) is easy
> > but I am struggling with the OWFS side of things.
>
> I could do something like:
>
> $ echo 0 > /owfs/xx.nnnnnnnnn/generic/offset
> $ echo 128 > /owfs/xx.nnnnnnnnn/generic/length
> $ cat /owfs/xx.nnnnnnnnn/generic/memory > file.bin
>
> However, the OWFS BAE support does not have such an interface, i.e.
> "offset" and "length" directory entries; instead, it seems like it
> expects offset and length parameters as part of the same read operation,
> so I am confused :-(
>
> Puzzled,
>
> Eloy Paris.-
>
>
> ------------------------------------------------------------------------------
> All of the data generated in your IT infrastructure is seriously valuable.
> Why? It contains a definitive record of application performance, security
> threats, fraudulent activity, and more. Splunk takes this data and makes
> sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-d2d-c2
> _______________________________________________
> Owfs-developers mailing list
> Owfs-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/owfs-developers
>
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to