當前位置: 首頁>>代碼示例>>Java>>正文


Java JICallBuilder.addInParamAsBoolean方法代碼示例

本文整理匯總了Java中org.jinterop.dcom.core.JICallBuilder.addInParamAsBoolean方法的典型用法代碼示例。如果您正苦於以下問題:Java JICallBuilder.addInParamAsBoolean方法的具體用法?Java JICallBuilder.addInParamAsBoolean怎麽用?Java JICallBuilder.addInParamAsBoolean使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.jinterop.dcom.core.JICallBuilder的用法示例。


在下文中一共展示了JICallBuilder.addInParamAsBoolean方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: addGroup

import org.jinterop.dcom.core.JICallBuilder; //導入方法依賴的package包/類
public AddGroupResult addGroup(String name, boolean active, int requestedUpdateRate, int clientGroup, Integer timeBias, Float percentDeadband, int lcid, String iid) throws JIException
{
    JICallBuilder callObject = new JICallBuilder(true);
    callObject.setOpnum(METHOD_INDEX_IOPCServer_AddGroup);
    callObject.addInParamAsString(name, JIFlags.FLAG_REPRESENTATION_STRING_LPWSTR);
    callObject.addInParamAsBoolean(active, JIFlags.FLAG_NULL);
    callObject.addInParamAsInt(requestedUpdateRate, JIFlags.FLAG_REPRESENTATION_UNSIGNED_INT);
    callObject.addInParamAsInt(clientGroup, JIFlags.FLAG_NULL);
    callObject.addInParamAsPointer(new JIPointer(timeBias != null ? timeBias : new Integer(0)), JIFlags.FLAG_NULL);
    callObject.addInParamAsPointer(new JIPointer(percentDeadband != null ? percentDeadband : new Float(0.0)), JIFlags.FLAG_NULL);
    callObject.addInParamAsInt(lcid, JIFlags.FLAG_REPRESENTATION_UNSIGNED_INT);
    callObject.addOutParamAsType(Integer.class, JIFlags.FLAG_NULL); //out param phServerGroup
    callObject.addOutParamAsType(Integer.class, JIFlags.FLAG_NULL); //out param pRevisedUpdateRate
    callObject.addInParamAsUUID(iid, JIFlags.FLAG_NULL);
    callObject.addOutParamAsType(IJIComObject.class, JIFlags.FLAG_NULL); // out param ppUnk
    Object[] result = comObject.call(callObject);
    if (callObject.isError())
        throw new JIException(callObject.getHRESULT());
    return new AddGroupResult(
            (Integer) result[0],
            (Integer) result[1],
            JIObjectFactory.narrowObject((IJIComObject) result[2]));
}
 
開發者ID:marat-gainullin,項目名稱:platypus-js,代碼行數:24,代碼來源:IOPCServer.java

示例2: setActiveState

import org.jinterop.dcom.core.JICallBuilder; //導入方法依賴的package包/類
public Map<Integer, Integer> setActiveState(boolean active, Integer[] serverHandles) throws JIException {
    JICallBuilder callObject = new JICallBuilder(true);
    callObject.setOpnum(3);
    callObject.addInParamAsInt(serverHandles.length, JIFlags.FLAG_NULL);
    callObject.addInParamAsArray(new JIArray(serverHandles, true), JIFlags.FLAG_NULL);
    callObject.addInParamAsBoolean(active, JIFlags.FLAG_NULL);
    callObject.addOutParamAsObject(new JIPointer(new JIArray(Integer.class, null, 1, true)), JIFlags.FLAG_NULL);

    Object[] result;
    try {
        result = comObject.call(callObject);
    } catch (JIException ex) {
        if (ex.getErrorCode() == 1 /*S_FALSE*/) {
            result = callObject.getResultsInCaseOfException();
        } else {
            throw ex;
        }
    }

    Integer[] errorCodes = (Integer[]) ((JIArray) ((JIPointer) result[0]).getReferent()).getArrayInstance();
    Map<Integer, Integer> map = new HashMap<>();
    for (int i = 0; i < serverHandles.length; i++) {
        map.put(serverHandles[i], errorCodes[i]);
    }
    return map;
}
 
開發者ID:marat-gainullin,項目名稱:platypus-js,代碼行數:27,代碼來源:IOPCItemMgt.java

示例3: removeGroup

import org.jinterop.dcom.core.JICallBuilder; //導入方法依賴的package包/類
public void removeGroup(int groupHandle, boolean force) throws JIException
{
    JICallBuilder callObject = new JICallBuilder(true);
    callObject.setOpnum(METHOD_INDEX_IOPCServer_RemoveGroup);
    callObject.addInParamAsInt(groupHandle, JIFlags.FLAG_REPRESENTATION_UNSIGNED_INT);
    callObject.addInParamAsBoolean(force, JIFlags.FLAG_NULL);
    Object[] result = comObject.call(callObject);
    if (callObject.isError())
        throw new JIException(callObject.getHRESULT());
}
 
開發者ID:marat-gainullin,項目名稱:platypus-js,代碼行數:11,代碼來源:IOPCServer.java

示例4: removePublicGroup

import org.jinterop.dcom.core.JICallBuilder; //導入方法依賴的package包/類
public void removePublicGroup(int serverGroup, boolean force) throws JIException
{
    JICallBuilder callObject = new JICallBuilder(true);
    callObject.setOpnum(1);
    callObject.addInParamAsInt(serverGroup, JIFlags.FLAG_REPRESENTATION_UNSIGNED_INT);
    callObject.addInParamAsBoolean(force, JIFlags.FLAG_NULL);
    comObject.call(callObject);
}
 
開發者ID:marat-gainullin,項目名稱:platypus-js,代碼行數:9,代碼來源:IOPCServerPublicGroups.java

