Class 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.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void convert()
      This method will convert a SREC record into a HID feature report for use by the firmware updater built into JPX.
      int getPageCount()
      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.
      FirmwarePage nextPage()
      This function when implemented should return the next page of firmware from the file opened with readStream().
      void readStream​(java.io.InputStream in)
      This function when implemented should read in a firmware file of a particular type.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SRECFirmwarePackage

        public SRECFirmwarePackage()
    • Method Detail

      • readStream

        public void readStream​(java.io.InputStream in)
                        throws java.io.IOException
        Description copied from interface: FirmwarePackage
        This function when implemented should read in a firmware file of a particular type.
        Specified by:
        readStream in interface FirmwarePackage
        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: FirmwarePackage
        This 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:
        nextPage in interface FirmwarePackage
        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: FirmwarePackage
        This method gets the number of pages in the package.
        Specified by:
        getPageCount in interface FirmwarePackage
        Returns:
        Number of pages contained in the package.