Trees | Indices | Help |
---|
|
Bugs:
Author: Kurt Schwehr
Version: 2068
Copyright: 2006
|
|||
str
|
decode(bits,
dropAfterFirstAt=False) Decode bits as a string. |
||
BitVector
| encode(string, bitSize=None) | ||
str
|
unpad(string,
removeBlanks=True) Remove AIS string padding |
||
str
|
pad(string,
length) pad a string out to the proper length with the @ character as required by the ais spec |
|
|||
|
__date__ = '2006-05-02' Date of last svn commit |
||
list
|
characterLUT = ['@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', '... lookup table for decode to fetch characters faster |
||
|
characterDict = {'!': 33, ' ': 32, '#': 35, '"': 34, '%': 37, '$': 3... Fast lookup for the AIS int code for a character |
||
dict
|
characterBits = {'!': <ais.BitVector.BitVector object at 0x2058990>,... lookup table for going from a single character to a 6 bit BitVector |
||
|
success = False
|
|
|
|
>>> unpad('@') '' >>> unpad('A@') 'A' >>> unpad('ABCDEF1234@@@@@') 'ABCDEF1234'FIX: is this the correct response? >>> unpad('A@B') 'A@B'This is non standard behavior, but some AIS systems space pad the right >>> unpad(' ') '' >>> unpad('MY SHIP NAME ') 'MY SHIP NAME'The standard implies this behavior with is less fun >>> unpad('MY SHIP NAME ',removeBlanks=False) 'MY SHIP NAME '
|
>>> pad('',0) '' >>> pad('',1) '@' >>> pad('A',1) 'A' >>> pad('A',2) 'A@' >>> pad('MY SHIP NAME',20) 'MY SHIP NAME@@@@@@@@'
|
|
__date__Date of last svn commit
|
characterLUTlookup table for decode to fetch characters faster
|
characterDictFast lookup for the AIS int code for a character
|
characterBitslookup table for going from a single character to a 6 bit BitVector
|
successNone
|
Trees | Indices | Help |
---|
Generated by Epydoc 3.0alpha3 on Thu Jan 18 11:07:48 2007 | http://epydoc.sourceforge.net |