jmri.jmrit
Class MemoryContents
java.lang.Object
jmri.jmrit.MemoryContents
public class MemoryContents
- extends Object
Model (and provide utility functions for) board memory
as expressed in .hex files.
Files come in two formats. The older one had 16 bit (4 character)
addresses; we support the entire address space for these.
The newer form has 24 bit (6 character) addresses, which moves
the rest of the information over on the line. The
"address24bit" boolean controls which of these is expected.
Note that even with 24 bit addresses, we load the entire address space
by assuming that there are is only 64K of actual content.
This will eventually have to be extended to full 24-bit addressing,
in which case a sparse implementation (e.g. 16 bit pages) will be needed.
- Author:
- Bob Jacobsen Copyright (C) 2005
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MemoryContents
public MemoryContents()
getComment
public String getComment(String c)
setAddress24Bit
public void setAddress24Bit(boolean v)
readHex
public void readHex(File file)
throws FileNotFoundException
- Throws:
FileNotFoundException
writeHex
public void writeHex(Writer w)
throws IOException
- Throws:
IOException
nextContent
public int nextContent(int location)
- Return the address of the next location containing data, including
the location in the argument
setLocation
public void setLocation(int location,
int value)
locationInUse
public boolean locationInUse(int location)
getLocation
public int getLocation(int location)
Copyright © 1997 - 2008 JMRI Community.
JMRI, DecoderPro, PanelPro, SoundPro, DispatcherPro and associated logos are our trademarks.
Additional information on copyright, trademarks and licenses is linked here.
Site hosted by: