Search in sources :

Example 1 with OffShoot

use of alma.ACS.OffShoot in project ACS by ACS-Community.

the class RequesterUtil method giveCBDoubleSequence.

/**
	 * 
	 * @param cs
	 * @param x
	 * @return
	 * @throws AcsJContainerServicesEx
	 */
public static CBdoubleSeq giveCBDoubleSequence(ContainerServicesBase cs, ResponseReceiver<Double[]> x) throws AcsJContainerServicesEx {
    CBdoubleSeq ret;
    Objects.CBdoubleSeqImpl cb = new Objects.CBdoubleSeqImpl(x);
    OffShoot offshoot = cs.activateOffShoot(cb);
    ret = CBdoubleSeqHelper.narrow(offshoot);
    return ret;
}
Also used : CBdoubleSeq(alma.ACS.CBdoubleSeq) OffShoot(alma.ACS.OffShoot)

Example 2 with OffShoot

use of alma.ACS.OffShoot in project ACS by ACS-Community.

the class RequesterUtil method giveCBString.

// ========================================================
// =====================  Requests  =======================
// ========================================================
/**
	 * 
	 * @param cs
	 * @param x
	 * @return
	 * @throws AcsJContainerServicesEx
	 */
public static CBstring giveCBString(ContainerServicesBase cs, ResponseReceiver<String> x) throws AcsJContainerServicesEx {
    CBstring ret;
    Objects.CBstringImpl cb = new Objects.CBstringImpl(x);
    OffShoot offshoot = cs.activateOffShoot(cb);
    ret = CBstringHelper.narrow(offshoot);
    return ret;
}
Also used : OffShoot(alma.ACS.OffShoot) CBstring(alma.ACS.CBstring)

Example 3 with OffShoot

use of alma.ACS.OffShoot in project ACS by ACS-Community.

the class RequesterUtil method giveCBStringSequence.

/**
	 * 
	 * @param cs
	 * @param x
	 * @return
	 * @throws AcsJContainerServicesEx
	 */
public static CBstringSeq giveCBStringSequence(ContainerServicesBase cs, ResponseReceiver<String[]> x) throws AcsJContainerServicesEx {
    CBstringSeq ret;
    Objects.CBstringSeqImpl cb = new Objects.CBstringSeqImpl(x);
    OffShoot offshoot = cs.activateOffShoot(cb);
    ret = CBstringSeqHelper.narrow(offshoot);
    return ret;
}
Also used : OffShoot(alma.ACS.OffShoot) CBstringSeq(alma.ACS.CBstringSeq)

Example 4 with OffShoot

use of alma.ACS.OffShoot in project ACS by ACS-Community.

the class RequesterUtil method giveCBLong.

/**
	 * 
	 * @param cs
	 * @param x
	 * @return
	 * @throws AcsJContainerServicesEx
	 */
public static CBlong giveCBLong(ContainerServicesBase cs, ResponseReceiver<Integer> x) throws AcsJContainerServicesEx {
    CBlong ret;
    Objects.CBlongImpl cb = new Objects.CBlongImpl(x);
    OffShoot offshoot = cs.activateOffShoot(cb);
    ret = CBlongHelper.narrow(offshoot);
    return ret;
}
Also used : CBlong(alma.ACS.CBlong) OffShoot(alma.ACS.OffShoot)

Example 5 with OffShoot

use of alma.ACS.OffShoot in project ACS by ACS-Community.

the class StateChangeListener method createMonitor.

/**
	 * Creates a monitor for <code>statesProperty</code> from this instance.
	 * 
	 * @param statesProperty
	 * @param contSrv
	 * @return  usually not needed
	 * @throws Exception
	 */
public MonitorstringSeq createMonitor(ROstringSeq statesProperty, ContainerServices contSrv) throws Exception {
    this.contSrv = contSrv;
    if (monitor != null) {
        destroyMonitor();
    }
    this.statesProperty = statesProperty;
    // register this callback object with CORBA
    OffShoot offshoot = contSrv.activateOffShoot(this);
    CBstringSeq cbStringSeq = CBstringSeqHelper.narrow(offshoot);
    // register callback CORBA object with the statesProperty as a monitor  
    monitor = statesProperty.create_monitor(cbStringSeq, new CBDescIn());
    // baci.idl: "On creation, the only trigger present will be the timer trigger. 
    // Calling the set_value_trigger method determines the behaviour of the value trigger. 
    // The enable parameter determines whether the value trigger is active or not ." 
    // Strings have no triggerable value, thus don't care 
    monitor.set_value_trigger(new String[0], true);
    // baci.idl: "Timer trigger can be disabled by passing the value 0 for timer parameter." 
    monitor.set_timer_trigger(0);
    return monitor;
}
Also used : OffShoot(alma.ACS.OffShoot) CBDescIn(alma.ACS.CBDescIn) CBstringSeq(alma.ACS.CBstringSeq)

Aggregations

OffShoot (alma.ACS.OffShoot)11 CBDescIn (alma.ACS.CBDescIn)2 CBstringSeq (alma.ACS.CBstringSeq)2 AcsJContainerServicesEx (alma.JavaContainerError.wrappers.AcsJContainerServicesEx)2 Method (java.lang.reflect.Method)2 CBdouble (alma.ACS.CBdouble)1 CBdoubleSeq (alma.ACS.CBdoubleSeq)1 CBlong (alma.ACS.CBlong)1 CBlongSeq (alma.ACS.CBlongSeq)1 CBstring (alma.ACS.CBstring)1 CBvoid (alma.ACS.CBvoid)1 RWdouble (alma.ACS.RWdouble)1 ComponentInvocationHandler (alma.acs.component.dynwrapper.ComponentInvocationHandler)1 AcsJException (alma.acs.exceptions.AcsJException)1 Lamp (alma.acsexmplLamp.Lamp)1 DALChangeListener (com.cosylab.CDB.DALChangeListener)1 DALChangeListenerPOA (com.cosylab.CDB.DALChangeListenerPOA)1 InvocationTargetException (java.lang.reflect.InvocationTargetException)1 Servant (org.omg.PortableServer.Servant)1