Search in sources :

Example 1 with SettingSpecifier

use of net.solarnetwork.settings.SettingSpecifier in project solarnetwork-node by SolarNetwork.

the class SunSpecInverterDatumDataSource method getSettingSpecifiersWithDefaults.

@Override
protected List<SettingSpecifier> getSettingSpecifiersWithDefaults(SunSpecDeviceDatumDataSourceSupport defaults) {
    List<SettingSpecifier> results = super.getSettingSpecifiersWithDefaults(defaults);
    if (defaults instanceof SunSpecInverterDatumDataSource) {
        SunSpecInverterDatumDataSource iDefaults = (SunSpecInverterDatumDataSource) defaults;
        results.add(new BasicTextFieldSettingSpecifier("ignoreStatesValue", iDefaults.getIgnoreStatesValue()));
    }
    return results;
}
Also used : SettingSpecifier(net.solarnetwork.settings.SettingSpecifier) BasicTextFieldSettingSpecifier(net.solarnetwork.settings.support.BasicTextFieldSettingSpecifier) BasicTextFieldSettingSpecifier(net.solarnetwork.settings.support.BasicTextFieldSettingSpecifier)

Example 2 with SettingSpecifier

use of net.solarnetwork.settings.SettingSpecifier in project solarnetwork-node by SolarNetwork.

the class SunSpecMeterDatumDataSource method getSettingSpecifiersWithDefaults.

@Override
protected List<SettingSpecifier> getSettingSpecifiersWithDefaults(SunSpecDeviceDatumDataSourceSupport defaults) {
    List<SettingSpecifier> results = super.getSettingSpecifiersWithDefaults(defaults);
    if (defaults instanceof SunSpecMeterDatumDataSource) {
        SunSpecMeterDatumDataSource mDefaults = (SunSpecMeterDatumDataSource) defaults;
        results.add(new BasicToggleSettingSpecifier("backwards", mDefaults.backwards));
        results.add(new BasicToggleSettingSpecifier("includePhaseMeasurements", mDefaults.includePhaseMeasurements));
    }
    return results;
}
Also used : BasicToggleSettingSpecifier(net.solarnetwork.settings.support.BasicToggleSettingSpecifier) SettingSpecifier(net.solarnetwork.settings.SettingSpecifier) BasicToggleSettingSpecifier(net.solarnetwork.settings.support.BasicToggleSettingSpecifier)

Example 3 with SettingSpecifier

use of net.solarnetwork.settings.SettingSpecifier in project solarnetwork-node by SolarNetwork.

the class MBusDeviceDatumDataSourceSupport method getMBusNetworkSettingSpecifiers.

/**
 * Get setting specifiers for the {@literal unitId} and
 * {@literal mBusNetwork.propertyFilters['uid']} properties.
 *
 * @return list of setting specifiers
 * @since 1.1
 */
protected List<SettingSpecifier> getMBusNetworkSettingSpecifiers() {
    List<SettingSpecifier> results = new ArrayList<SettingSpecifier>(16);
    results.add(new BasicTextFieldSettingSpecifier("mBusNetwork.propertyFilters['uid']", "M-Bus Port"));
    results.add(new BasicTextFieldSettingSpecifier("address", ""));
    results.add(new BasicTextFieldSettingSpecifier("sampleCacheMs", String.valueOf(DEFAULT_SAMPLE_CACHE_MS)));
    return results;
}
Also used : BasicTextFieldSettingSpecifier(net.solarnetwork.settings.support.BasicTextFieldSettingSpecifier) SettingSpecifier(net.solarnetwork.settings.SettingSpecifier) ArrayList(java.util.ArrayList) BasicTextFieldSettingSpecifier(net.solarnetwork.settings.support.BasicTextFieldSettingSpecifier)

Example 4 with SettingSpecifier

use of net.solarnetwork.settings.SettingSpecifier in project solarnetwork-node by SolarNetwork.

the class WMBusDeviceDatumDataSourceSupport method getWMBusNetworkSettingSpecifiers.

