OWFS Design
OWFS Features
OWFS Software
Examples & Usage
|
Table of Contents
Owtcl - OWFS library access commands for Tcl
package
require ow
::OW::init interface ?interface ...? ?options?
::OW::finish
::OW::get ?path?
::OW::put path ?value?
::OW::isdirectory path
::OW::isdir path
owtcl (3)
is a Tcl extension that provides
an interface to OWFS. The underlying interface to the 1-wire bus is identical
to owfs (1)
(filesystem view) and owhttpd (1)
web server interface. Only
the top layer has been modified to return native Tcl data.
The
following low-level commands are possible:
- ::OW::init interface ?interface
...? ?options?
- Connect to 1-wire adapter or owserver. interface defines a way
of connection to the 1-wire bus. Possible values:
- usb | usbN | u | uN
- Direct
connection to the 1-wire interface on the USB port -- DS9490. N - optional number
for multiple usb adapters.
- /dev/ttySx
- Direct connection to a 1-wire interface
on the serial port -- DS9097U or DS9097.
- :port | host:port | socket:/local/socket/path
- Location of an owserver daemon that connects to the 1-wire bus. Multiple
owtcl as well as owfs and owhttpd
programs can access the owserver process
simultaneously. In fact, this will probably be the prefered mode of access
to OWFS for owtcl except in trivial applications.
options allow to set additional
parameters of operation with 1-wire bus. Possible options:
- -format value
- presentation
format of names 1-wire devices. Possible formats:
- f.i
- XX.YYYYYYYYYYYY (default)
- fi
- XXYYYYYYYYYYYY
- f.i.c
- XX.YYYYYYYYYYYY.ZZ
- f.ic
- XX.YYYYYYYYYYYYZZ
- fi.c
- XXYYYYYYYYYYYY.ZZ
- fic
XXYYYYYYYYYYYYZZ
- -cache value
- cache timeout (in seconds)
- -celsius | -fahrenheit
| -kelvin | -rankine
- temperature scale. Default Celsius.
- -readonly
- only allow
reading of 1-wire devices
- -error-print
- Where information/error messages are
printed
- default mixed destination: stderr foreground / syslog background
- syslog only
- stderr only
- dev/null (supress all).
- -error-level
- What kind of
information is printed
- default errors only
- connections/disconnections
- all high level calls
data summary for each call
- ::OW::finish
- Close connection
to 1-wire bus or owserver.
- ::OW::get ?path?
- Returns contents of OWFS directory
as the list if path contains name OWFS directory. If path is name of OWFS
file, returns of contents of this file. For files *.ALL returns a values
list. If path is not defined, contents of root OWFS directory come back.
- ::OW::put path ?value?
- Puts value in OWFS file indicated in path. For files
*.ALL use a value list. If /fIvalue is not defined, puts a empty string.
- ::OW::isdirectory path
- If path is the directory - return 1. Otherwise return
0.
- ::OW::isdir path
- Synonym of ::OW::isdirectory
http://owfs.sourceforge.net
Serg Oskin (serg@oskin.ru)
Table of Contents
|