Skip to content

Commit

Permalink
[sonic_api] Implement function to get critical thermal value
Browse files Browse the repository at this point in the history
  • Loading branch information
pphuchar committed May 16, 2020
1 parent e966628 commit 25544c1
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 25544c1

Please sign in to comment.