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 AidsToNavReport binary message payload to pack into an
AIS Msg AidsToNavReport.
|
dict
|
decode(bv,
validate=False)
Unpack a AidsToNavReport message
|
|
decodeMessageID(bv,
validate=False)
|
|
decodeRepeatIndicator(bv,
validate=False)
|
|
decodeUserID(bv,
validate=False)
|
|
decodetype(bv,
validate=False)
|
|
decodename(bv,
validate=False)
|
|
decodePositionAccuracy(bv,
validate=False)
|
|
decodePosition_longitude(bv,
validate=False)
|
|
decodePosition_latitude(bv,
validate=False)
|
|
decodedim(bv,
validate=False)
|
|
decodeFixType(bv,
validate=False)
|
|
decodetimestamp(bv,
validate=False)
|
|
decodeOffPosition(bv,
validate=False)
|
|
decodeRegionalApp(bv,
validate=False)
|
|
decodeRAIM(bv,
validate=False)
|
|
decodeSpare(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,
dbType='postgres')
Print a AidsToNavReport message to stdout.
|
str
|
sqlCreateStr(outfile=sys.stdout,
fields=None,
extraFields=None,
addCoastGuardFields=True,
dbType='postgres')
Return the SQL CREATE command for this message type
|
sqlhelp.create
|
sqlCreate(fields=None,
extraFields=None,
addCoastGuardFields=True,
dbType='postgres')
Return the sqlhelp object to create the table.
|
str
|
sqlInsertStr(params,
outfile=sys.stdout,
extraParams=None,
dbType='postgres')
Return the SQL INSERT command for this message type
|
sqlhelp.insert
|
sqlInsert(params,
extraParams=None,
dbType='postgres')
Give the SQL INSERT statement
|
dict
|
testParams()
Return a params file base on the testvalue tags.
|
|
addMsgOptions(parser)
|
|
__date__ = '2007-02-18'
Date of last svn commit
|
|
TrueBV = <ais.BitVector.BitVector object at 0x225f5d0>
Why always rebuild the True bit? This should speed things up a
bunch
|
|
FalseBV = <ais.BitVector.BitVector object at 0x225f650>
Why always rebuild the False bit? This should speed things up a
bunch
|
|
fieldList = ('MessageID', 'RepeatIndicator', 'UserID', 'type', '...
|
|
fieldListPostgres = ('MessageID', 'RepeatIndicator', 'UserID', 'type', '...
|
|
toPgFields = {}
Go to the Postgis field names from the straight field name
|
|
fromPgFields = {}
Go from the Postgis field names to the straight field name
|
|
pgTypes = {}
Lookup table for each postgis field name to get its type.
|
|
RepeatIndicatorEncodeLut = {'default': '0', 'do not repeat any more': '3'}
|
|
RepeatIndicatorDecodeLut = {'0': 'default', '3': 'do not repeat any more'}
|
|
typeEncodeLut = {'Light, without sectors': '5', 'Safe water': '29', ...
|
|
typeDecodeLut = {'24': 'Port hand Mark', '25': 'Starbord hand Mark',...
|
|
PositionAccuracyEncodeLut = {'low (greater than 10 m)': '0', 'high (less than 10...
|
|
PositionAccuracyDecodeLut = {'1': 'high (less than 10 m)', '0': 'low (greater th...
|
|
FixTypeEncodeLut = {'Combined GPS/GLONASS': '3', 'Integrated Navigation...
|
|
FixTypeDecodeLut = {'11': 'not used - 11', '10': 'not used - 10', '13':...
|
|
timestampEncodeLut = {'Positioning system is in manual mode': '61', 'Posi...
|
|
timestampDecodeLut = {'61': 'Positioning system is in manual mode', '62':...
|
|
OffPositionEncodeLut = {'Off position': 'True', 'On position': 'False'}
|
|
OffPositionDecodeLut = {'True': 'Off position', 'False': 'On position'}
|
|
RAIMEncodeLut = {'in use': 'True', 'not in use': 'False'}
|
|
RAIMDecodeLut = {'True': 'in use', 'False': 'not in use'}
|
|
typeChoices = 'binary', 'nmeapayload', 'nmea'
|
|
outputChoices = 'std', 'html', 'csv', 'sql', 'kml', 'kml-full'
|
|
dbChoices = 'sqlite', 'postgres'
|
|
outfile = file(options.outputFileName, 'w')
|
|
msgDict = {'MessageID': '21', 'RepeatIndicator': options.Repea...
|
|
bitLen = len(bits)
|
|
bits = bits+ BitVector(size= (6-(bitLen % 6)))
|
|
buf = StringIO.StringIO()
|
|
result = buf.getvalue()
|