#
# Copyright (C) 2015 Red Hat.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later version.
# 
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# for more details.
#

def mic_get_ndevices():
    return 1

class MicDevice:
    _id = 0
    _cores = 1

    def __init__(self, id):
        _id = id

    def mic_get_cores_count(self):
        return self._cores

    def mic_update_core_util(self):
        pass

    def mic_update_thermal_info(self):
        pass

    def mic_update_memory_util(self):
        pass

    def mic_update_power_utilization_info(self):
        pass

    def mic_update_core_util(self):
        pass

    def mic_update_thermal_info(self):
        pass

    def mic_update_memory_util(self):
        pass

    def mic_update_power_utilization_info(self):
        pass

    def mic_get_device_name(self):
        return "mic-pcpqa-" + str(self._id)

    def mic_get_device_id(self):
        return 1

    def mic_get_processor_steppingid(self):
        return 2

    def mic_get_cores_frequency(self):
        return 3500.0

    def mic_get_inst_power_readings(self):
        return 32.7

    def mic_get_inst_power_sensor_sts(self):
        return 1

    def mic_get_total_power_readings_w0(self):
        return 0.05

    def mic_get_total_power_sensor_sts_w0(self):
        return 1

    def mic_get_total_power_readings_w1(self):
        return 0.08

    def mic_get_total_power_sensor_sts_w1(self):
        return 1

    def mic_get_time_window0(self):
        return 2.1

    def mic_get_time_window1(self):
        return 1.2

    def mic_get_power_lmrk(self):
        return 3.4

    def mic_get_power_hmrk(self):
        return 5.6

    def mic_get_power_phys_limit(self):
        return 7.8

    def mic_get_die_temp(self):
        return 28.1

    def mic_is_die_temp_valid(self):
        return True

    def mic_get_gddr_temp(self):
        return 28.2

    def mic_is_gddr_temp_valid(self):
        return True

    def mic_get_fanin_temp(self):
        return 28.3

    def mic_is_fanin_temp_valid(self):
        return True

    def mic_get_fanout_temp(self):
        return 28.4

    def mic_is_fanout_temp_valid(self):
        return True

    def mic_get_vccp_temp(self):
        return 28.5

    def mic_is_vccp_temp_valid(self):
        return True

    def mic_get_vddg_temp(self):
        return 28.6

    def mic_is_vddg_temp_valid(self):
        return True

    def mic_get_vddq_temp(self):
        return 28.6

    def mic_is_vddq_temp_valid(self):
        return True

    def mic_get_available_memory_size(self):
        return 24535852

    def mic_get_total_memory_size(self):
        return 24535852

    def mic_get_threads_core(self):
        return 4

    def mic_get_user_sum(self):
        return 431170

    def        mic_get_sys_sum(self):
        return 180870

    def mic_get_nice_sum(self):
        return 13930

    def mic_get_idle_sum(self):
        return 86701520

    def mic_get_user_counters(self):
        return [431170, 431171, 431172, 431173]

    def mic_get_sys_counters(self):
        return [180870, 180871, 180872, 180873]

    def mic_get_nice_counters(self):
        return [13930, 13931, 13932, 13933]

    def mic_get_idle_counters(self):
        return [86701520,86701521,86701522,86701523]

    def mic_get_tick_count(self):
        return 100

