Package ais :: Module sls_waterlevel
[hide private]
[frames] | no frames]

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

Functions [hide private]
BitVector encode(params, validate=False)
Create a sls_waterlevel binary message payload to pack into an AIS Msg sls_waterlevel.
dict decode(bv, validate=False)
Unpack a sls_waterlevel message
  decodetime_month(bv, validate=False)
  decodetime_day(bv, validate=False)
  decodetime_hour(bv, validate=False)
  decodetime_min(bv, validate=False)
  decodestationid(bv, validate=False)
  decodepos_longitude(bv, validate=False)
  decodepos_latitude(bv, validate=False)
  decodetype(bv, validate=False)
  decodewaterlevel(bv, validate=False)
  decodedatum(bv, validate=False)
  decodereserved(bv, validate=False)
  printHtml(params, out=sys.stdout)
  printKml(params, out=sys.stdout)
KML (Keyhole Markup Language) for Google Earth, but without the header/footer

Variables [hide private]
  __date__ = '2007-01-05'
Date of last svn commit
  TrueBV = <ais.BitVector.BitVector object at 0x299f6f0>
Why always rebuild the True bit? This should speed things up a bunch
  FalseBV = <ais.BitVector.BitVector object at 0x299f730>
Why always rebuild the False bit? This should speed things up a bunch

Function Details [hide private]

encode(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(uint): 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

Note: The returned bits may not be 6 bit aligned. It is up to you to pad out the bits.

decode(bv, validate=False)

source code 

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(uint): 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

decodetime_month(bv, validate=False)

source code 
None

decodetime_day(bv, validate=False)

source code 
None

decodetime_hour(bv, validate=False)

source code 
None

decodetime_min(bv, validate=False)

source code 
None

decodestationid(bv, validate=False)

source code 
None

decodepos_longitude(bv, validate=False)

source code 
None

decodepos_latitude(bv, validate=False)

source code 
None

decodetype(bv, validate=False)

source code 
None

decodewaterlevel(bv, validate=False)

source code 
None

decodedatum(bv, validate=False)

source code 
None

decodereserved(bv, validate=False)

source code 
None

printHtml(params, out=sys.stdout)

source code 
None

printKml(params, out=sys.stdout)

source code 
KML (Keyhole Markup Language) for Google Earth, but without the header/footer

Variables Details [hide private]

__date__

Date of last svn commit
Value:
'2007-01-05'                                                           
      

TrueBV

Why always rebuild the True bit? This should speed things up a bunch
Value:
<ais.BitVector.BitVector object at 0x299f6f0>                          
      

FalseBV

Why always rebuild the False bit? This should speed things up a bunch
Value:
<ais.BitVector.BitVector object at 0x299f730>