Package com.scriptel.proscript.firmware
Class SRECFirmwarePackage
- java.lang.Object
-
- com.scriptel.proscript.firmware.SRECFirmwarePackage
-
- All Implemented Interfaces:
FirmwarePackage
public class SRECFirmwarePackage extends java.lang.Object implements FirmwarePackage
This class can be used to read Motorola SRecord files produced by most of the Renesas tools.
-
-
Constructor Summary
Constructors Constructor Description SRECFirmwarePackage()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconvert()This method will convert a SREC record into a HID feature report for use by the firmware updater built into JPX.intgetPageCount()This method gets the number of pages in the package.java.util.List<FirmwareRestriction>getRestrictions()This method gets a list of restrictions that must be met before a device can accept firmware.FirmwarePagenextPage()This function when implemented should return the next page of firmware from the file opened with readStream().voidreadStream(java.io.InputStream in)This function when implemented should read in a firmware file of a particular type.
-
-
-
Method Detail
-
readStream
public void readStream(java.io.InputStream in) throws java.io.IOExceptionDescription copied from interface:FirmwarePackageThis function when implemented should read in a firmware file of a particular type.- Specified by:
readStreamin interfaceFirmwarePackage- Parameters:
in- Input stream to read firmware from.- Throws:
java.io.IOException- Thrown in the event of a problem.
-
nextPage
public FirmwarePage nextPage()
Description copied from interface:FirmwarePackageThis function when implemented should return the next page of firmware from the file opened with readStream(). The function should return null at the end of the file.- Specified by:
nextPagein interfaceFirmwarePackage- Returns:
- The next firmware page from the file. Null when end of file.
-
convert
public void convert()
This method will convert a SREC record into a HID feature report for use by the firmware updater built into JPX. The ST1500 series devices require that firmware updates be in fixed length pages aligned to a particular page length. This means that the sparse SREC records need to be aligned to the correct page buffers and sent along page-by-page instead of update by update.
-
getPageCount
public int getPageCount()
Description copied from interface:FirmwarePackageThis method gets the number of pages in the package.- Specified by:
getPageCountin interfaceFirmwarePackage- Returns:
- Number of pages contained in the package.
-
getRestrictions
public java.util.List<FirmwareRestriction> getRestrictions()
Description copied from interface:FirmwarePackageThis method gets a list of restrictions that must be met before a device can accept firmware.- Specified by:
getRestrictionsin interfaceFirmwarePackage- Returns:
- List of restrictions.
-
-