Ok, the /structure directory returns a small text file for each
possible property
e.g. owserver --fake=10
owread /structure/10/temperature
t,000000,000001,ro,000012,

Where the first field ("t") is the type:
D - directory
i- integer
u - unsigned integer
f - floating point
l - alias
a - ascii
b - binary
y - yes/no
d - date
t - temperature
g -temperature gap (delta)
p - pressure
 Note that i,u,y can all be treated as integer,
 and temperature and temperature gap are floating point with scaling applied
 and pressure is not yet implemented
 and binary and ascii (and link) are similar except in the handling of
input data
All variables are passed around as text strings externally and within
owserver protocol.

The second field is the index (if an array variable).
  0 if not an array
  -1 if it's the .ALL (comma separated list)
  -2 if it's the .BYTE (yes/no array as a bitfield

The third field is the size of the array (in elements)
  1 for scalar variables

The fourth field is the read/write mode
  oo,wo,ro,rw

The fifth field is the size.
  Usually 12 chars for numbers
  Actual bytes/chars for ascii and binary

Does this expose all the data you need?

Paul Alfille

On Fri, Apr 1, 2011 at 9:07 AM, Roberto Spadim <[email protected]> wrote:
> check ownet.php there's something about it too, it check not only one
> file, but have a cache about file informations (types)
> the information about files must be compatible with FUSE must check
> fuse docs and see what can be done
>
> 2011/4/1 Paul Alfille <[email protected]>:
>> Have you looked at the "structure" entries? Does it give you the
>> information you need? Otherwise, I think your idea has merit. This
>> information could be included in every owserver response (with a bump
>> in protocol number and preserving backwards compatibility).
>>
>> Paul Alfille
>>
>> On Fri, Apr 1, 2011 at 6:07 AM, Vincent Danjean <[email protected]> 
>> wrote:
>>>  Hi,
>>>
>>>  I would like to propose a new command for owserver. Currently, when
>>> we want to list directories, several commands are available, at least
>>> DIR and DIRALLSLASH. Moreover, we can use flags in the command to
>>> add (or not) to the listing system files.
>>>  If a software want automatically scan a directory and know which
>>> kind of files are present, it needs at least two invocations of
>>> DIRALLSLASH to discove the properties of directory entries (system or
>>> not, directory or file). And some other properties are known by
>>> owfs but cannot be discovered by software. I mean:
>>> - is the file readable ?
>>> - is the file writable ?
>>> - can the file contents change ? (never for the 'type' property for example)
>>> - what is the type of the data ? (float, int, string)
>>> - ...
>>>
>>>  I can think of this kind of flags:
>>> r: readable
>>> w: writable
>>> d: directory (R/W does not apply ?)
>>> i: immuable (contents never changes)
>>> s: system file
>>> ti: contents is always an integer
>>> tf: contents is always a double
>>> ts: contents is a string
>>> l: this file is a link (ie alias)
>>>
>>>  The format of the answer can be problematic if all POSIX filename are
>>> allowed for aliases and if we want a ASCII answer. A possible format would
>>> be for each entry:
>>> flags1 flags2 ... name:X [link:Y]
>>> filename1
>>> [filename2...]
>>> where flagsX are previous flags (boolean properties)
>>> and name:X, link:Y, ... are properties with argument that will follow
>>> in the next X, Y lines.
>>> In my example, there will nearly always be name:1 (name of the file
>>> on one line, ie without "\n" in the name of the file)
>>> And link:Y would be present for aliases (generally, Y would be 1
>>> unless there is "\n" in the target of the alias)
>>>
>>>  What do you think of this ?
>>>  And is the info (immuable, format, ...) already exported by drivers ?
>>>
>>> This command can be extended over time to give more info if needed
>>> (client should ignore unknown attributes, or the request can include
>>> before the path the list of attributes we are interested in)
>>>
>>>  Regards,
>>>    Vincent
>>>
>>> ------------------------------------------------------------------------------
>>> Create and publish websites with WebMatrix
>>> Use the most popular FREE web apps or write code yourself;
>>> WebMatrix provides all the features you need to develop and
>>> publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
>>> _______________________________________________
>>> Owfs-developers mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/owfs-developers
>>>
>>
>> ------------------------------------------------------------------------------
>> Create and publish websites with WebMatrix
>> Use the most popular FREE web apps or write code yourself;
>> WebMatrix provides all the features you need to develop and
>> publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
>> _______________________________________________
>> Owfs-developers mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/owfs-developers
>>
>>
>
>
>
> --
> Roberto Spadim
> Spadim Technology / SPAEmpresarial
>
> ------------------------------------------------------------------------------
> Create and publish websites with WebMatrix
> Use the most popular FREE web apps or write code yourself;
> WebMatrix provides all the features you need to develop and
> publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
> _______________________________________________
> Owfs-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/owfs-developers
>

------------------------------------------------------------------------------
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to