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 ChanMngmt binary message payload to pack into an AIS Msg
ChanMngmt.
|
dict
|
decode(bv,
validate=False)
Unpack a ChanMngmt message
|
|
decodeMessageID(bv,
validate=False)
|
|
decodeRepeatIndicator(bv,
validate=False)
|
|
decodeUserID(bv,
validate=False)
|
|
decodeChanA(bv,
validate=False)
|
|
decodeChanB(bv,
validate=False)
|
|
decodeTxRxMode(bv,
validate=False)
|
|
decodepower(bv,
validate=False)
|
|
decodecorner1_lon(bv,
validate=False)
|
|
decodecorner1_lat(bv,
validate=False)
|
|
decodecorner2_lon(bv,
validate=False)
|
|
decodecorner2_lat(bv,
validate=False)
|
|
decodeIndicatorType(bv,
validate=False)
|
|
decodeChanABandwidth(bv,
validate=False)
|
|
decodeChanBBandwidth(bv,
validate=False)
|
|
decodeTransZoneSize(bv,
validate=False)
|
|
decodeSpare(bv,
validate=False)
|
|
printHtml(params,
out=sys.stdout)
|
stdout
|
printFields(params,
out=sys.stdout,
format='std',
fieldList=None,
dbType='postgres')
Print a ChanMngmt 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-26'
Date of last svn commit
|
|
TrueBV = <ais.BitVector.BitVector object at 0x2375090>
Why always rebuild the True bit? This should speed things up a
bunch
|
|
FalseBV = <ais.BitVector.BitVector object at 0x2375110>
Why always rebuild the False bit? This should speed things up a
bunch
|
|
fieldList = ('MessageID', 'RepeatIndicator', 'UserID', 'Spare', ...
|
|
fieldListPostgres = ('MessageID', 'RepeatIndicator', 'UserID', 'Spare', ...
|
|
toPgFields = {'corner2_lat': 'corner2', 'corner1_lon': 'corner1',...
Go to the Postgis field names from the straight field name
|
|
fromPgFields = {'corner2': ('corner2_lon', 'corner2_lat'), 'corner1...
Go from the Postgis field names to the straight field name
|
|
pgTypes = {'corner2': 'POINT', 'corner1': 'POINT'}
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'}
|
|
TxRxModeEncodeLut = {'Tx A/Tx B, Rx A/RX B': '0', 'Tx B, Rx A/Rx B': '2'...
|
|
TxRxModeDecodeLut = {'1': 'Tx A, Rx A/Rx B', '0': 'Tx A/Tx B, Rx A/RX B'...
|
|
powerEncodeLut = {'high': '0', 'low': '1'}
|
|
powerDecodeLut = {'1': 'low', '0': 'high'}
|
|
IndicatorTypeEncodeLut = {'broadcast': '0', 'addressed': '1'}
|
|
IndicatorTypeDecodeLut = {'1': 'addressed', '0': 'broadcast'}
|
|
ChanABandwidthEncodeLut = {'12.5kHz': '1', 'specified by channel number': '0'}
|
|
ChanABandwidthDecodeLut = {'1': '12.5kHz', '0': 'specified by channel number'}
|
|
ChanBBandwidthEncodeLut = {'12.5kHz': '1', 'specified by channel number': '0'}
|
|
ChanBBandwidthDecodeLut = {'1': '12.5kHz', '0': 'specified by channel number'}
|
|
TransZoneSizeEncodeLut = {'1': '0', '3': '2', '2': '1', '5': '4', '4': '3', '...
|
|
TransZoneSizeDecodeLut = {'1': '2', '0': '1', '3': '4', '2': '3', '5': '6', '...
|
|
typeChoices = 'binary', 'nmeapayload', 'nmea'
|
|
outputChoices = 'std', 'html', 'csv', 'sql'
|
|
dbChoices = 'sqlite', 'postgres'
|
|
outfile = file(options.outputFileName, 'w')
|
|
msgDict = {'MessageID': '22', 'RepeatIndicator': options.Repea...
|
|
bitLen = len(bits)
|
|
bits = bits+ BitVector(size= (6-(bitLen % 6)))
|
|
buf = StringIO.StringIO()
|
|
result = buf.getvalue()
|