@ -1795,25 +1795,26 @@ class routerHBP(HBSYSTEM):
self . STATUS [ _slot ] [ ' _bcsq ' ] = True
return
_int_seq == int ( _seq . decode ( ) )
#Duplicate handling#
#Duplicate complete packet
if self . STATUS [ _slot ] [ ' lastData ' ] and self . STATUS [ _slot ] [ ' lastData ' ] == _data and _ seq > 1 :
if self . STATUS [ _slot ] [ ' lastData ' ] and self . STATUS [ _slot ] [ ' lastData ' ] == _data and _ int_ seq > 1 :
logger . warning ( " ( %s ) *PacketControl* last packet is a complete duplicate of the previous one, disgarding. Stream ID:, %s TGID: %s " , self . _system , int_id ( _stream_id ) , int_id ( _dst_id ) )
return
#Handle inbound duplicates
if _ seq and _seq == self . STATUS [ _slot ] [ ' lastSeq ' ] :
logger . warning ( " ( %s ) *PacketControl* Duplicate sequence number %s , disgarding. Stream ID:, %s TGID: %s " , self . _system , _ seq, int_id ( _stream_id ) , int_id ( _dst_id ) )
if _ int_ seq and _int _seq == self . STATUS [ _slot ] [ ' lastSeq ' ] :
logger . warning ( " ( %s ) *PacketControl* Duplicate sequence number %s , disgarding. Stream ID:, %s TGID: %s " , self . _system , _ int_ seq, int_id ( _stream_id ) , int_id ( _dst_id ) )
return
#Inbound out-of-order packets
if _ seq and self . STATUS [ _slot ] [ ' lastSeq ' ] and ( _ seq != 1 ) and ( _seq < self . STATUS [ _slot ] [ ' lastSeq ' ] ) :
logger . warning ( " %s ) *PacketControl* Out of order packet - last SEQ: %s , this SEQ: %s , disgarding. Stream ID:, %s TGID: %s " , self . _system , self . STATUS [ _slot ] [ ' lastSeq ' ] , _ seq, int_id ( _stream_id ) , int_id ( _dst_id ) )
if _ int_ seq and self . STATUS [ _slot ] [ ' lastSeq ' ] and ( _ int_ seq != 1 ) and ( _int _seq < self . STATUS [ _slot ] [ ' lastSeq ' ] ) :
logger . warning ( " %s ) *PacketControl* Out of order packet - last SEQ: %s , this SEQ: %s , disgarding. Stream ID:, %s TGID: %s " , self . _system , self . STATUS [ _slot ] [ ' lastSeq ' ] , _ int_ seq, int_id ( _stream_id ) , int_id ( _dst_id ) )
return
#Inbound missed packets
if _ seq and self . STATUS [ _slot ] [ ' lastSeq ' ] and _seq > ( self . STATUS [ _slot ] [ ' lastSeq ' ] + 1 ) :
logger . warning ( " ( %s ) *PacketControl* Missed packet(s) - last SEQ: %s , this SEQ: %s . Stream ID:, %s TGID: %s " , self . _system , self . STATUS [ _slot ] [ ' lastSeq ' ] , _ seq, int_id ( _stream_id ) , int_id ( _dst_id ) )
if _ int_ seq and self . STATUS [ _slot ] [ ' lastSeq ' ] and _int _seq > ( self . STATUS [ _slot ] [ ' lastSeq ' ] + 1 ) :
logger . warning ( " ( %s ) *PacketControl* Missed packet(s) - last SEQ: %s , this SEQ: %s . Stream ID:, %s TGID: %s " , self . _system , self . STATUS [ _slot ] [ ' lastSeq ' ] , _ int_ seq, int_id ( _stream_id ) , int_id ( _dst_id ) )
#Save this sequence number
self . STATUS [ _slot ] [ ' lastSeq ' ] = _ seq
self . STATUS [ _slot ] [ ' lastSeq ' ] = _ int_ seq
#Save this packet
self . STATUS [ _slot ] [ ' lastData ' ] = _data