use of alma.ACS.Monitordouble in project ACS by ACS-Community.
the class PropertyPrimTest method testOnChangeMonitorDouble.
public void testOnChangeMonitorDouble() {
// TODO implement...
CBdoubleImpl cb = new CBdoubleImpl();
CBDescIn descIn = new CBDescIn(50000, 50000, 1208);
Monitordouble monitor = ROpropertyDouble.create_monitor(cb._this(orb), descIn);
// disable on time trigger
monitor.set_timer_trigger(0);
try {
// sleep for 5 sec
Thread.sleep(3000);
} catch (InterruptedException ie) {
}
// TODO monitors should not come
// every change test
monitor.set_value_trigger(0, true);
// TODO change value here...
// ups RO monitor ;)
// !!! TMP - tested with backdoor via alarm_high_on()...
ROpropertyDouble.alarm_high_on();
try {
Thread.sleep(3000);
} catch (InterruptedException ie) {
}
// disable test
monitor.set_value_trigger(0, false);
ROpropertyDouble.alarm_high_on();
try {
Thread.sleep(3000);
} catch (InterruptedException ie) {
}
monitor.set_value_trigger(0, true);
ROpropertyDouble.alarm_high_on();
try {
Thread.sleep(3000);
} catch (InterruptedException ie) {
}
System.out.println("------");
// disable test
monitor.suspend();
ROpropertyDouble.alarm_high_on();
try {
Thread.sleep(3000);
} catch (InterruptedException ie) {
}
// / ... this should revive it
monitor.resume();
System.out.println("------");
ROpropertyDouble.alarm_high_on();
try {
Thread.sleep(3000);
} catch (InterruptedException ie) {
}
synchronized (cb) {
try {
monitor.destroy();
// wait for 3s
cb.wait(3000);
} catch (InterruptedException ie) {
}
}
// TODO test if done was called
}
use of alma.ACS.Monitordouble in project ACS by ACS-Community.
the class PropertySeqTest method testCreateMonitorDouble.
public void testCreateMonitorDouble() {
// TODO do test with null callback ;)
// TODO implement...
CBdoubleSeqImpl cb = new CBdoubleSeqImpl();
CBDescIn descIn = new CBDescIn(50000, 50000, 1208);
Monitordouble monitor = ROpropertyDoubleSeq.create_monitor(cb._this(orb), descIn);
try {
// 10.5 sec
Thread.sleep(10500);
} catch (InterruptedException ie) {
}
synchronized (cb) {
try {
monitor.destroy();
// wait for 3s
cb.wait(3000);
} catch (InterruptedException ie) {
}
}
// TODO test if done was called
}
use of alma.ACS.Monitordouble in project ACS by ACS-Community.
the class PropertyDoubleTest method testCreateMonitor.
public void testCreateMonitor() {
// TODO do test with null callback ;)
// TODO implement...
CBdoubleImpl cb = new CBdoubleImpl();
CBDescIn descIn = new CBDescIn(50000, 50000, 1208);
Monitordouble monitor = ROproperty.create_monitor(cb._this(orb), descIn);
try {
// 10.5 sec
Thread.sleep(10500);
} catch (InterruptedException ie) {
}
synchronized (cb) {
try {
monitor.destroy();
// wait for 3s
cb.wait(3000);
} catch (InterruptedException ie) {
}
}
// TODO test if done was called
}
use of alma.ACS.Monitordouble in project ACS by ACS-Community.
the class PropertyDoubleTest method testOnChangeMonitor.
public void testOnChangeMonitor() {
// TODO implement...
CBdoubleImpl cb = new CBdoubleImpl();
CBDescIn descIn = new CBDescIn(50000, 50000, 1208);
Monitordouble monitor = ROproperty.create_monitor(cb._this(orb), descIn);
// disable on time trigger
monitor.set_timer_trigger(0);
try {
// sleep for 5 sec
Thread.sleep(3000);
} catch (InterruptedException ie) {
}
// TODO monitors should not come
// every change test
monitor.set_value_trigger(0, true);
// TODO change value here...
// ups RO monitor ;)
// !!! TMP - tested with backdoor via alarm_high_on()...
ROproperty.alarm_high_on();
try {
Thread.sleep(3000);
} catch (InterruptedException ie) {
}
// disable test
monitor.set_value_trigger(0, false);
ROproperty.alarm_high_on();
try {
Thread.sleep(3000);
} catch (InterruptedException ie) {
}
monitor.set_value_trigger(0, true);
ROproperty.alarm_high_on();
try {
Thread.sleep(3000);
} catch (InterruptedException ie) {
}
System.out.println("------");
// disable test
monitor.suspend();
ROproperty.alarm_high_on();
try {
Thread.sleep(3000);
} catch (InterruptedException ie) {
}
/// ... this should revive it
monitor.resume();
System.out.println("------");
ROproperty.alarm_high_on();
try {
Thread.sleep(3000);
} catch (InterruptedException ie) {
}
synchronized (cb) {
try {
monitor.destroy();
// wait for 3s
cb.wait(3000);
} catch (InterruptedException ie) {
}
}
// TODO test if done was called
}
use of alma.ACS.Monitordouble in project ACS by ACS-Community.
the class PropertyPrimTest method testCreateMonitorDouble.
public void testCreateMonitorDouble() {
// TODO do test with null callback ;)
// TODO implement...
CBdoubleImpl cb = new CBdoubleImpl();
CBDescIn descIn = new CBDescIn(50000, 50000, 1208);
Monitordouble monitor = ROpropertyDouble.create_monitor(cb._this(orb), descIn);
try {
// 10.5 sec
Thread.sleep(10500);
} catch (InterruptedException ie) {
}
synchronized (cb) {
try {
monitor.destroy();
// wait for 3s
cb.wait(3000);
} catch (InterruptedException ie) {
}
}
// TODO test if done was called
}
Aggregations