#NEWLINE# @ classmethod #NEWLINE# def parser( cls , buf , offset ) : #NEWLINE# #INDENT# ( id_ , seq ) = struct . unpack_from ( cls . _PACK_STR , buf , cls ) #NEWLINE# msg = cls ( id_ , seq ) #NEWLINE# offset += cls . _MIN_LEN #NEWLINE# if ( len ( buf ) > offset ) : #NEWLINE# #INDENT# msg . data = buf [ offset : ] #NEWLINE# #UNINDENT# return msg