Tester adapter
Purpose
The Tester adapter is like the Fake adapter, but gives predicatable values rather than random values. This can be used to make automated tests of OWFS to check modifications.
Command line
The tester bus is invoked from the command line for owfs, owhttpd, owftpd or (most commonly) owserver. It can also be included in the configuration file.
More than one tester bus can be used. Each bus can include more than one device (specified by family code). Other busses can be interspersed.
An example, with two tester busses and one USB:
owserver --tester=10,22,3D -u --tester=01,05,1F,11
Numbering scheme
Each device on the tester bus has (predicatble) properites based on
- family code
- tester_bus number (which tester bus)
- device number (which device on this tester bus)
- index (for array properties like PIO.A)
For example, using the command line shown above, the numbering would be:
Addresses
bit | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
---|---|---|---|---|---|---|---|---|
value | family code | tester_bus low | tester_bus high | family code | ^(family code) | device low | device high | CRC8 |
Reading data
type | value |
---|---|
yes-no | ( family_code + tester_bus + device + index ) is odd |
integer | ( family_code + tester_bus + device + index ) |
floating point | ( family_code + tester_bus + device + index ) / 10 |
temperature | ( family_code + tester_bus + device + index ) / 10 in °C |
temperature gap | ( family_code + tester_bus + device + index ) / 10 in °C |
date | March 23, 2007 |
ascii | device address (16 characters) repeated over and over |
binary | device address (8 bytes) repeated over and over |
Writing data
How to use
Previous page: Fake adapter
Next page: usb USB9097