Package weather :: Package stations :: Module davis :: Class VantagePro
[show private | hide private]
[frames | no frames]

Class VantagePro


A class capable of reading raw (binary) weather data from a vantage pro console and parsing it into usable scalar (integer/long/real) values.

The data read from the console is in binary format, and must be converted to hex using a least-ordered nybble strategy. The hex is in fixed-length format, and values can be extracted using an offset and length strategy (e.g. outside humidity starts at position 56 and is 2 bytes long).
Method Summary
  __init__(self, device, start)
  get_field(self, start, len)
returns the value in the field specified by the starting offset and of the length provided.
  parse(self)
read and parse a set of data read from the console.

Method Details

get_field(self, start, len)

returns the value in the field specified by the starting offset and of the length provided. this value is computed by first reversing the hex data, followed by conversion of the hex data to a long.

parse(self)

read and parse a set of data read from the console. after the data is parsed it is available in the fields variable.

Generated by Epydoc 2.0 on Mon Mar 27 23:18:47 2006 http://epydoc.sf.net