Module sls_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
|
Testsls_waterlevel
Uses the testvalue tag text from each type to build a test case
for the sls_waterlevel message
|
|
__date__ = '2006-12-18'
Date of last svn commit
|
|
TrueBV = <BitVector.BitVector object at 0x12cc4b0>
Why always rebuild the True bit? This should speed things up a
bunch
|
|
FalseBV = <BitVector.BitVector object at 0x12cc730>
Why always rebuild the False bit? This should speed things up a
bunch
|
sls_waterlevelEncode(params,
validate=False)
| source code |
Create a sls_waterlevel binary message payload to pack into an AIS Msg
sls_waterlevel.
Fields in params:
-
time_month(uint): Time tag of measurement month 1..12
-
time_day(uint): Time tag of measurement day of the month
1..31
-
time_hour(uint): Time tag of measurement UTC hours 0..23
-
time_min(uint): Time tag of measurement minutes
-
stationid(aisstr6): Character identifier of the station. Usually
a number.
-
pos_longitude(decimal): Location of measurement East West
location
-
pos_latitude(decimal): Location of measurement North South
location
-
type(uint): How to interpret the water level
-
waterlevel(int): Water level in centimeters
-
datum(uint): What reference datum applies to the value
-
reserved(int): Reserved bits for future use (field automatically
set to "0")
-
- 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 sls_waterlevel message
Fields in params:
-
time_month(uint): Time tag of measurement month 1..12
-
time_day(uint): Time tag of measurement day of the month
1..31
-
time_hour(uint): Time tag of measurement UTC hours 0..23
-
time_min(uint): Time tag of measurement minutes
-
stationid(aisstr6): Character identifier of the station. Usually
a number.
-
pos_longitude(decimal): Location of measurement East West
location
-
pos_latitude(decimal): Location of measurement North South
location
-
type(uint): How to interpret the water level
-
waterlevel(int): Water level in centimeters
-
datum(uint): What reference datum applies to the value
-
reserved(int): Reserved bits for future use (field automatically
set to "0")
-
- Parameters:
bv (BitVector ) - Bits defining a message
validate - Set to true to cause checking to occur. Runs slower. FIX:
not implemented.
- Returns:
dict
- params
|
sls_waterlevelPrint(params,
out=sys.stdout)
| source code |
Print a sls_waterlevel message to stdout.
Fields in params:
-
time_month(uint): Time tag of measurement month 1..12
-
time_day(uint): Time tag of measurement day of the month
1..31
-
time_hour(uint): Time tag of measurement UTC hours 0..23
-
time_min(uint): Time tag of measurement minutes
-
stationid(aisstr6): Character identifier of the station. Usually
a number.
-
pos_longitude(decimal): Location of measurement East West
location
-
pos_latitude(decimal): Location of measurement North South
location
-
type(uint): How to interpret the water level
-
waterlevel(int): Water level in centimeters
-
datum(uint): What reference datum applies to the value
-
reserved(int): Reserved bits for future use (field automatically
set to "0")
-
- 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 0x12cc4b0>
|
|
FalseBV
Why always rebuild the False bit? This should speed things up a
bunch
-
- Value:
<BitVector.BitVector object at 0x12cc730>
|
|