package Lock
import Timer.SimulatedTimer
-//JPF's Verify API
-import gov.nasa.jpf.vm.Verify
-
public class Locks{
int deviceNumbers
List locks
private String currentLock = "locked"
private String lockLatestValue = "locked"
- Locks(Closure sendEvent, int deviceNumbers) {
+ Locks(Closure sendEvent, int deviceNumbers, boolean init) {
this.sendEvent = sendEvent
this.timers = new SimulatedTimer()
this.deviceNumbers = deviceNumbers
this.locks = []
- def init = Verify.getBoolean()
if (init) {
this.lockState = "locked"
+ this.currentLock = "locked"
this.lockLatestValue = "locked"
} else {
this.lockState = "unlocked"
+ this.currentLock = "unlocked"
this.lockLatestValue = "unlocked"
}
locks.add(new Lock(sendEvent,id, label, displayName, this.lockState, this.lockLatestValue))