示例5: validateItems

import org.jinterop.dcom.core.JICallBuilder; //導入方法依賴的package包/類
public ResultTable<OPCITEMDEF, OPCITEMRESULT> validateItems(OPCITEMDEF[] items, boolean blobUpdate) throws JIException {
    JICallBuilder callObject = new JICallBuilder(true);
    callObject.setOpnum(1);
    callObject.addInParamAsInt(items.length, JIFlags.FLAG_NULL);
    JIStruct[] structs = new JIStruct[items.length];
    for (int i = 0; i < items.length; i++) {
        structs[i] = items[i].getStruct();
    }
    JIArray structsArr = new JIArray(structs, true);
    callObject.addInParamAsArray(structsArr, JIFlags.FLAG_NULL);
    callObject.addInParamAsBoolean(blobUpdate, JIFlags.FLAG_NULL);
    callObject.addOutParamAsObject(new JIPointer(new JIArray(OPCITEMRESULT.getEmptyStruct(), null, 1, true)), JIFlags.FLAG_NULL);
    callObject.addOutParamAsObject(new JIPointer(new JIArray(Integer.class, null, 1, true)), JIFlags.FLAG_NULL);

    Object[] result;
    try {
        result = comObject.call(callObject);
    } catch (JIException ex) {
        if (ex.getErrorCode() == 1 /*S_FALSE*/) {
            result = callObject.getResultsInCaseOfException();
        } else {
            throw ex;
        }
    }

    JIStruct[] results = (JIStruct[]) ((JIArray) ((JIPointer) result[0]).getReferent()).getArrayInstance();
    Integer[] errorCodes = (Integer[]) ((JIArray) ((JIPointer) result[1]).getReferent()).getArrayInstance();
    ResultTable<OPCITEMDEF, OPCITEMRESULT> resultTable = new ResultTable<>();
    for (int i = 0; i < items.length; i++) {
        resultTable.put(items[i], new OPCITEMRESULT(results[i]), errorCodes[i]);
    }
    return resultTable;
}
 
開發者ID:marat-gainullin,項目名稱:platypus-js,代碼行數:34,代碼來源:IOPCItemMgt.java

示例6: readRaw

import org.jinterop.dcom.core.JICallBuilder; //導入方法依賴的package包/類
public ReadResult<OPCHDA_ITEM> readRaw(OPCHDA_TIME startTime, OPCHDA_TIME endTime, int numValues, boolean withBounds, Integer[] serverHandles) throws JIException {
        JICallBuilder callObject = new JICallBuilder(true);
        callObject.setOpnum(0);
//        callObject.addInParamAsPointer(new JIPointer(startTime.getStruct(), true), JIFlags.FLAG_NULL);
//        callObject.addInParamAsPointer(new JIPointer(endTime.getStruct(), true), JIFlags.FLAG_NULL);
        callObject.addInParamAsStruct(startTime.getStruct(), JIFlags.FLAG_NULL);
        callObject.addInParamAsStruct(endTime.getStruct(), JIFlags.FLAG_NULL);
        callObject.addInParamAsInt(numValues, JIFlags.FLAG_NULL);
        callObject.addInParamAsBoolean(withBounds, JIFlags.FLAG_NULL);
        callObject.addInParamAsInt(serverHandles.length, JIFlags.FLAG_NULL);
        callObject.addInParamAsArray(new JIArray(serverHandles, true), JIFlags.FLAG_NULL);
        callObject.addOutParamAsObject(new OPCHDA_TIME().getStruct(), JIFlags.FLAG_NULL);
        callObject.addOutParamAsObject(new OPCHDA_TIME().getStruct(), JIFlags.FLAG_NULL);
        callObject.addOutParamAsObject(new JIPointer(new JIArray(new OPCHDA_ITEM().getStruct(), null, 1, true)), JIFlags.FLAG_NULL);
        callObject.addOutParamAsObject(new JIPointer(new JIArray(Integer.class, null, 1, true)), JIFlags.FLAG_NULL);

        Object[] result;
        try {
            result = comObject.call(callObject);
        } catch (JIException ex) {
            if (ex.getErrorCode() == 1 /*S_FALSE*/) {
                result = callObject.getResultsInCaseOfException();
            } else {
                throw ex;
            }
        }
        startTime = new OPCHDA_TIME(((JIStruct) result[0]));
        endTime = new OPCHDA_TIME(((JIStruct) result[1]));
        JIStruct[] items = (JIStruct[]) ((JIArray) ((JIPointer) result[2]).getReferent()).getArrayInstance();
        Integer[] errorCodes = (Integer[]) ((JIArray) ((JIPointer) result[3]).getReferent()).getArrayInstance();
        ResultTable<Integer, OPCHDA_ITEM> resultTable = new ResultTable<>();
        for (int i = 0; i < serverHandles.length; i++) {
            resultTable.put(serverHandles[i], new OPCHDA_ITEM(items[i]), errorCodes[i]);
        }
        return new ReadResult<>(startTime, endTime, resultTable);
    }
 
開發者ID:marat-gainullin,項目名稱:platypus-js,代碼行數:37,代碼來源:IOPCHDA_SyncRead.java

示例7: setEnable

import org.jinterop.dcom.core.JICallBuilder; //導入方法依賴的package包/類
public void setEnable(boolean enable) throws JIException {
    JICallBuilder callObject = new JICallBuilder(true);
    callObject.setOpnum(4);
    callObject.addInParamAsBoolean(enable, JIFlags.FLAG_NULL);
    comObject.call(callObject);
}
 
開發者ID:marat-gainullin,項目名稱:platypus-js,代碼行數:7,代碼來源:IOPCAsyncIO2.java


注:本文中的org.jinterop.dcom.core.JICallBuilder.addInParamAsBoolean方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。