#NEWLINE# @ set_ev_cls ( [ ofp_event . EventOFPStatsReply , ofp_event . EventOFPDescStatsReply , ofp_event . EventOFPFlowStatsReply , ofp_event . EventOFPAggregateStatsReply , ofp_event . EventOFPTableStatsReply , ofp_event . EventOFPTableFeaturesStatsReply , ofp_event . EventOFPPortStatsReply , ofp_event . EventOFPQueueStatsReply , ofp_event . EventOFPQueueDescStatsReply , ofp_event . EventOFPMeterStatsReply , ofp_event . EventOFPMeterFeaturesStatsReply , ofp_event . EventOFPMeterConfigStatsReply , ofp_event . EventOFPGroupStatsReply , ofp_event . EventOFPGroupFeaturesStatsReply , ofp_event . EventOFPGroupDescStatsReply , ofp_event . EventOFPPortDescStatsReply ] , MAIN_DISPATCHER ) #NEWLINE# def stats_reply_handler( self , ev ) : #NEWLINE# #INDENT# msg = ev . msg #NEWLINE# dp = msg . datapath #NEWLINE# if ( msgs . id not in self . waiters ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# if ( msg . xid not in self . waiters [ dp . id ] ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# ( lock , msgs ) = self . waiters [ dp . id ] [ msg . xid ] #NEWLINE# msgs . append ( msg ) #NEWLINE# flags = 0 #NEWLINE# if ( dp . ofproto . OFP_VERSION == ofproto_v1_0 . OFP_VERSION ) : #NEWLINE# #INDENT# flags = dp . ofproto . OFPSF_REPLY_MORE #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( dp . ofproto . OFP_VERSION == ofproto_v1_2 . OFP_VERSION ) : #NEWLINE# #INDENT# flags = dp . ofproto . OFPSF_REPLY_MORE #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( dp . ofproto . OFP_VERSION >= ofproto_v1_3 . OFP_VERSION ) : #NEWLINE# #INDENT# flags = dp . ofproto . OFPMPF_REPLY_MORE #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# if ( msg . flags & flags ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# del self . waiters [ dp . id ] [ msg . xid ] #NEWLINE# lock . set ( )