/**
 * Get setting specifiers for the {@literal unitId} and
 * {@literal wMBusNetwork.propertyFilters['uid']} properties.
 *
 * @return list of setting specifiers
 * @since 1.1
 */
protected List<SettingSpecifier> getWMBusNetworkSettingSpecifiers() {
    List<SettingSpecifier> results = new ArrayList<SettingSpecifier>(16);
    results.add(new BasicTextFieldSettingSpecifier("wMBusNetwork.propertyFilters['uid']", "M-Bus (Wireless) Port"));
    results.add(new BasicTextFieldSettingSpecifier("secondaryAddress", ""));
    results.add(new BasicTextFieldSettingSpecifier("key", "", true));
    return results;
}
Also used : BasicTextFieldSettingSpecifier(net.solarnetwork.settings.support.BasicTextFieldSettingSpecifier) SettingSpecifier(net.solarnetwork.settings.SettingSpecifier) ArrayList(java.util.ArrayList) BasicTextFieldSettingSpecifier(net.solarnetwork.settings.support.BasicTextFieldSettingSpecifier)

Example 5 with SettingSpecifier

use of net.solarnetwork.settings.SettingSpecifier in project solarnetwork-node by SolarNetwork.

the class JMBusSerialMBusNetwork method getSettingSpecifiers.

@Override
public List<SettingSpecifier> getSettingSpecifiers() {
    JMBusSerialMBusNetwork defaults = new JMBusSerialMBusNetwork();
    List<SettingSpecifier> results = new ArrayList<SettingSpecifier>(20);
    results.add(new BasicTextFieldSettingSpecifier("uid", defaults.getUid()));
    results.add(new BasicTextFieldSettingSpecifier("serialParams.portName", defaults.serialParams.getPortName()));
    return results;
}
Also used : SettingSpecifier(net.solarnetwork.settings.SettingSpecifier) BasicTextFieldSettingSpecifier(net.solarnetwork.settings.support.BasicTextFieldSettingSpecifier) ArrayList(java.util.ArrayList) BasicTextFieldSettingSpecifier(net.solarnetwork.settings.support.BasicTextFieldSettingSpecifier)

Aggregations

SettingSpecifier (net.solarnetwork.settings.SettingSpecifier)190 BasicTextFieldSettingSpecifier (net.solarnetwork.settings.support.BasicTextFieldSettingSpecifier)161 ArrayList (java.util.ArrayList)154 BasicTitleSettingSpecifier (net.solarnetwork.settings.support.BasicTitleSettingSpecifier)81 BasicToggleSettingSpecifier (net.solarnetwork.settings.support.BasicToggleSettingSpecifier)39 LinkedHashMap (java.util.LinkedHashMap)34 BasicGroupSettingSpecifier (net.solarnetwork.settings.support.BasicGroupSettingSpecifier)31 BasicMultiValueSettingSpecifier (net.solarnetwork.settings.support.BasicMultiValueSettingSpecifier)31 KeyedSettingSpecifier (net.solarnetwork.settings.KeyedSettingSpecifier)11 DatumSamplesType (net.solarnetwork.domain.datum.DatumSamplesType)9 ExpressionService (net.solarnetwork.service.ExpressionService)9 IOException (java.io.IOException)8 SettingSpecifierProvider (net.solarnetwork.settings.SettingSpecifierProvider)7 MappableSpecifier (net.solarnetwork.settings.MappableSpecifier)6 Test (org.junit.Test)6 LinkedHashSet (java.util.LinkedHashSet)5 BasicFileSettingSpecifier (net.solarnetwork.node.settings.support.BasicFileSettingSpecifier)5 BasicSetupResourceSettingSpecifier (net.solarnetwork.node.settings.support.BasicSetupResourceSettingSpecifier)5 BasicCronExpressionSettingSpecifier (net.solarnetwork.settings.support.BasicCronExpressionSettingSpecifier)5 List (java.util.List)4