Skip to content

Commit

Permalink
Merge pull request #174 from pphuchar/201911_q2bd_add_crit_threshold_get
Browse files Browse the repository at this point in the history
[sonic_api] Implement function to get critical temperature value
  • Loading branch information
bbinxie authored May 21, 2020
2 parents c5e8e64 + 25544c1 commit e125eb3
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,26 @@ def set_low_threshold(self, temperature):
break
return result

def get_high_critical_threshold(self):
"""
Retrieves the high critical threshold temperature of thermal
Returns:
A float number, the high critical threshold temperature of thermal in Celsius
up to nearest thousandth of one degree Celsius, e.g. 30.125
"""
temp_file = "temp{}_crit".format(self.ss_index)
return self.__get_temp(temp_file)

def get_low_critical_threshold(self):
"""
Retrieves the low critical threshold temperature of thermal
Returns:
A float number, the low critical threshold temperature of thermal in Celsius
up to nearest thousandth of one degree Celsius, e.g. 30.125
"""
temp_file = "temp{}_lcrit".format(self.ss_index)
return self.__get_temp(temp_file)

##############################################################
###################### Device methods ########################
##############################################################
Expand Down

0 comments on commit e125eb3

Please sign in to comment.