|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectstella.roof.RoofInfo
public class RoofInfo
NEEDS UPDATE 16.10.02
A helper class collecting as much information about a roof as possible. The
information gathered consists of 24 individual triggers. They can be
represented in the STELLA-roof curcuit by checking the (potentialfree)
bridges in the following relays (see also JRoofView):
The individual switches T1-T24 mean (normally in a N/S-pair):
| Field Summary | |
|---|---|
private boolean |
open
If this is true, the roof is open and no problems have been seen. |
private static String |
OPEN
The trigger state without the leading 0F of the roof for total open. |
private boolean |
shut
If this is true, the roof is closed and no problems have been seen. |
private static String |
SHUT
The trigger state without the leading 0F of the roof for total shut. |
private Trigger[] |
t24
The status of all triggers. |
| Constructor Summary | |
|---|---|
RoofInfo()
Constructs a new roof-info whithout any information in it. |
|
| Method Summary | |
|---|---|
Trigger[] |
getTriggers()
Returns all triggers. |
boolean |
isOpen()
Returns true, if the roof is open and all switches have reported in the state necessary for a true, flawless open. |
boolean |
isShut()
Returns true, if the roof is shut and all switches have reported in the state necessary for a true, flawless close. |
static RoofInfo |
parse(String raw)
Returns a new roof info object, parsed from a hex-representation of the idividual bits T1-T24. |
void |
setTrigger(Trigger[] trigger)
Sets all triggers. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final String OPEN
private static final String SHUT
private Trigger[] t24
private boolean open
private boolean shut
| Constructor Detail |
|---|
public RoofInfo()
| Method Detail |
|---|
public static RoofInfo parse(String raw)
0SAABBCC
Herein, S is the 4-bit hex-representation of S0 to S3, AA to CC is a
hex-representation of T1-T20, Meaning that the last four bits are not
used, but reserved for direct assignment to T21-T24.As T21-T24 cannot be deduced directly (relay fully wired), it is constructed from S's and T's in the following way:
T21 = !S0 & !S1 & T10 & T12 & T19 & T1 & !T23
T22 = !S0 & !S1 & T10 & T12 & T19 & T2 & !T24
T23 = !S0 & !S1 & T10 & T12 & T20 & T3 & !T21
T24 = !S0 & !S1 & T10 & T12 & T20 & T4 & !T22
public boolean isOpen()
OPEN.
public boolean isShut()
SHUT.
public Trigger[] getTriggers()
public void setTrigger(Trigger[] trigger)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||