Skip to content

Commit

Permalink
Merge branch 'master' into development
Browse files Browse the repository at this point in the history
* master:
  Add constant hashmaps in autocoder and improve handling of comment blocks
  Remove java.lang imports
  Fix use of X.valueOf() instead of new X()
  • Loading branch information
cdjackson committed Mar 18, 2017
2 parents 92f93a7 + 0dccb45 commit a5a03de
Show file tree
Hide file tree
Showing 200 changed files with 8,070 additions and 23,669 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2014-2016 by the respective copyright holders.
* Copyright (c) 2016-2017 by the respective copyright holders.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
Expand All @@ -16,12 +16,12 @@

/**
* Class to implement the Z-Wave command class <b>COMMAND_CLASS_ALARM</b> version <b>1</b>.<br>
*
* <p>
* Command Class Alarm<br>
*
* This class provides static methods for processing received messages (message handler) and
* methods to get a message to send on the Z-Wave network.<br>
*
* <p>
* Note that this code is autogenerated. Manual changes may be overwritten.
*
* @author Chris Jackson - Initial contribution of Java code generator
Expand All @@ -45,10 +45,9 @@ public class CommandClassAlarmV1 {

/**
* Creates a new message with the ALARM_GET command.<br>
*
* <p>
* Alarm Get<br>
*
*
* @param alarmType {@link Integer}
* @return the {@link byte[]} array with the command to send
*/
Expand All @@ -67,10 +66,9 @@ static public byte[] getAlarmGet(Integer alarmType) {

/**
* Processes a received frame with the ALARM_GET command<br>
*
* <p>
* Alarm Get<br>
*
*
* <p>
* The output data {@link Map} has the following properties<br>
*
* <ul>
Expand All @@ -85,18 +83,17 @@ public static Map<String, Object> handleAlarmGet(byte[] payload) {
Map<String, Object> response = new HashMap<String, Object>();

// Process 'Alarm Type'
response.put("ALARM_TYPE", new Integer(payload[2]));
response.put("ALARM_TYPE", Integer.valueOf(payload[2]));

// Return the map of processed response data;
return response;
}

/**
* Creates a new message with the ALARM_REPORT command.<br>
*
* <p>
* Alarm Report<br>
*
*
* @param alarmType {@link Integer}
* @param alarmLevel {@link Integer}
* @return the {@link byte[]} array with the command to send
Expand All @@ -119,10 +116,9 @@ static public byte[] getAlarmReport(Integer alarmType, Integer alarmLevel) {

/**
* Processes a received frame with the ALARM_REPORT command<br>
*
* <p>
* Alarm Report<br>
*
*
* <p>
* The output data {@link Map} has the following properties<br>
*
* <ul>
Expand All @@ -138,10 +134,10 @@ public static Map<String, Object> handleAlarmReport(byte[] payload) {
Map<String, Object> response = new HashMap<String, Object>();

// Process 'Alarm Type'
response.put("ALARM_TYPE", new Integer(payload[2]));
response.put("ALARM_TYPE", Integer.valueOf(payload[2]));

// Process 'Alarm Level'
response.put("ALARM_LEVEL", new Integer(payload[3]));
response.put("ALARM_LEVEL", Integer.valueOf(payload[3]));

// Return the map of processed response data;
return response;
Expand Down
Loading

0 comments on commit a5a03de

Please sign in to comment.