Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| " 2013 FRC Java API "
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.squawk.peripheral
Class SimulatedNorFlashSector

    java.lang.Object
      com.sun.squawk.peripheral.SimulatedNorFlashSector

All Implemented Interfaces:
  INorFlashSector

    public class SimulatedNorFlashSector

extends Object
implements INorFlashSector

I am a class that allows the RMS store to be used in Java heap as a byte array. This is to theoretically simplify testing.

Field Summary
`protected byte[]` | `bytes`
`protected String` | `fileName`
`protected int` | `purpose`
`static String` | `SECTORS_FILE_EXTENSION`
`protected int` | `size`
`protected Address` | `startAddress`
`static String` | `ZERO_PADDING`

Fields inherited from interface com.sun.squawk.peripheral.INorFlashSector
`RMS_PURPOSED, SYSTEM_PURPOSED, USER_PURPOSED`

Constructor Summary
`SimulatedNorFlashSector(Address startAddress, byte[] bytes, int purpose)`
`SimulatedNorFlashSector(Address startAddress, int size, int purpose, boolean useFile)`
`SimulatedNorFlashSector(String fileName)`

Method Summary
`void` | `erase()`
`void` | `getBytes(int memoryOffset, byte[] buffer, int bufferOffset, int length)`
`byte` | `getErasedValue()`
`int` | `getPurpose()`
`int` | `getSize()`
`Address` | `getStartAddress()`
`protected void` | `init(Address startAddress, int size, int purpose)`
`void` | `setBytes(int memoryOffset, byte[] buffer, int bufferOffset, int length)`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### SECTORS_FILE_EXTENSION

    public static final String SECTORS_FILE_EXTENSION

See Also:
  Constant Field Values

### ZERO_PADDING

    public static final String ZERO_PADDING

See Also:
  Constant Field Values

### purpose

    protected int purpose

### size

    protected int size

### startAddress

    protected Address startAddress

### bytes

    protected byte[] bytes

### fileName

    protected String fileName

Constructor Detail

### SimulatedNorFlashSector

    public SimulatedNorFlashSector(Address startAddress,
                                   byte[] bytes,
                                   int purpose)

### SimulatedNorFlashSector

    public SimulatedNorFlashSector(Address startAddress,
                                   int size,
                                   int purpose,
                                   boolean useFile)

### SimulatedNorFlashSector

    public SimulatedNorFlashSector(String fileName)
                            throws IOException

Throws:
  `IOException`

Method Detail

### erase

    public void erase()

  Specified by:
    `erase` in interface `INorFlashSector`

### getBytes

    public void getBytes(int memoryOffset,
                         byte[] buffer,
                         int bufferOffset,
                         int length)

  Specified by:
    `getBytes` in interface `INorFlashSector`

### getErasedValue

    public byte getErasedValue()

  Specified by:
    `getErasedValue` in interface `INorFlashSector`

### getPurpose

    public int getPurpose()

  Specified by:
    `getPurpose` in interface `INorFlashSector`

### getSize

    public int getSize()

  Specified by:
    `getSize` in interface `INorFlashSector`

### getStartAddress

    public Address getStartAddress()

  Specified by:
    `getStartAddress` in interface `INorFlashSector`

### init

    protected void init(Address startAddress,
                        int size,
                        int purpose)

### setBytes

    public void setBytes(int memoryOffset,
                         byte[] buffer,
                         int bufferOffset,
                         int length)

  Specified by:
    `setBytes` in interface `INorFlashSector`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| " 2013 FRC Java API "
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

"
For updated information see the Java FRC site
"