#NEWLINE# def fn( self , pkt , r ) : #NEWLINE# #INDENT# h = r #NEWLINE# assert isinstance ( pkt , HandlerTaskRec ) #NEWLINE# if ( pkt is not None ) : #NEWLINE# #INDENT# if ( pkt . kind == K_WORK ) : #NEWLINE# #INDENT# h . workInAdd ( pkt ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# h . deviceInAdd ( pkt ) #NEWLINE# #UNINDENT# #UNINDENT# work = h . work_in #NEWLINE# if ( work is None ) : #NEWLINE# #INDENT# return self . waitTask ( ) #NEWLINE# #UNINDENT# count = work . datum #NEWLINE# if ( count >= BUFSIZE ) : #NEWLINE# #INDENT# h . work_in = work . link #NEWLINE# return self . qpkt ( work ) #NEWLINE# #UNINDENT# dev = h . device_in #NEWLINE# if ( dev is None ) : #NEWLINE# #INDENT# return self . waitTask ( ) #NEWLINE# #UNINDENT# h . device_in = dev . link #NEWLINE# dev . datum = work . data [ count ] #NEWLINE# work . datum = ( count + 1 ) #NEWLINE# return self . qpkt ( dev )