Package com.scriptel.proscript.firmware
Class SRECRecord
- java.lang.Object
-
- com.scriptel.proscript.firmware.SRECRecord
-
public class SRECRecord extends java.lang.Object
This 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 byte
TYPE_BLOCK_HEADER
static byte
TYPE_DATA_SEQ_16_BIT
static byte
TYPE_DATA_SEQ_24_BIT
static byte
TYPE_DATA_SEQ_32_BIT
static byte
TYPE_END_OF_BLOCK_16_BIT
static byte
TYPE_END_OF_BLOCK_24_BIT
static byte
TYPE_END_OF_BLOCK_32_BIT
static byte
TYPE_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 long
getAddress()
Gets the memory address associated with this record.byte[]
getData()
Gets the data associated with this record.byte
getType()
Gets the type of record this is.void
setAddress(long address)
Sets the memory address associated with this record.void
setData(byte[] data)
Sets the data associated with this record.void
setType(byte type)
Sets the type of record this is.java.lang.String
toString()
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 SRECParseException
This 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:
toString
in 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
-
-