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. |
| |
_calc_derived_fields(self,
fields)
calculates the derived fields (those fields that are calculated) |
| |
_hexify(self)
|
| |
_read(self)
reads a raw string containing data read from the device provided (in
/dev/XXX) format. |