BQ40Z50-R2: bq40z50 ProgramSrec

Part Number: BQ40Z50-R2

Hello TI Team,
I would like to ask about the public virtual short ProgramSrec(ref string filename, short nProtocol, int nPlatform) method in the metadata of bq80xrw.ocx. How should this function be invoked?
Do I need to enter ROM mode first, load the .SREC file for flashing, and then exit ROM mode after the programming is completed?
I also want to clarify the functions and configuration rules of the two parameters: short nProtocol and int nPlatform. I need to flash SREC files for devices communicating over both I2C and SMBus buses.
Thank you for your guidance.