Merge remote-tracking branch 'origin/test' into test
This commit is contained in:
commit
6d40a8c5d9
@ -34,6 +34,12 @@ public class SrAXC extends SrDevice {
|
||||
return this.state == ON;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initState() {
|
||||
this.state = OFF;
|
||||
this.fault = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applyState(int state) {
|
||||
|
||||
|
@ -24,6 +24,8 @@ public abstract class SrDevice implements Debug {
|
||||
this.deviceType = deviceType;
|
||||
}
|
||||
|
||||
public abstract void initState();
|
||||
|
||||
public abstract void applyState(int state);
|
||||
|
||||
@Override
|
||||
|
@ -61,6 +61,13 @@ public class SrPSD extends SrDevice {
|
||||
this.finishTime = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initState() {
|
||||
this.state = CLOSE_LOCK;
|
||||
this.command.set(NONE);
|
||||
this.finishTime = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applyState(int state) {
|
||||
if (CLOSE_LOCK == state || CLOSED == state || TURNING == state || OPEN_FINISH == state) {
|
||||
|
@ -97,6 +97,14 @@ public class SrSignal extends SrDevice {
|
||||
this.command.set(NONE);
|
||||
this.finishTime = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initState() {
|
||||
this.state = OFF;
|
||||
this.command.set(NONE);
|
||||
this.finishTime = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applyState(int state) {
|
||||
if (OFF == state || H == state || L == state || U == state || UH == state) {
|
||||
|
@ -115,6 +115,13 @@ public class SrSwitch extends SrDevice {
|
||||
this.finishTime = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initState() {
|
||||
this.state = NORMAL;
|
||||
this.command.set(NONE);
|
||||
this.finishTime = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applyState(int state) {
|
||||
if (NORMAL == state || REVERSE == state || LOST == state) {
|
||||
|
@ -92,6 +92,11 @@ public class SrTrack extends SrDevice implements Debug {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initState() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applyState(int state) {
|
||||
|
||||
|
@ -78,6 +78,11 @@ public class SrTrain extends SrDevice {
|
||||
this.speed = v;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initState() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applyState(int state) {
|
||||
|
||||
|
@ -49,8 +49,10 @@ public class SrdRepository extends SimulationRepository {
|
||||
|
||||
@Override
|
||||
public void initState() {
|
||||
for (SrAXC axc : this.axcMap.values()) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public List<SrAXC> getAxcList() {
|
||||
return new ArrayList<>(this.axcMap.values());
|
||||
|
Loading…
Reference in New Issue
Block a user