<s> """<STR_LIT>""" <EOL> from . errors import EncodingError , DecodingError <EOL> from . debugging import ModuleLogger , DebugContents , bacpypes_debugging <EOL> from . pdu import Address , PCI , PDUData , unpack_ip_addr <EOL> _debug = <NUM_LIT:0> <EOL> _log = ModuleLogger ( globals ( ) ) <EOL> bvl_pdu_types = { } <EOL> def register_bvlpdu_type ( klass ) : <EOL> bvl_pdu_types [ klass . messageType ] = klass <EOL> class BVLCI ( PCI , DebugContents ) : <EOL> _debug_contents = ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) <EOL> result = <NUM_LIT> <EOL> writeBroadcastDistributionTable = <NUM_LIT> <EOL> readBroadcastDistributionTable = <NUM_LIT> <EOL> readBroadcastDistributionTableAck = <NUM_LIT> <EOL> forwardedNPDU = <NUM_LIT> <EOL> registerForeignDevice = <NUM_LIT> <EOL> readForeignDeviceTable = <NUM_LIT> <EOL> readForeignDeviceTableAck = <NUM_LIT> <EOL> deleteForeignDeviceTableEntry = <NUM_LIT> <EOL> distributeBroadcastToNetwork = <NUM_LIT> <EOL> originalUnicastNPDU = <NUM_LIT> <EOL> originalBroadcastNPDU = <NUM_LIT> <EOL> def __init__ ( self , * args , ** kwargs ) : <EOL> if _debug : BVLCI . _debug ( "<STR_LIT>" , args , kwargs ) <EOL> super ( BVLCI , self ) . __init__ ( * args , ** kwargs ) <EOL> self . bvlciType = <NUM_LIT> <EOL> self . bvlciFunction = None <EOL> self . bvlciLength = None <EOL> def update ( self , bvlci ) : <EOL> PCI . update ( self , bvlci ) <EOL> self . bvlciType = bvlci . bvlciType <EOL> self . bvlciFunction = bvlci . bvlciFunction <EOL> self . bvlciLength = bvlci . bvlciLength <EOL> def encode ( self , pdu ) : <EOL> """<STR_LIT>""" <EOL> if _debug : BVLCI . _debug ( "<STR_LIT>" , str ( pdu ) ) <EOL> PCI . update ( pdu , self ) <EOL> pdu . put ( self . bvlciType ) <EOL> pdu . put ( self . bvlciFunction ) <EOL> if ( self . bvlciLength != len ( self . pduData ) + <NUM_LIT:4> ) : <EOL> raise EncodingError ( "<STR_LIT>" ) <EOL> pdu . put_short ( self . bvlciLength ) <EOL> def decode ( self , pdu ) : <EOL> """<STR_LIT>""" <EOL> if _debug : BVLCI . _debug ( "<STR_LIT>" , str ( pdu ) ) <EOL> PCI . update ( self , pdu ) <EOL> self . bvlciType = pdu . get ( ) <EOL> if self . bvlciType != <NUM_LIT> : <EOL> raise DecodingError ( "<STR_LIT>" ) <EOL> self . bvlciFunction = pdu . get ( ) <EOL> self . bvlciLength = pdu . get_short ( ) <EOL> if ( self . bvlciLength != len ( pdu . pduData ) + <NUM_LIT:4> ) : <EOL> raise DecodingError ( "<STR_LIT>" ) <EOL> def bvlci_contents ( self , use_dict = None , as_class = dict ) : <EOL> """<STR_LIT>""" <EOL> if _debug : BVLCI . _debug ( "<STR_LIT>" , use_dict , as_class ) <EOL> if use_dict is None : <EOL> use_dict = as_class ( ) <EOL> use_dict . __setitem__ ( '<STR_LIT:type>' , self . bvlciType ) <EOL> use_dict . __setitem__ ( '<STR_LIT>' , self . bvlciFunction ) <EOL> use_dict . __setitem__ ( '<STR_LIT>' , self . bvlciLength ) <EOL> return use_dict <EOL> bacpypes_debugging ( BVLCI ) <EOL> class BVLPDU ( BVLCI , PDUData ) : <EOL> def __init__ ( self , * args , ** kwargs ) : <EOL> if _debug : BVLPDU . _debug ( "<STR_LIT>" , args , kwargs ) <EOL> super ( BVLPDU , self ) . __init__ ( * args , ** kwargs ) <EOL> def encode ( self , pdu ) : <EOL> BVLCI . encode ( self , pdu ) <EOL> pdu . put_data ( self . pduData ) <EOL> def decode ( self , pdu ) : <EOL> BVLCI . decode ( self , pdu ) <EOL> self . pduData = pdu . get_data ( len ( pdu . pduData ) ) <EOL> def bvlpdu_contents ( self , use_dict = None , as_class = dict ) : <EOL> return PDUData . pdudata_contents ( self , use_dict = use_dict , as_class = as_class ) <EOL> def dict_contents ( self , use_dict = None , as_class = dict , key_values = ( ) ) : <EOL> """<STR_LIT>""" <EOL> if _debug : BVLPDU . _debug ( "<STR_LIT>" , use_dict , as_class , key_values ) <EOL> if use_dict is None : <EOL> use_dict = as_class ( ) <EOL> self . bvlci_contents ( use_dict = use_dict , as_class = as_class ) <EOL> self . bvlpdu_contents ( use_dict = use_dict , as_class = as_class ) <EOL> return use_dict <EOL> bacpypes_debugging ( BVLPDU ) <EOL> def key_value_contents ( use_dict = None , as_class = dict , key_values = ( ) ) : <EOL> """<STR_LIT>""" <EOL> if _debug : key_value_contents . _debug ( "<STR_LIT>" , use_dict , as_class , key_values ) <EOL> if use_dict is None : <EOL> use_dict = as_class ( ) <EOL> for k , v in key_values : <EOL> if v is not None : <EOL> if hasattr ( v , '<STR_LIT>' ) : <EOL> v = v . dict_contents ( as_class = as_class ) <EOL> use_dict . __setitem__ ( k , v ) <EOL> return use_dict <EOL> bacpypes_debugging ( key_value_contents ) <EOL> class Result ( BVLPDU ) : <EOL> _debug_contents = ( '<STR_LIT>' , ) <EOL> messageType = BVLCI . result <EOL> def __init__ ( self , code = None , * args , ** kwargs ) : <EOL> super ( Result , self ) . __init__ ( * args , ** kwargs ) <EOL> self . bvlciFunction = BVLCI . result <EOL> self . bvlciLength = <NUM_LIT:6> <EOL> self . bvlciResultCode = code <EOL> def encode ( self , bvlpdu ) : <EOL> BVLCI . update ( bvlpdu , self ) <EOL> bvlpdu . put_short ( self . bvlciResultCode ) <EOL> def decode ( self , bvlpdu ) : <EOL> BVLCI . update ( self , bvlpdu ) <EOL> self . bvlciResultCode = bvlpdu . get_short ( ) <EOL> def bvlpdu_contents ( self , use_dict = None , as_class = dict ) : <EOL> """<STR_LIT>""" <EOL> return key_value_contents ( use_dict = use_dict , as_class = as_class , <EOL> key_values = ( <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , self . bvlciResultCode ) , <EOL> ) ) <EOL> register_bvlpdu_type ( Result ) <EOL> class WriteBroadcastDistributionTable ( BVLPDU ) : <EOL> _debug_contents = ( '<STR_LIT>' , ) <EOL> messageType = BVLCI . writeBroadcastDistributionTable <EOL> def __init__ ( self , bdt = [ ] , * args , ** kwargs ) : <EOL> super ( WriteBroadcastDistributionTable , self ) . __init__ ( * args , ** kwargs ) <EOL> self . bvlciFunction = BVLCI . writeBroadcastDistributionTable <EOL> self . bvlciLength = <NUM_LIT:4> + <NUM_LIT:10> * len ( bdt ) <EOL> self . bvlciBDT = bdt <EOL> def encode ( self , bvlpdu ) : <EOL> BVLCI . update ( bvlpdu , self ) <EOL> for bdte in self . bvlciBDT : <EOL> bvlpdu . put_data ( bdte . addrAddr ) <EOL> bvlpdu . put_data ( bdte . addrMask ) <EOL> def decode ( self , bvlpdu ) : <EOL> BVLCI . update ( self , bvlpdu ) <EOL> self . bvlciBDT = [ ] <EOL> while bvlpdu . pduData : <EOL> bdte = Address ( unpack_ip_addr ( bvlpdu . get_data ( <NUM_LIT:6> ) ) ) <EOL> bdte . addrMask = bvlpdu . get_long ( ) <EOL> self . bvlciBDT . append ( bdte ) <EOL> def bvlpdu_contents ( self , use_dict = None , as_class = dict ) : <EOL> """<STR_LIT>""" <EOL> broadcast_distribution_table = [ ] <EOL> for bdte in self . bvlciBDT : <EOL> broadcast_distribution_table . append ( str ( bdte ) ) <EOL> return key_value_contents ( use_dict = use_dict , as_class = as_class , <EOL> key_values = ( <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , broadcast_distribution_table ) , <EOL> ) ) <EOL> register_bvlpdu_type ( WriteBroadcastDistributionTable ) <EOL> class ReadBroadcastDistributionTable ( BVLPDU ) : <EOL> messageType = BVLCI . readBroadcastDistributionTable <EOL> def __init__ ( self , * args , ** kwargs ) : <EOL> super ( ReadBroadcastDistributionTable , self ) . __init__ ( * args , ** kwargs ) <EOL> self . bvlciFunction = BVLCI . readBroadcastDistributionTable <EOL> self . bvlciLength = <NUM_LIT:4> <EOL> def encode ( self , bvlpdu ) : <EOL> BVLCI . update ( bvlpdu , self ) <EOL> def decode ( self , bvlpdu ) : <EOL> BVLCI . update ( self , bvlpdu ) <EOL> def bvlpdu_contents ( self , use_dict = None , as_class = dict ) : <EOL> """<STR_LIT>""" <EOL> return key_value_contents ( use_dict = use_dict , as_class = as_class , <EOL> key_values = ( <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ) ) <EOL> register_bvlpdu_type ( ReadBroadcastDistributionTable ) <EOL> class ReadBroadcastDistributionTableAck ( BVLPDU ) : <EOL> _debug_contents = ( '<STR_LIT>' , ) <EOL> messageType = BVLCI . readBroadcastDistributionTableAck <EOL> def __init__ ( self , bdt = [ ] , * args , ** kwargs ) : <EOL> super ( ReadBroadcastDistributionTableAck , self ) . __init__ ( * args , ** kwargs ) <EOL> self . bvlciFunction = BVLCI . readBroadcastDistributionTableAck <EOL> self . bvlciLength = <NUM_LIT:4> + <NUM_LIT:10> * len ( bdt ) <EOL> self . bvlciBDT = bdt <EOL> def encode ( self , bvlpdu ) : <EOL> self . bvlciLength = <NUM_LIT:4> + <NUM_LIT:10> * len ( self . bvlciBDT ) <EOL> BVLCI . update ( bvlpdu , self ) <EOL> for bdte in self . bvlciBDT : <EOL> bvlpdu . put_data ( bdte . addrAddr ) <EOL> bvlpdu . put_long ( bdte . addrMask ) <EOL> def decode ( self , bvlpdu ) : <EOL> BVLCI . update ( self , bvlpdu ) <EOL> self . bvlciBDT = [ ] <EOL> while bvlpdu . pduData : <EOL> bdte = Address ( unpack_ip_addr ( bvlpdu . get_data ( <NUM_LIT:6> ) ) ) <EOL> bdte . addrMask = bvlpdu . get_long ( ) <EOL> self . bvlciBDT . append ( bdte ) <EOL> def bvlpdu_contents ( self , use_dict = None , as_class = dict ) : <EOL> """<STR_LIT>""" <EOL> broadcast_distribution_table = [ ] <EOL> for bdte in self . bvlciBDT : <EOL> broadcast_distribution_table . append ( str ( bdte ) ) <EOL> return key_value_contents ( use_dict = use_dict , as_class = as_class , <EOL> key_values = ( <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , broadcast_distribution_table ) , <EOL> ) ) <EOL> register_bvlpdu_type ( ReadBroadcastDistributionTableAck ) <EOL> class ForwardedNPDU ( BVLPDU ) : <EOL> _debug_contents = ( '<STR_LIT>' , ) <EOL> messageType = BVLCI . forwardedNPDU <EOL> def __init__ ( self , addr = None , * args , ** kwargs ) : <EOL> super ( ForwardedNPDU , self ) . __init__ ( * args , ** kwargs ) <EOL> self . bvlciFunction = BVLCI . forwardedNPDU <EOL> self . bvlciLength = <NUM_LIT:10> + len ( self . pduData ) <EOL> self . bvlciAddress = addr <EOL> def encode ( self , bvlpdu ) : <EOL> self . bvlciLength = <NUM_LIT:10> + len ( self . pduData ) <EOL> BVLCI . update ( bvlpdu , self ) <EOL> bvlpdu . put_data ( self . bvlciAddress . addrAddr ) <EOL> bvlpdu . put_data ( self . pduData ) <EOL> def decode ( self , bvlpdu ) : <EOL> BVLCI . update ( self , bvlpdu ) <EOL> self . bvlciAddress = Address ( unpack_ip_addr ( bvlpdu . get_data ( <NUM_LIT:6> ) ) ) <EOL> self . pduData = bvlpdu . get_data ( len ( bvlpdu . pduData ) ) <EOL> def bvlpdu_contents ( self , use_dict = None , as_class = dict ) : <EOL> """<STR_LIT>""" <EOL> if use_dict is None : <EOL> use_dict = as_class ( ) <EOL> key_value_contents ( use_dict = use_dict , as_class = as_class , <EOL> key_values = ( <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT:address>' , str ( self . bvlciAddress ) ) , <EOL> ) ) <EOL> PDUData . dict_contents ( self , use_dict = use_dict , as_class = as_class ) <EOL> return use_dict <EOL> register_bvlpdu_type ( ForwardedNPDU ) <EOL> class FDTEntry ( DebugContents ) : <EOL> _debug_contents = ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) <EOL> def __init__ ( self ) : <EOL> self . fdAddress = None <EOL> self . fdTTL = None <EOL> self . fdRemain = None <EOL> def bvlpdu_contents ( self , use_dict = None , as_class = dict ) : <EOL> """<STR_LIT>""" <EOL> if use_dict is None : <EOL> use_dict = as_class ( ) <EOL> use_dict . __setitem__ ( '<STR_LIT:address>' , str ( self . fdAddress ) ) <EOL> use_dict . __setitem__ ( '<STR_LIT>' , self . fdTTL ) <EOL> use_dict . __setitem__ ( '<STR_LIT>' , self . fdRemain ) <EOL> return use_dict <EOL> class RegisterForeignDevice ( BVLPDU ) : <EOL> _debug_contents = ( '<STR_LIT>' , ) <EOL> messageType = BVLCI . registerForeignDevice <EOL> def __init__ ( self , ttl = None , * args , ** kwargs ) : <EOL> super ( RegisterForeignDevice , self ) . __init__ ( * args , ** kwargs ) <EOL> self . bvlciFunction = BVLCI . registerForeignDevice <EOL> self . bvlciLength = <NUM_LIT:6> <EOL> self . bvlciTimeToLive = ttl <EOL> def encode ( self , bvlpdu ) : <EOL> BVLCI . update ( bvlpdu , self ) <EOL> bvlpdu . put_short ( self . bvlciTimeToLive ) <EOL> def decode ( self , bvlpdu ) : <EOL> BVLCI . update ( self , bvlpdu ) <EOL> self . bvlciTimeToLive = bvlpdu . get_short ( ) <EOL> def bvlpdu_contents ( self , use_dict = None , as_class = dict ) : <EOL> """<STR_LIT>""" <EOL> return key_value_contents ( use_dict = use_dict , as_class = as_class , <EOL> key_values = ( <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , self . bvlciTimeToLive ) , <EOL> ) ) <EOL> register_bvlpdu_type ( RegisterForeignDevice ) <EOL> class ReadForeignDeviceTable ( BVLPDU ) : <EOL> messageType = BVLCI . readForeignDeviceTable <EOL> def __init__ ( self , ttl = None , * args , ** kwargs ) : <EOL> super ( ReadForeignDeviceTable , self ) . __init__ ( * args , ** kwargs ) <EOL> self . bvlciFunction = BVLCI . readForeignDeviceTable <EOL> self . bvlciLength = <NUM_LIT:4> <EOL> def encode ( self , bvlpdu ) : <EOL> BVLCI . update ( bvlpdu , self ) <EOL> def decode ( self , bvlpdu ) : <EOL> BVLCI . update ( self , bvlpdu ) <EOL> def bvlpdu_contents ( self , use_dict = None , as_class = dict ) : <EOL> """<STR_LIT>""" <EOL> return key_value_contents ( use_dict = use_dict , as_class = as_class , <EOL> key_values = ( <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ) ) <EOL> register_bvlpdu_type ( ReadForeignDeviceTable ) <EOL> class ReadForeignDeviceTableAck ( BVLPDU ) : <EOL> _debug_contents = ( '<STR_LIT>' , ) <EOL> messageType = BVLCI . readForeignDeviceTableAck <EOL> def __init__ ( self , fdt = [ ] , * args , ** kwargs ) : <EOL> super ( ReadForeignDeviceTableAck , self ) . __init__ ( * args , ** kwargs ) <EOL> self . bvlciFunction = BVLCI . readForeignDeviceTableAck <EOL> self . bvlciLength = <NUM_LIT:4> + <NUM_LIT:10> * len ( fdt ) <EOL> self . bvlciFDT = fdt <EOL> def encode ( self , bvlpdu ) : <EOL> BVLCI . update ( bvlpdu , self ) <EOL> for fdte in self . bvlciFDT : <EOL> bvlpdu . put_data ( fdte . fdAddress . addrAddr ) <EOL> bvlpdu . put_short ( fdte . fdTTL ) <EOL> bvlpdu . put_short ( fdte . fdRemain ) <EOL> def decode ( self , bvlpdu ) : <EOL> BVLCI . update ( self , bvlpdu ) <EOL> self . bvlciFDT = [ ] <EOL> while bvlpdu . pduData : <EOL> fdte = FDTEntry ( ) <EOL> fdte . fdAddress = Address ( unpack_ip_addr ( bvlpdu . get_data ( <NUM_LIT:6> ) ) ) <EOL> fdte . fdTTL = bvlpdu . get_short ( ) <EOL> fdte . fdRemain = bvlpdu . get_short ( ) <EOL> self . bvlciFDT . append ( fdte ) <EOL> def bvlpdu_contents ( self , use_dict = None , as_class = dict ) : <EOL> """<STR_LIT>""" <EOL> foreign_device_table = [ ] <EOL> for fdte in self . bvlciFDT : <EOL> foreign_device_table . append ( fdte . dict_contents ( as_class = as_class ) ) <EOL> return key_value_contents ( use_dict = use_dict , as_class = as_class , <EOL> key_values = ( <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , foreign_device_table ) , <EOL> ) ) <EOL> register_bvlpdu_type ( ReadForeignDeviceTableAck ) <EOL> class DeleteForeignDeviceTableEntry ( BVLPDU ) : <EOL> _debug_contents = ( '<STR_LIT>' , ) <EOL> messageType = BVLCI . deleteForeignDeviceTableEntry <EOL> def __init__ ( self , addr = None , * args , ** kwargs ) : <EOL> super ( DeleteForeignDeviceTableEntry , self ) . __init__ ( * args , ** kwargs ) <EOL> self . bvlciFunction = BVLCI . deleteForeignDeviceTableEntry <EOL> self . bvlciLength = <NUM_LIT:10> <EOL> self . bvlciAddress = addr <EOL> def encode ( self , bvlpdu ) : <EOL> BVLCI . update ( bvlpdu , self ) <EOL> bvlpdu . put_data ( self . bvlciAddress . addrAddr ) <EOL> def decode ( self , bvlpdu ) : <EOL> BVLCI . update ( self , bvlpdu ) <EOL> self . bvlciAddress = Address ( unpack_ip_addr ( bvlpdu . get_data ( <NUM_LIT:6> ) ) ) <EOL> def bvlpdu_contents ( self , use_dict = None , as_class = dict ) : <EOL> """<STR_LIT>""" <EOL> return key_value_contents ( use_dict = use_dict , as_class = as_class , <EOL> key_values = ( <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT:address>' , str ( self . bvlciAddress ) ) , <EOL> ) ) <EOL> register_bvlpdu_type ( DeleteForeignDeviceTableEntry ) <EOL> class DistributeBroadcastToNetwork ( BVLPDU ) : <EOL> messageType = BVLCI . distributeBroadcastToNetwork <EOL> def __init__ ( self , * args , ** kwargs ) : <EOL> super ( DistributeBroadcastToNetwork , self ) . __init__ ( * args , ** kwargs ) <EOL> self . bvlciFunction = BVLCI . distributeBroadcastToNetwork <EOL> self . bvlciLength = <NUM_LIT:4> + len ( self . pduData ) <EOL> def encode ( self , bvlpdu ) : <EOL> self . bvlciLength = <NUM_LIT:4> + len ( self . pduData ) <EOL> BVLCI . update ( bvlpdu , self ) <EOL> bvlpdu . put_data ( self . pduData ) <EOL> def decode ( self , bvlpdu ) : <EOL> BVLCI . update ( self , bvlpdu ) <EOL> self . pduData = bvlpdu . get_data ( len ( bvlpdu . pduData ) ) <EOL> def bvlpdu_contents ( self , use_dict = None , as_class = dict ) : <EOL> """<STR_LIT>""" <EOL> if use_dict is None : <EOL> use_dict = as_class ( ) <EOL> key_value_contents ( use_dict = use_dict , as_class = as_class , <EOL> key_values = ( <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ) ) <EOL> PDUData . dict_contents ( self , use_dict = use_dict , as_class = as_class ) <EOL> return use_dict <EOL> register_bvlpdu_type ( DistributeBroadcastToNetwork ) <EOL> class OriginalUnicastNPDU ( BVLPDU ) : <EOL> messageType = BVLCI . originalUnicastNPDU <EOL> def __init__ ( self , * args , ** kwargs ) : <EOL> super ( OriginalUnicastNPDU , self ) . __init__ ( * args , ** kwargs ) <EOL> self . bvlciFunction = BVLCI . originalUnicastNPDU <EOL> self . bvlciLength = <NUM_LIT:4> + len ( self . pduData ) <EOL> def encode ( self , bvlpdu ) : <EOL> self . bvlciLength = <NUM_LIT:4> + len ( self . pduData ) <EOL> BVLCI . update ( bvlpdu , self ) <EOL> bvlpdu . put_data ( self . pduData ) <EOL> def decode ( self , bvlpdu ) : <EOL> BVLCI . update ( self , bvlpdu ) <EOL> self . pduData = bvlpdu . get_data ( len ( bvlpdu . pduData ) ) <EOL> def bvlpdu_contents ( self , use_dict = None , as_class = dict ) : <EOL> """<STR_LIT>""" <EOL> if use_dict is None : <EOL> use_dict = as_class ( ) <EOL> key_value_contents ( use_dict = use_dict , as_class = as_class , <EOL> key_values = ( <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ) ) <EOL> PDUData . dict_contents ( self , use_dict = use_dict , as_class = as_class ) <EOL> return use_dict <EOL> register_bvlpdu_type ( OriginalUnicastNPDU ) <EOL> class OriginalBroadcastNPDU ( BVLPDU ) : <EOL> messageType = BVLCI . originalBroadcastNPDU <EOL> def __init__ ( self , * args , ** kwargs ) : <EOL> super ( OriginalBroadcastNPDU , self ) . __init__ ( * args , ** kwargs ) <EOL> self . bvlciFunction = BVLCI . originalBroadcastNPDU <EOL> self . bvlciLength = <NUM_LIT:4> + len ( self . pduData ) <EOL> def encode ( self , bvlpdu ) : <EOL> self . bvlciLength = <NUM_LIT:4> + len ( self . pduData ) <EOL> BVLCI . update ( bvlpdu , self ) <EOL> bvlpdu . put_data ( self . pduData ) <EOL> def decode ( self , bvlpdu ) : <EOL> BVLCI . update ( self , bvlpdu ) <EOL> self . pduData = bvlpdu . get_data ( len ( bvlpdu . pduData ) ) <EOL> def bvlpdu_contents ( self , use_dict = None , as_class = dict ) : <EOL> """<STR_LIT>""" <EOL> if use_dict is None : <EOL> use_dict = as_class ( ) <EOL> key_value_contents ( use_dict = use_dict , as_class = as_class , <EOL> key_values = ( <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ) ) <EOL> PDUData . dict_contents ( self , use_dict = use_dict , as_class = as_class ) <EOL> return use_dict <EOL> register_bvlpdu_type ( OriginalBroadcastNPDU ) </s>
