Autogenerated python functions to serialize/deserialize binary
messages.
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.
BitVector
|
encode(params,
validate=False)
Create a position binary message payload to pack into an AIS Msg
position.
|
dict
|
decode(bv,
validate=False)
Unpack a position message
|
|
decodeMessageID(bv,
validate=False)
|
|
decodeRepeatIndicator(bv,
validate=False)
|
|
decodeUserID(bv,
validate=False)
|
|
decodeNavigationStatus(bv,
validate=False)
|
|
decodeROT(bv,
validate=False)
|
|
decodeSOG(bv,
validate=False)
|
|
decodePositionAccuracy(bv,
validate=False)
|
|
decodePosition_longitude(bv,
validate=False)
|
|
decodePosition_latitude(bv,
validate=False)
|
|
decodeCOG(bv,
validate=False)
|
|
decodeTrueHeading(bv,
validate=False)
|
|
decodeTimeStamp(bv,
validate=False)
|
|
decodeRegionalReserved(bv,
validate=False)
|
|
decodeSpare(bv,
validate=False)
|
|
decodeRAIM(bv,
validate=False)
|
|
decodesyncstate(bv,
validate=False)
|
|
decodeslottimeout(bv,
validate=False)
|
|
decodeslotoffset(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
|
stdout
|
printFields(params,
out=sys.stdout,
format='std',
fieldList=None)
Print a slotoffset message to stdout.
|
str
|
sqlCreateStr(outfile=sys.stdout,
fields=None,
extraFields=None,
addCoastGuardFields=True)
Return the SQL CREATE command for this message type
|
sqlhelp.create
|
sqlCreate(fields=None,
extraFields=None,
addCoastGuardFields=True)
Return the sqlhelp object to create the table.
|
str
|
sqlInsertStr(params,
outfile=sys.stdout,
extraParams=None)
Return the SQL CREATE command for this message type
|
sqlhelp.insert
|
sqlInsert(params,
extraParams=None)
Give the SQL insert statement
|
dict
|
testParams()
Return a params file base on the testvalue tags.
|
|
addMsgOptions(parser)
|
|
__date__ = '2007-02-08'
Date of last svn commit
|
|
TrueBV = <ais.BitVector.BitVector object at 0x2072170>
Why always rebuild the True bit? This should speed things up a
bunch
|
|
FalseBV = <ais.BitVector.BitVector object at 0x2072270>
Why always rebuild the False bit? This should speed things up a
bunch
|
|
fieldList = ['MessageID', 'RepeatIndicator', 'UserID', 'Navigati...
|
|
RepeatIndicatorEncodeLut = {'default': '0', 'do not repeat any more': '3'}
|
|
RepeatIndicatorDecodeLut = {'0': 'default', '3': 'do not repeat any more'}
|
|
NavigationStatusEncodeLut = {'engaged in fishing': '7', 'moored': '5', 'not defi...
|
|
NavigationStatusDecodeLut = {'11': 'reserved for future use', '10': 'reserved fo...
|
|
SOGEncodeLut = {'102.2 knots or higher': '102.2'}
|
|
SOGDecodeLut = {'102.2': '102.2 knots or higher'}
|
|
PositionAccuracyEncodeLut = {'low (greater than 10 m)': '0', 'high (less than 10...
|
|
PositionAccuracyDecodeLut = {'1': 'high (less than 10 m)', '0': 'low (greater th...
|
|
TimeStampEncodeLut = {'dead reckoning': '62', 'inoperative': '63', 'not a...
|
|
TimeStampDecodeLut = {'60': 'not available/default', '61': 'manual input'...
|
|
RAIMEncodeLut = {'in use': 'True', 'not in use': 'False'}
|
|
RAIMDecodeLut = {'True': 'in use', 'False': 'not in use'}
|
|
syncstateEncodeLut = {'UTC indirect': '1', 'UTC direct': '0', 'synchroniz...
|
|
syncstateDecodeLut = {'1': 'UTC indirect', '0': 'UTC direct', '3': 'synch...
|
|
slottimeoutEncodeLut = {'Last frame in this slot': '0', '4 frames left': '4...
|
|
slottimeoutDecodeLut = {'1': '1 frames left', '0': 'Last frame in this slot...
|
|
typeChoices = 'binary', 'nmeapayload', 'nmea'
|
|
outputChoices = 'std', 'html', 'csv', 'sql', 'kml', 'kml-full'
|
|
outfile = file(options.outputFileName, 'w')
|
|
msgDict = {'MessageID': '1', 'RepeatIndicator': options.Repeat...
|
|
bitLen = len(bits)
|
|
bits = bits+ BitVector(size= (6-(bitLen % 6)))
|
|
buf = StringIO.StringIO()
|
|
result = buf.getvalue()
|