#NEWLINE# def encode( self , pdu ) : #NEWLINE# #INDENT# 'encode the contents of the BVLCI into the PDU.' #NEWLINE# if _debug : #NEWLINE# #INDENT# BVLCI . _debug ( 'encode %s' , str ( pdu ) ) #NEWLINE# #UNINDENT# PCI . update ( pdu , self ) #NEWLINE# pdu . put ( self . bvlciType ) #NEWLINE# pdu . put ( self . bvlciFunction ) #NEWLINE# if ( self . bvlciLength != ( len ( self . pduData ) + 4 ) ) : #NEWLINE# #INDENT# raise EncodingError ( 'invalid BVLCI length' ) #NEWLINE# #UNINDENT# pdu . put_short ( self . bvlciLength )