Skip to content

Commit

Permalink
Add PSU input voltage and input current (sonic-net#295)
Browse files Browse the repository at this point in the history
- Description
psud would collect input voltage and input current of the PSU.

- Motivation and Context
more information about the PSU.

- How Has This Been Tested?
unitests, manual tests.

Signed-off-by: orfar1994 <orfar1994@gmail.com>
  • Loading branch information
orfar1994 authored Aug 10, 2022
1 parent 50c24a5 commit bd6574a
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions sonic_platform_base/psu_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,3 +244,22 @@ def set_status_master_led(cls, color):
"""
cls._psu_master_led_color = color
return True

def get_input_voltage(self):
"""
Retrieves current PSU voltage input
Returns:
A float number, the input voltage in volts,
e.g. 12.1
"""
raise NotImplementedError

def get_input_current(self):
"""
Retrieves the input current draw of the power supply
Returns:
A float number, the electric current in amperes, e.g 15.4
"""
raise NotImplementedError

0 comments on commit bd6574a

Please sign in to comment.