Fixed a bug in Am2900; created dlatch8/80; relayouted some components
[Mograsim.git] / net.mograsim.logic.model / src / net / mograsim / logic / model / snippets / HighLevelStateHandler.java
1 package net.mograsim.logic.model.snippets;
2
3 import net.mograsim.logic.model.model.components.ModelComponent;
4 import net.mograsim.logic.model.serializing.JSONSerializable;
5
6 /**
7  * A high level state ID consists of parts separated by dots ('.').<br>
8  * The last part (the part after the last dot) is called "atomic high level state ID". The parts before that part are called "subcomponent
9  * ID"s.<br>
10  * If there is no dot in a high level state ID, the whole high level state ID is called atomic.<br>
11  * Note that subcomponent IDs don't have to correspond to actual subcomponents. For example, a RAM component may supply subcomponent IDs
12  * "c0000", "c0001" ... "cFFFF" without actually having a subcomponent for each cell. It also is allowed to delegate an atomic high level
13  * state ID to a subcomponent.
14  * 
15  * @author Daniel Kirschten
16  */
17 public interface HighLevelStateHandler extends JSONSerializable
18 {
19         /**
20          * Gets the current value of the given high-level state. <br>
21          * See {@link HighLevelStateHandler} for an explanation of high-level state IDs.
22          * 
23          * @see #setHighLevelState(String, Object)
24          * @see ModelComponent#getHighLevelState(String)
25          * 
26          * @author Daniel Kirschten
27          */
28         public Object getHighLevelState(String stateID);
29
30         /**
31          * Sets the given high-level state to the given value. <br>
32          * See {@link HighLevelStateHandler} for an explanation of high-level state IDs.
33          * 
34          * @see #getHighLevelState(String)
35          * @see ModelComponent#setHighLevelState(String, Object)
36          * 
37          * @author Daniel Kirschten
38          */
39         public void setHighLevelState(String stateID, Object newState);
40
41 }