Package com.scriptel.proscript.firmware
Class SRECRecord
- java.lang.Object
-
- com.scriptel.proscript.firmware.SRECRecord
-
public class SRECRecord extends java.lang.ObjectThis represents a single line in the SREC file which represents part of the overall program structure.
-
-
Field Summary
Fields Modifier and Type Field Description static byteTYPE_BLOCK_HEADERstatic byteTYPE_DATA_SEQ_16_BITstatic byteTYPE_DATA_SEQ_24_BITstatic byteTYPE_DATA_SEQ_32_BITstatic byteTYPE_END_OF_BLOCK_16_BITstatic byteTYPE_END_OF_BLOCK_24_BITstatic byteTYPE_END_OF_BLOCK_32_BITstatic byteTYPE_RECORD_COUNT
-
Constructor Summary
Constructors Constructor Description SRECRecord(java.lang.String line)This constructor will take a line from an SREC file and will attempt to parse and validate it.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetAddress()Gets the memory address associated with this record.byte[]getData()Gets the data associated with this record.bytegetType()Gets the type of record this is.voidsetAddress(long address)Sets the memory address associated with this record.voidsetData(byte[] data)Sets the data associated with this record.voidsetType(byte type)Sets the type of record this is.java.lang.StringtoString()Returns a human readable string containing information about this record.
-
-
-
Field Detail
-
TYPE_BLOCK_HEADER
public static final byte TYPE_BLOCK_HEADER
- See Also:
- Constant Field Values
-
TYPE_DATA_SEQ_16_BIT
public static final byte TYPE_DATA_SEQ_16_BIT
- See Also:
- Constant Field Values
-
TYPE_DATA_SEQ_24_BIT
public static final byte TYPE_DATA_SEQ_24_BIT
- See Also:
- Constant Field Values
-
TYPE_DATA_SEQ_32_BIT
public static final byte TYPE_DATA_SEQ_32_BIT
- See Also:
- Constant Field Values
-
TYPE_RECORD_COUNT
public static final byte TYPE_RECORD_COUNT
- See Also:
- Constant Field Values
-
TYPE_END_OF_BLOCK_32_BIT
public static final byte TYPE_END_OF_BLOCK_32_BIT
- See Also:
- Constant Field Values
-
TYPE_END_OF_BLOCK_24_BIT
public static final byte TYPE_END_OF_BLOCK_24_BIT
- See Also:
- Constant Field Values
-
TYPE_END_OF_BLOCK_16_BIT
public static final byte TYPE_END_OF_BLOCK_16_BIT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SRECRecord
public SRECRecord(java.lang.String line) throws SRECParseExceptionThis constructor will take a line from an SREC file and will attempt to parse and validate it.- Parameters:
line- String to parse.- Throws:
SRECParseException- Thrown in the event invalid data is parsed.
-
-
Method Detail
-
toString
public java.lang.String toString()
Returns a human readable string containing information about this record.- Overrides:
toStringin classjava.lang.Object- Returns:
- a string
-
getType
public byte getType()
Gets the type of record this is.- Returns:
- the type
-
setType
public void setType(byte type)
Sets the type of record this is.- Parameters:
type- the type to set
-
getData
public byte[] getData()
Gets the data associated with this record.- Returns:
- the data
-
setData
public void setData(byte[] data)
Sets the data associated with this record.- Parameters:
data- the data to set
-
getAddress
public long getAddress()
Gets the memory address associated with this record.- Returns:
- the address
-
setAddress
public void setAddress(long address)
Sets the memory address associated with this record.- Parameters:
address- the address to set
-
-