|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectztex.ImgFile
ztex.ZtexImgFile1
public class ZtexImgFile1
Represents a firmware image with ZTEX descriptor 1.
The ZTEX descriptor is usually located at the position 0x6x of the FX2 firmware image.
In FX3 firmwares the descriptor is located by searching for the signature.
A description of the ZTEX descriptor 1 can be found in ZtexDevice1
.
ZtexDevice1
,
Ztex1
Field Summary |
---|
Fields inherited from class ztex.ImgFile |
---|
data, isFx3, startVector |
Constructor Summary | |
---|---|
ZtexImgFile1(java.io.InputStream in,
java.lang.String name)
Constructs an instance from a given file name and descriptor position. |
|
ZtexImgFile1(java.lang.String fileName)
Constructs an instance from a given file name. |
Method Summary | |
---|---|
int |
fwVersion()
Returns the firmware version. |
byte[] |
interfaceCapabilities()
Returns the interface capabilities (all 6 bytes). |
int |
interfaceCapabilities(int i)
Returns byte i of the interface capabilities. |
int |
interfaceVersion()
Returns the interface version. |
byte[] |
moduleReserved()
Returns the application specific information (all 12 bytes). |
int |
moduleReserved(int i)
Returns byte i of the application specific information. |
byte[] |
productId()
Returns the product ID (all 4 bytes). |
int |
productId(int i)
Returns byte i of the product ID. |
void |
setSnString(java.lang.String s)
Modifies the serial number string. |
java.lang.String |
snString()
Returns the serial number string. |
java.lang.String |
toString()
Returns a string representation if the instance. |
Methods inherited from class ztex.ImgFile |
---|
dataInfo, uncompressAddr |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ZtexImgFile1(java.io.InputStream in, java.lang.String name) throws java.io.IOException, ImgFileDamagedException, IncompatibleFirmwareException
in
- Input stream from which the img file is read.name
- Name of the input.
java.io.IOException
- If an read error occurred.
ImgFileDamagedException
- If the firmware file is damaged.
IncompatibleFirmwareException
- If the firmware image contains no valid ZTEX descriptor 1 at the specified position.public ZtexImgFile1(java.lang.String fileName) throws java.io.IOException, ImgFileDamagedException, IncompatibleFirmwareException
fileName
- The file name.
java.io.IOException
- If an read error occurred.
ImgFileDamagedException
- If the firmware file is damaged.
IncompatibleFirmwareException
- If the firmware image contains no valid ZTEX descriptor 1 at the specified position.Method Detail |
---|
public final byte[] productId()
ZtexDevice1
.public int productId(int i)
i
- index
ZtexDevice1
.public final int fwVersion()
ZtexDevice1
.public final int interfaceVersion()
ZtexDevice1
.public final byte[] interfaceCapabilities()
ZtexDevice1
.public final int interfaceCapabilities(int i)
i
- index
ZtexDevice1
.public final byte[] moduleReserved()
ZtexDevice1
.public final int moduleReserved(int i)
i
- index
ZtexDevice1
.public final java.lang.String snString()
ZtexDevice1
.public final void setSnString(java.lang.String s) throws IncompatibleFirmwareException
s
- The new serial number string which must not be longer then 10 characters.
IncompatibleFirmwareException
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |