diff --git a/sonic_platform_base/sfp_base.py b/sonic_platform_base/sfp_base.py index 51209409dadd..91a00f8d2544 100644 --- a/sonic_platform_base/sfp_base.py +++ b/sonic_platform_base/sfp_base.py @@ -356,3 +356,39 @@ def set_power_override(self, power_override, power_set): False if not """ raise NotImplementedError + + def read_eeprom(self, offset, num_bytes): + """ + read eeprom specfic bytes beginning from a random offset with size as num_bytes + + Args: + offset : + Integer, the offset from which the read transaction will start + num_bytes: + Integer, the number of bytes to be read + + Returns: + bytearray, if raw sequence of bytes are read correctly from the offset of size num_bytes + None, if the read_eeprom fails + """ + raise NotImplementedError + + def write_eeprom(self, offset, num_bytes, write_buffer): + """ + write eeprom specfic bytes beginning from a random offset with size as num_bytes + and write_buffer as the required bytes + + Args: + offset : + Integer, the offset from which the read transaction will start + num_bytes: + Integer, the number of bytes to be written + write_buffer: + bytearray, raw bytes buffer which is to be written beginning at the offset + + Returns: + a Boolean, true if the write succeeded and false if it did not succeed. + """ + raise NotImplementedError + +