use of alma.ACS.RWdouble in project ACS by ACS-Community.
the class SpecialTestMasterComponentTest method testOtherProperty.
public void testOtherProperty() {
RWdouble doubleProperty = m_masterComp.someOtherProperty();
assertNotNull(doubleProperty);
CompletionHolder ch = new CompletionHolder();
doubleProperty.set_sync(3.14);
double actualValue = doubleProperty.get_sync(ch);
assertTrue("value of property 'someOtherProperty' must equal 3.14", actualValue < 3.15 && actualValue > 3.13);
// PropertySet allCharacteristics = doubleProperty.get_all_characteristics();
// assertNotNull(allCharacteristics);
}
use of alma.ACS.RWdouble in project ACS by ACS-Community.
the class MyTestCBvoid method testActivateOffShoot.
public void testActivateOffShoot() throws Exception {
// activate callback object
MyTestCBvoid cb = new MyTestCBvoid(m_logger);
m_logger.info("MyTestCBvoid instantiated...");
CBvoid cbvoid = alma.ACS.CBvoidHelper.narrow(getContainerServices().activateOffShoot(cb));
m_logger.info("MyTestCBvoid activated.");
// activate dal listener object
m_logger.info("activating dal listener offshoot...");
DALChangeListenerPOA dalListenerSrv = new MyTestDALChangeListener();
OffShoot offshoot2 = getContainerServices().activateOffShoot(dalListenerSrv);
DALChangeListener dalListenerRef = DALChangeListenerHelper.narrow(offshoot2);
m_logger.info("done activating dal listener offshoot.");
// check if dal listener works...
m_logger.info("calling dal listener...");
dalListenerRef.object_changed("happyCurl");
m_logger.info("done calling dal listener.");
// check if callback works...
RWdouble brightness = null;
Lamp lamp = LampHelper.narrow(getContainerServices().getComponent(m_lampCurl));
assertNotNull("reference to Lamp component not null", lamp);
brightness = lamp.brightness();
assertNotNull("brightness property of lamp not null", brightness);
CBDescIn desc = new CBDescIn();
m_logger.info("m_desc instantiated...");
m_logger.info("before setting callback...");
brightness.set_async(7.345, cbvoid, desc);
m_logger.finer("callback set...");
//todo: do something and get feedback from the callback object
// m_logger.finer("changing value (sync)...");
// brightness.set_sync(8.456);
}
use of alma.ACS.RWdouble in project ACS by ACS-Community.
the class LampComponentClient1 method doSomeStuff.
/**
* Calls methods on our lamp component
*/
public void doSomeStuff() {
m_logger.info("will now use the lamp component...");
RWdouble propBrightness = m_lamp.brightness();
propBrightness.set_sync(22.345);
m_logger.info("lamp component calls done...");
}
Aggregations