Examples of IErrorStrategyItem


Examples of fr.soleil.salsa.entity.IErrorStrategyItem

                        String[] categoriesStr = new String[] { "actuators", "sensors",
                                "timebases", "hooks" };

                        for (int i = 0; i < categoriesStr.length; i++) {
                            String cat = categoriesStr[i];
                            IErrorStrategyItem esi = categoriesESI[i];

                            double errorStrategyTimeOut = esi.getTimeOut();
                            int errorStrategyRetryCount = esi.getRetryCount();
                            double errorStrategyRetryTimeOut = esi.getTimeBetweenRetries();
                            int errorStrategyType = esi.getStrategy().ordinal();

                            // Time out.
                            scanServerProxy.write_attribute(new DeviceAttribute(cat + "TimeOut",
                                    errorStrategyTimeOut));
                            // Retry count.
View Full Code Here

Examples of fr.soleil.salsa.entity.IErrorStrategyItem

        return model;
    }

    protected IErrorStrategy initModel() {
        ErrorStrategyModel strategyModel = new ErrorStrategyModel(this);
        IErrorStrategyItem itemImpl = getHooksErrorStrategy();
        if (itemImpl != null) {
            strategyModel.setHooksErrorStrategy(itemImpl.toModel());
        }
        itemImpl = getActuatorsErrorStrategy();
        if (itemImpl != null) {
            strategyModel.setActuatorsErrorStrategy(itemImpl.toModel());
        }

        itemImpl = getSensorsErrorStrategy();
        if (itemImpl != null) {
            strategyModel.setSensorsErrorStrategy(itemImpl.toModel());
        }

        itemImpl = getTimebasesErrorStrategy();
        if (itemImpl != null) {
            strategyModel.setTimebasesErrorStrategy(itemImpl.toModel());
        }
        return strategyModel;
    }
View Full Code Here

