#NEWLINE# def stringReceived( self , data ) : #NEWLINE# #INDENT# ( magicNumber , msgTypeNum , msgSubTypeNum ) = struct . unpack ( self . messageHeaderFmt , data [ : self . messageHeaderSize ] ) #NEWLINE# assert ( magicNumber == base . MAGIC_NUMBER ) #NEWLINE# msgType = base . numeric_to_symbolic [ msgTypeNum ] #NEWLINE# msgSubType = base . numeric_to_symbolic [ msgSubTypeNum ] #NEWLINE# payload = data [ self . messageHeaderSize : ] #NEWLINE# self . logger . debug ( ( 'RECVD: %s-%s[%s]' % ( msgType , msgSubType , payload ) ) ) #NEWLINE# method = getattr ( self , ( 'recvd_%s' % msgType ) , None ) #NEWLINE# if ( method is not None ) : #NEWLINE# #INDENT# method ( msgSubTypeNum , payload ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . recvdUnknown ( msgType , msgSubType , payload )