parameters: (self, msg, publisher, stat_bytes)
docstring: This method is called for every message that has been received.
  
          @param msg: The message received.
          @param publisher: The name of the publisher node that sent the msg
          @param stat_bytes: A counter, how many bytes have been moved across
          this connection since it exists.
  
          This method just looks up the ConnectionStatisticsLogger for the specific connection
          between publisher and subscriber and delegates to statistics logging to that
          instance.
docstring_summary: This method is called for every message that has been received.
docstring_tokens: This method is called for every message that has been received .
function: def callback(self, msg, publisher, stat_bytes):
          """
          This method is called for every message that has been received.
  
          @param msg: The message received.
          @param publisher: The name of the publisher node that sent the msg
          @param stat_bytes: A counter, how many bytes have been moved across
          this connection since it exists.
  
          This method just looks up the ConnectionStatisticsLogger for the specific connection
          between publisher and subscriber and delegates to statistics logging to that
          instance.
          """
  
          # /clock is special, as it is subscribed very early
          # also exclude /statistics to reduce noise.
          if self.subscriber_name == "/clock" or self.subscriber_name == "/statistics":
              return
  
          try:
              # create ConnectionStatisticsLogger for new connections
              logger = self.connections.get(publisher)
              if logger is None:
                  logger = ConnectionStatisticsLogger(self.subscriber_name, rospy.get_name(), publisher)
                  self.connections[publisher] = logger
  
              # delegate stuff to that instance
              logger.callback(self, msg, stat_bytes)
          except Exception as e:
              rospy.logerr("Unexpected error during statistics measurement: %s", str(e))
function_tokens: def callback ( self , msg , publisher , stat_bytes ) : # /clock is special, as it is subscribed very early # also exclude /statistics to reduce noise. if self . subscriber_name == "/clock" or self . subscriber_name == "/statistics" : return try : # create ConnectionStatisticsLogger for new connections logger = self . connections . get ( publisher ) if logger is None : logger = ConnectionStatisticsLogger ( self . subscriber_name , rospy . get_name ( ) , publisher ) self . connections [ publisher ] = logger # delegate stuff to that instance logger . callback ( self , msg , stat_bytes ) except Exception as e : rospy . logerr ( "Unexpected error during statistics measurement: %s" , str ( e ) )