Tools to generate python code to serialize/deserialize messages
between python and ais binary. Trying to be as inline as possible, so no
XML on the fly like in ais-py.
|
|
|
|
|
|
|
|
|
|
|
getMaxFieldNameLen(msgET)
Get the maximum string length of any field name |
source code
|
|
|
padStrRight(aStr,
strlen)
Pad a string out to the length requested with spaces out to the
right |
source code
|
|
bool
|
haveLocatableMessage(msgET)
Make sure this message has both long/x and lat/y fields. |
source code
|
|
|
|
|
|
|
buildPrint(o,
msgET,
verbose=False,
prefixName=False)
Write a simple in order print for the resulting dictionary. |
source code
|
|
|
|
|
|
|
buildLUT(o,
msgET,
verbose=False,
prefixName=False)
Write lookup tables for enumerated types (uint or int, maybe bool
too). |
source code
|
|
|
encodeBool(o,
name,
type,
numbits,
required=None,
arraylen=1,
unavailable=None,
verbose=False)
Build the encoder for boolean variables |
source code
|
|
|
encodeUInt(o,
name,
type,
numbits,
required=None,
arraylen=1,
unavailable=None,
verbose=False)
Build the encoder for unsigned integer variables |
source code
|
|
|
encodeFloat(o,
name,
fieldType,
numbits,
required=None,
arraylen=1,
unavailable=None,
verbose=False)
Build the encoder for IEEE float variables |
source code
|
|
|
encodeAisstr6(o,
name,
fieldType,
numbits,
required=None,
arraylen=1,
unavailable=None,
verbose=False)
Build the encoder for aisstr6 variables. |
source code
|
|
|
encodeInt(o,
name,
type,
numbits,
required=None,
arraylen=1,
unavailable=None,
verbose=False)
Build the encoder for signed integer variables |
source code
|
|
|
encodeDecimal(o,
name,
type,
numbits,
required=None,
arraylen=1,
unavailable=None,
verbose=False,
scale=None)
Build the encoder for signed decimal variables |
source code
|
|
|
encodeUDecimal(o,
name,
type,
numbits,
required=None,
arraylen=1,
unavailable=None,
verbose=False,
scale=None)
Build the encoder for signed decimal variables |
source code
|
|
|
encodeBinary(o,
name,
type,
numbits,
required=None,
arraylen=1,
unavailable=None,
verbose=False,
scale=None)
Build the encoder for binary variables. |
source code
|
|
int
|
decodeBool(o,
name,
type,
startindex,
numbits,
required=None,
arraylen=1,
unavailable=None,
bv=' bv ' ,
dataDict=' r ' ,
verbose=False,
decodeOnly=False)
Build the decoder for boolean variables |
source code
|
|
int
|
decodeUInt(o,
name,
type,
startindex,
numbits,
required=None,
arraylen=1,
unavailable=None,
bv=' bv ' ,
dataDict=' r ' ,
verbose=False,
decodeOnly=False)
Build the decoder for unsigned integer variables |
source code
|
|
int
|
decodeInt(o,
name,
type,
startindex,
numbits,
required=None,
arraylen=1,
unavailable=None,
bv=' bv ' ,
dataDict=' r ' ,
verbose=False,
decodeOnly=False)
Build the decoder for unsigned integer variables |
source code
|
|
int
|
decodeFloat(o,
name,
type,
startindex,
numbits,
required=None,
arraylen=1,
unavailable=None,
bv=' bv ' ,
dataDict=' r ' ,
verbose=False,
decodeOnly=False)
Build the decoder for IEEE float variables |
source code
|
|
int
|
decodeAisstr6(o,
name,
type,
startindex,
numbits,
required=None,
arraylen=1,
unavailable=None,
bv=' bv ' ,
dataDict=' r ' ,
verbose=False,
decodeOnly=False)
Build the decoder for aisstr6 variables. |
source code
|
|
int
|
decodeDecimal(o,
name,
type,
startindex,
numbits,
required=None,
arraylen=1,
unavailable=None,
bv=' bv ' ,
dataDict=' r ' ,
verbose=False,
scale=None,
decodeOnly=False)
Build the decoder for signed decimal variables |
source code
|
|
int
|
decodeUDecimal(o,
name,
type,
startindex,
numbits,
required=None,
arraylen=1,
unavailable=None,
bv=' bv ' ,
dataDict=' r ' ,
verbose=False,
scale=None,
decodeOnly=False)
Build the decoder for unsigned decimal variables |
source code
|
|
int
|
decodeBinary(o,
name,
type,
startindex,
numbits,
required=None,
arraylen=1,
unavailable=None,
bv=' bv ' ,
dataDict=' r ' ,
verbose=False,
scale=None,
decodeOnly=False)
Build the decoder for unsigned decimal variables |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
buildOptParse(o,
msgET,
prefixName=False)
Create a function that adds the options to a parse object |
source code
|
|
|
|