Module waterlevel
source code
Autogenerated python functions to serialize/deserialize binary
messages.
Generated by: ./aisxmlbinmsg2py.py
Need to then wrap these functions with the outer AIS packet and then
convert the whole binary blob to a NMEA string. Those functions are not
currently provided in this file.
serialize: python to ais binary deserialize: ais binary to python
The generated code uses translators.py, binary.py, and aisstring.py
which should be packaged with the resulting files.
Requires:
Author:
xmlbinmsg
Version:
4791
Status:
under development
License:
Generated code has no license
|
Testwaterlevel
Uses the testvalue tag text from each type to build a test case
for the waterlevel message
|
BitVector
|
waterlevelEncode(params,
validate=False)
Create a waterlevel binary message payload to pack into an AIS Msg
waterlevel.
|
dict
|
waterlevelDecode(bv,
validate=False)
Unpack a waterlevel message
|
stdout
|
waterlevelPrint(params,
out=sys.stdout)
Print a waterlevel message to stdout.
|
dict
|
waterlevelTestParams()
Return a params file base on the testvalue tags.
|
|
__date__ = '2006-12-12'
Date of last svn commit
|
|
TrueBV = <BitVector.BitVector object at 0x1582230>
Why always rebuild the True bit? This should speed things up a
bunch
|
|
FalseBV = <BitVector.BitVector object at 0x15822d0>
Why always rebuild the False bit? This should speed things up a
bunch
|
Create a waterlevel binary message payload to pack into an AIS Msg
waterlevel.
Fields in params:
-
dac(uint): Designated Area Code (field automatically set to
"366")
-
fid(uint): Functional Identifier (field automatically set to
"1")
-
efid(uint): extended functional identifier (field automatically
set to "12")
-
timetag_month(uint): Time the measurement represents month
1..12
-
timetag_day(uint): Time the measurement represents day of the
month 1..31
-
timetag_hour(uint): Time the measurement represents UTC hours
0..23
-
timetag_min(uint): Time the measurement represents minutes
-
timetag_sec(uint): Time the measurement represents seconds
-
stationid(aisstr6): Character identifier of the station. Usually
a number.
-
stationloc_longitude(decimal): Location of the sensor taking the
water level measurement or position of prediction East West
location
-
stationloc_latitude(decimal): Location of the sensor taking the
water level measurement or position of prediction North South
location
-
waterlevel(int): Water level in centimeters
-
datum(uint): What reference datum applies to the value
-
sigma(float): Standard deviation of 1 second samples used to
compute the water level height
-
o(uint): Count of number of samples that fall outside a 3-sigma
band about the mean
-
levelinferred(bool): indicates that the water level value has been
inferred
-
flat_tolerance_exceeded(bool): flat tolerance limit was exceeded.
Need better descr
-
rate_tolerance_exceeded(bool): rate of change tolerance limit was
exceeded
-
temp_tolerance_exceeded(bool): temperature difference tolerance
limit was exceeded
-
expected_height_exceeded(bool): either the maximum or minimum
expected water level height limit was exceeded
-
link_down(bool): Unable to communicate with the tide system. All
data invalid
-
timeLastMeasured_month(uint): Time since last measured value was
available month 1..12
-
timeLastMeasured_day(uint): Time since last measured value was
available day of the month 1..31
-
timeLastMeasured_hour(uint): Time since last measured value was
available UTC hours 0..23
-
timeLastMeasured_min(uint): Time since last measured value was
available minutes
-
timeLastMeasured_sec(uint): Time since last measured value was
available seconds
-
- Parameters:
params - Dictionary of field names/values. Throws a ValueError
exception if required is missing
validate - Set to true to cause checking to occur. Runs slower. FIX:
not implemented.
- Returns:
BitVector
- encoded binary message (for binary messages, this needs to be
wrapped in a msg 8
|
Unpack a waterlevel message
Fields in params:
-
dac(uint): Designated Area Code (field automatically set to
"366")
-
fid(uint): Functional Identifier (field automatically set to
"1")
-
efid(uint): extended functional identifier (field automatically
set to "12")
-
timetag_month(uint): Time the measurement represents month
1..12
-
timetag_day(uint): Time the measurement represents day of the
month 1..31
-
timetag_hour(uint): Time the measurement represents UTC hours
0..23
-
timetag_min(uint): Time the measurement represents minutes
-
timetag_sec(uint): Time the measurement represents seconds
-
stationid(aisstr6): Character identifier of the station. Usually
a number.
-
stationloc_longitude(decimal): Location of the sensor taking the
water level measurement or position of prediction East West
location
-
stationloc_latitude(decimal): Location of the sensor taking the
water level measurement or position of prediction North South
location
-
waterlevel(int): Water level in centimeters
-
datum(uint): What reference datum applies to the value
-
sigma(float): Standard deviation of 1 second samples used to
compute the water level height
-
o(uint): Count of number of samples that fall outside a 3-sigma
band about the mean
-
levelinferred(bool): indicates that the water level value has been
inferred
-
flat_tolerance_exceeded(bool): flat tolerance limit was exceeded.
Need better descr
-
rate_tolerance_exceeded(bool): rate of change tolerance limit was
exceeded
-
temp_tolerance_exceeded(bool): temperature difference tolerance
limit was exceeded
-
expected_height_exceeded(bool): either the maximum or minimum
expected water level height limit was exceeded
-
link_down(bool): Unable to communicate with the tide system. All
data invalid
-
timeLastMeasured_month(uint): Time since last measured value was
available month 1..12
-
timeLastMeasured_day(uint): Time since last measured value was
available day of the month 1..31
-
timeLastMeasured_hour(uint): Time since last measured value was
available UTC hours 0..23
-
timeLastMeasured_min(uint): Time since last measured value was
available minutes
-
timeLastMeasured_sec(uint): Time since last measured value was
available seconds
-
- Parameters:
bv (BitVector ) - Bits defining a message
validate - Set to true to cause checking to occur. Runs slower. FIX:
not implemented.
- Returns:
dict
- params
|
Print a waterlevel message to stdout.
Fields in params:
-
dac(uint): Designated Area Code (field automatically set to
"366")
-
fid(uint): Functional Identifier (field automatically set to
"1")
-
efid(uint): extended functional identifier (field automatically
set to "12")
-
timetag_month(uint): Time the measurement represents month
1..12
-
timetag_day(uint): Time the measurement represents day of the
month 1..31
-
timetag_hour(uint): Time the measurement represents UTC hours
0..23
-
timetag_min(uint): Time the measurement represents minutes
-
timetag_sec(uint): Time the measurement represents seconds
-
stationid(aisstr6): Character identifier of the station. Usually
a number.
-
stationloc_longitude(decimal): Location of the sensor taking the
water level measurement or position of prediction East West
location
-
stationloc_latitude(decimal): Location of the sensor taking the
water level measurement or position of prediction North South
location
-
waterlevel(int): Water level in centimeters
-
datum(uint): What reference datum applies to the value
-
sigma(float): Standard deviation of 1 second samples used to
compute the water level height
-
o(uint): Count of number of samples that fall outside a 3-sigma
band about the mean
-
levelinferred(bool): indicates that the water level value has been
inferred
-
flat_tolerance_exceeded(bool): flat tolerance limit was exceeded.
Need better descr
-
rate_tolerance_exceeded(bool): rate of change tolerance limit was
exceeded
-
temp_tolerance_exceeded(bool): temperature difference tolerance
limit was exceeded
-
expected_height_exceeded(bool): either the maximum or minimum
expected water level height limit was exceeded
-
link_down(bool): Unable to communicate with the tide system. All
data invalid
-
timeLastMeasured_month(uint): Time since last measured value was
available month 1..12
-
timeLastMeasured_day(uint): Time since last measured value was
available day of the month 1..31
-
timeLastMeasured_hour(uint): Time since last measured value was
available UTC hours 0..23
-
timeLastMeasured_min(uint): Time since last measured value was
available minutes
-
timeLastMeasured_sec(uint): Time since last measured value was
available seconds
-
- Parameters:
params - Dictionary of field names/values.
out - File like object to write to
- Returns:
stdout
- text to out
|
Return a params file base on the testvalue tags.
-
- Returns:
dict
- params based on testvalue tags
|
__date__
Date of last svn commit
-
- Value:
|
TrueBV
Why always rebuild the True bit? This should speed things up a
bunch
-
- Value:
<BitVector.BitVector object at 0x1582230>
|
|
FalseBV
Why always rebuild the False bit? This should speed things up a
bunch
-
- Value:
<BitVector.BitVector object at 0x15822d0>
|
|