def request_sensor_list(self, req, msg):
        """Sensor list"""
        if msg.arguments:
            name = (msg.arguments[0],)
            keys = (name, )
            if name not in self.fake_sensor_infos:
                return ("fail", "Unknown sensor name.")
        else:
            keys = self.fake_sensor_infos.keys()

        num_informs = 0
        for sensor_name in keys:
            infos = self.fake_sensor_infos[sensor_name]
            num_informs += 1
            req.inform(sensor_name, *infos)

        return ('ok', num_informs)
Sensor list