Examples of fr.soleil.salsa.entity.IErrorStrategyItem

                            errorStrat.getTimebasesErrorStrategy(), errorStrat.getHooksErrorStrategy() };
                    String[] categoriesStr = new String[] { "actuators", "sensors", "timebases", "hooks" };

                    for (int i = 0; i < categoriesStr.length; i++) {
                        String cat = categoriesStr[i];
                        IErrorStrategyItem esi = categoriesESI[i];

                        double errorStrategyTimeOut = esi.getTimeOut();
                        int errorStrategyRetryCount = esi.getRetryCount();
                        double errorStrategyRetryTimeOut = esi.getTimeBetweenRetries();
                        int errorStrategyType = esi.getStrategy().ordinal();

                        // Time out.
                        String catAttribute = cat + "TimeOut";
                        actionName = writeAttributeLog(catAttribute, String.valueOf(errorStrategyTimeOut));
                        scanServerProxy.write_attribute(new DeviceAttribute(catAttribute, errorStrategyTimeOut));
View Full Code Here

Examples of fr.soleil.salsa.entity.IErrorStrategyItem

                        , "timebases"
                        , "hooks" };
               
                for(int i=0; i<categoriesStr.length; i++) {
                    String cat = categoriesStr[i];
                    IErrorStrategyItem esi = categoriesESI[i];
                   
                    double errorStrategyTimeOut = esi.getTimeOut();
                    int errorStrategyRetryCount = esi.getRetryCount();
                    double errorStrategyRetryTimeOut = esi.getTimeBetweenRetries();
                    int errorStrategyType = esi.getStrategy().ordinal();
                   
                    // Time out.
                    scanServerProxy.write_attribute(new DeviceAttribute(cat + "TimeOut", errorStrategyTimeOut));
                    // Retry count.
                    scanServerProxy.write_attribute(new DeviceAttribute(cat + "RetryCount", errorStrategyRetryCount));
View Full Code Here

Examples of fr.soleil.salsa.entity.IErrorStrategyItem

                    String[] categoriesStr = new String[] { "actuators", "sensors", "timebases",
                            "hooks" };

                    for (int i = 0; i < categoriesStr.length; i++) {
                        String cat = categoriesStr[i];
                        IErrorStrategyItem esi = categoriesESI[i];

                        double errorStrategyTimeOut = esi.getTimeOut();
                        int errorStrategyRetryCount = esi.getRetryCount();
                        double errorStrategyRetryTimeOut = esi.getTimeBetweenRetries();
                        int errorStrategyType = esi.getStrategy().ordinal();

                        // Time out.
                        scanServerProxy.write_attribute(new DeviceAttribute(cat + "TimeOut",
                                errorStrategyTimeOut));
                        // Retry count.
View Full Code Here

Examples of fr.soleil.salsa.entity.IErrorStrategyItem

                    String[] categoriesStr = new String[] { "actuators", "sensors", "timebases",
                            "hooks" };
               
                for(int i=0; i<categoriesStr.length; i++) {
                    String cat = categoriesStr[i];
                    IErrorStrategyItem esi = categoriesESI[i];
                   
                    double errorStrategyTimeOut = esi.getTimeOut();
                    int errorStrategyRetryCount = esi.getRetryCount();
                    double errorStrategyRetryTimeOut = esi.getTimeBetweenRetries();
                    int errorStrategyType = esi.getStrategy().ordinal();
                   
                    // Time out.
                        scanServerProxy.write_attribute(new DeviceAttribute(cat + "TimeOut",
                                errorStrategyTimeOut));
                    // Retry count.
View Full Code Here

Examples of fr.soleil.salsa.entity.IErrorStrategyItem

                        , "timebases"
                        , "hooks" };
               
                for(int i=0; i<categoriesStr.length; i++) {
                    String cat = categoriesStr[i];
                    IErrorStrategyItem esi = categoriesESI[i];
                   
                    double errorStrategyTimeOut = esi.getTimeOut();
                    int errorStrategyRetryCount = esi.getRetryCount();
                    double errorStrategyRetryTimeOut = esi.getTimeBetweenRetries();
                    int errorStrategyType = esi.getStrategy().ordinal();
                   
                    // Time out.
                    scanServerProxy.write_attribute(new DeviceAttribute(cat + "TimeOut", errorStrategyTimeOut));
                    // Retry count.
                    scanServerProxy.write_attribute(new DeviceAttribute(cat + "RetryCount", errorStrategyRetryCount));
View Full Code Here

Examples of fr.soleil.salsa.entity.IErrorStrategyItem

            }
        }
    }

    private IErrorStrategyItem findErrorStrategyItem(ErrorStrategyItemType esType) {
        IErrorStrategyItem result = null;
        if (errorStrategy != null) {
            if (esType == ErrorStrategyItemType.sensors) {
                result = errorStrategy.getSensorsErrorStrategy();
            }
            else if (esType == ErrorStrategyItemType.actuators) {
View Full Code Here

Examples of fr.soleil.salsa.entity.IErrorStrategyItem

        }
        return result;
    }

    public void notifyStrategySelectedChanged(ErrorStrategyItemType esType, String value) {
        IErrorStrategyItem esItem = findErrorStrategyItem(esType);
        if (esItem != null) {
            ErrorStrategyType oldType = esItem.getStrategy();
            ErrorStrategyType newType = ErrorStrategyType.valueOf(ErrorStrategyType.class, value);
            if (oldType != newType) {
                esItem.setStrategy(newType);
                if (config != null) {
                    config.setModified(true);
                }
            }
        }
View Full Code Here

Examples of fr.soleil.salsa.entity.IErrorStrategyItem

        }
        refresh();
    }

    public void notifyTimeBetweenRetriesChanged(ErrorStrategyItemType esType, String value) {
        IErrorStrategyItem esItem = findErrorStrategyItem(esType);
        if (esItem != null) {
            double oldValue = esItem.getTimeBetweenRetries();
            try {
                double d = Double.parseDouble(value);
                if (d != oldValue) {
                    esItem.setTimeBetweenRetries(d);
                    if (config != null) {
                        config.setModified(true);
                    }
                }
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.