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

Classes [hide private]
  Testsls_waterlevel
Uses the testvalue tag text from each type to build a test case for the sls_waterlevel message

Functions [hide private]
BitVector sls_waterlevelEncode(params, validate=False)
Create a sls_waterlevel binary message payload to pack into an AIS Msg sls_waterlevel.
dict sls_waterlevelDecode(bv, validate=False)
Unpack a sls_waterlevel message
stdout sls_waterlevelPrint(params, out=sys.stdout)
Print a sls_waterlevel message to stdout.
dict sls_waterlevelTestParams()
Return a params file base on the testvalue tags.

Variables [hide private]
  __date__ = '2006-12-18'
Date of last svn commit
  TrueBV = <BitVector.BitVector object at 0x12f2610>
Why always rebuild the True bit? This should speed things up a bunch
  FalseBV = <BitVector.BitVector object at 0x12f2690>
Why always rebuild the False bit? This should speed things up a bunch

Function Details [hide private]

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

sls_waterlevelDecode(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(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

sls_waterlevelTestParams()

source code 
Return a params file base on the testvalue tags.
Returns: dict
params based on testvalue tags

Variables Details [hide private]

__date__

Date of last svn commit
Value:
'2006-12-18'                                                           
      

TrueBV

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

FalseBV

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