[zb4osgi-changeset] [scm] ZigBee 4 OSGi repository change: r479 - in /projects/zb4osgi/sandbox/manlio.bacco/org.aaloa.zb4osgi.zigbee.ha.driver/src/main/java/it/cnr/isti/zigbee/ha/driver: ArraysUtil.java HADriverConfiguration.java
scm-notify at zb4osgi.aaloa.org
scm-notify at zb4osgi.aaloa.org
Mon Sep 24 17:51:25 CEST 2012
Author: manlio.bacco
Date: Mon Sep 24 17:51:24 2012
New Revision: 479
Log:
minor fixes
Modified:
projects/zb4osgi/sandbox/manlio.bacco/org.aaloa.zb4osgi.zigbee.ha.driver/src/main/java/it/cnr/isti/zigbee/ha/driver/ArraysUtil.java
projects/zb4osgi/sandbox/manlio.bacco/org.aaloa.zb4osgi.zigbee.ha.driver/src/main/java/it/cnr/isti/zigbee/ha/driver/HADriverConfiguration.java
Modified: projects/zb4osgi/sandbox/manlio.bacco/org.aaloa.zb4osgi.zigbee.ha.driver/src/main/java/it/cnr/isti/zigbee/ha/driver/ArraysUtil.java
==============================================================================
--- projects/zb4osgi/sandbox/manlio.bacco/org.aaloa.zb4osgi.zigbee.ha.driver/src/main/java/it/cnr/isti/zigbee/ha/driver/ArraysUtil.java (original)
+++ projects/zb4osgi/sandbox/manlio.bacco/org.aaloa.zb4osgi.zigbee.ha.driver/src/main/java/it/cnr/isti/zigbee/ha/driver/ArraysUtil.java Mon Sep 24 17:51:24 2012
@@ -18,7 +18,7 @@
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-*/
+ */
package it.cnr.isti.zigbee.ha.driver;
@@ -32,18 +32,17 @@
*/
public class ArraysUtil {
- /**
- * Create a new <code>int[]</code> by concatenating prefix and postfix
- *
- * @param prefix the first the <code>int[]</code> to join
- * @param postfix the second the <code>int[]</code> to join
- * @return the new <code>int[]</code> obtained by concatenating prefix and postfix
- */
- public static final int[] append(int[] prefix, int[] postfix){
- int[] result = new int[prefix.length+postfix.length];
- System.arraycopy(prefix, 0, result, 0, prefix.length);
- System.arraycopy(postfix, 0, result, prefix.length, postfix.length);
- return result;
- }
-
-}
+ /**
+ * Create a new <code>int[]</code> by concatenating prefix and postfix
+ *
+ * @param prefix the first the <code>int[]</code> to join
+ * @param postfix the second the <code>int[]</code> to join
+ * @return the new <code>int[]</code> obtained by concatenating prefix and postfix
+ */
+ public static final int[] append(int[] prefix, int[] postfix){
+ int[] result = new int[prefix.length+postfix.length];
+ System.arraycopy(prefix, 0, result, 0, prefix.length);
+ System.arraycopy(postfix, 0, result, prefix.length, postfix.length);
+ return result;
+ }
+}
Modified: projects/zb4osgi/sandbox/manlio.bacco/org.aaloa.zb4osgi.zigbee.ha.driver/src/main/java/it/cnr/isti/zigbee/ha/driver/HADriverConfiguration.java
==============================================================================
--- projects/zb4osgi/sandbox/manlio.bacco/org.aaloa.zb4osgi.zigbee.ha.driver/src/main/java/it/cnr/isti/zigbee/ha/driver/HADriverConfiguration.java (original)
+++ projects/zb4osgi/sandbox/manlio.bacco/org.aaloa.zb4osgi.zigbee.ha.driver/src/main/java/it/cnr/isti/zigbee/ha/driver/HADriverConfiguration.java Mon Sep 24 17:51:24 2012
@@ -55,10 +55,10 @@
EitherInputAndOutput;
}
- public enum ForceDeviceCompliance {
+ /*public enum ForceDeviceCompliance {
OnlyCompliantDevices,
AcceptNotCompliantDevices;
- }
+ }*/
/**
* The key to {@link String} property representing on values of th {@link ProvidedClusterMode} enum, that change the<br>
* creation behavior of the {@link HADeviceBase} objects, by following the rules:<br>
@@ -81,15 +81,15 @@
*/
public static final String DEFAULT_PROVIDED_CLUSTER_MODE = ProvidedClusterMode.HomeAutomationProfileStrict.toString();
- public static final String DEFAULT_FORCE_DEVICE_COMPLIANCE = ForceDeviceCompliance.OnlyCompliantDevices.toString();
+ //public static final String DEFAULT_FORCE_DEVICE_COMPLIANCE = ForceDeviceCompliance.OnlyCompliantDevices.toString();
private final HashMap<String, Object> configuration = new HashMap<String, Object>();
private final BundleContext context;
public HADriverConfiguration(BundleContext bc){
-
+
context = bc;
-
+
synchronized (configuration) {
configuration.put(ReportingConfiguration.CONFIGURE_REPORTING_MIN_KEY,
OSGiProperties.getInt(context, ReportingConfiguration.CONFIGURE_REPORTING_MIN_KEY, ReportingConfiguration.DEFAULT_CONFIGURE_REPORTING_MIN)
@@ -110,9 +110,9 @@
OSGiProperties.getString(context, ReportingConfiguration.CLUSTER_DISCOVERY_MODE_KEY, ReportingConfiguration.DEFAULT_CLUSTER_DISCOVERY_MODE.toString() )
);
- configuration.put(ReportingConfiguration.FORCE_DEVICE_COMPLIANCE_KEY,
+ /*configuration.put(ReportingConfiguration.FORCE_DEVICE_COMPLIANCE_KEY,
OSGiProperties.getString(context, ReportingConfiguration.FORCE_DEVICE_COMPLIANCE_KEY, ReportingConfiguration.DEFAULT_FORCE_DEVICE_COMPLIANCE.toString() )
- );
+ );*/
}
logger.debug("Initialized {} with {}", this, configuration);
@@ -159,7 +159,7 @@
}
);
}
- try {
+ /*try {
isChanged = setStringCaseSensitve( ReportingConfiguration.FORCE_DEVICE_COMPLIANCE_KEY,
helper.getString( ReportingConfiguration.FORCE_DEVICE_COMPLIANCE_KEY, getDeviceCompliance() )
) || isChanged;
@@ -171,7 +171,7 @@
ForceDeviceCompliance.class.getName()
}
);
- }
+ }*/
}
if(isChanged){
logger.debug("Current configuration after applying new configuration is {}", configuration);
@@ -187,7 +187,7 @@
Activator.getConfiguration().setDouble(ReportingConfiguration.CONFIGURE_REPORTING_CHANGE_KEY, getReportingChange());
Activator.getConfiguration().setBoolean(ReportingConfiguration.CONFIGURE_REPORTING_OVERWRITE_KEY, getReportingOverwrite());
Activator.getConfiguration().setStringCaseSensitve(ReportingConfiguration.CLUSTER_DISCOVERY_MODE_KEY, getClusterDiscoveryMode());
- Activator.getConfiguration().setStringCaseSensitve(ReportingConfiguration.FORCE_DEVICE_COMPLIANCE_KEY, getDeviceCompliance());
+ //Activator.getConfiguration().setStringCaseSensitve(ReportingConfiguration.FORCE_DEVICE_COMPLIANCE_KEY, getDeviceCompliance());
logger.debug("HADriver configuration updated.");
}
@@ -281,7 +281,7 @@
return getString(ReportingConfiguration.CLUSTER_DISCOVERY_MODE_KEY);
}
- public synchronized String getDeviceCompliance() {
+ /*public synchronized String getDeviceCompliance() {
return getString(ReportingConfiguration.FORCE_DEVICE_COMPLIANCE_KEY);
- }
+ }*/
}
More information about the Commit
mailing list