File tree Expand file tree Collapse file tree 3 files changed +25
-3
lines changed
main/java/com/digi/xbee/api/models
test/java/com/digi/xbee/api/models Expand file tree Collapse file tree 3 files changed +25
-3
lines changed Original file line number Diff line number Diff line change @@ -78,8 +78,20 @@ public enum HardwareVersionEnum {
7878 S2D_TH_REG (0x35 , "XB24D: S2D TH Reg" ),
7979 SX (0x3E , "SX" ),
8080 XTR (0x3F , "XTR" ),
81- /** @since 1.2.0 */
82- CELLULAR (0x40 , "CELLULAR" );
81+ /**
82+ * @deprecated Use {@link #CELLULAR_CAT1_LTE_VERIZON} instead.
83+ * @since 1.2.0 */
84+ CELLULAR (0x40 , "CELLULAR" ),
85+ /** @since 1.2.1 */
86+ CELLULAR_CAT1_LTE_VERIZON (0x40 , "XBee Cellular Cat 1 LTE Verizon" ),
87+ /** @since 1.2.1 */
88+ CELLULAR_3G (0x44 , "XBee Cellular 3G" ),
89+ /** @since 1.2.1 */
90+ CELLULAR_LTE_VERIZON (0x46 , "XBee Cellular LTE-M Verizon" ),
91+ /** @since 1.2.1 */
92+ CELLULAR_LTE_ATT (0x47 , "XBee Cellular LTE-M AT&T" ),
93+ /** @since 1.2.1 */
94+ CELLULAR_NBIOT_EUROPE (0x48 , "XBee Cellular NBIoT Europe" );
8395
8496 // Variables
8597 private final int value ;
Original file line number Diff line number Diff line change @@ -112,6 +112,7 @@ public static XBeeProtocol get(int id) {
112112 *
113113 * @see HardwareVersion
114114 */
115+ @ SuppressWarnings ("deprecation" )
115116 public static XBeeProtocol determineProtocol (HardwareVersion hardwareVersion , String firmwareVersion ) {
116117 if (hardwareVersion == null || firmwareVersion == null || hardwareVersion .getValue () < 0x09
117118 || HardwareVersionEnum .get (hardwareVersion .getValue ()) == null )
@@ -225,6 +226,11 @@ else if (firmwareVersion.startsWith("8"))
225226 case S2D_TH_REG :
226227 return ZIGBEE ;
227228 case CELLULAR :
229+ case CELLULAR_CAT1_LTE_VERIZON :
230+ case CELLULAR_3G :
231+ case CELLULAR_LTE_VERIZON :
232+ case CELLULAR_LTE_ATT :
233+ case CELLULAR_NBIOT_EUROPE :
228234 return CELLULAR ;
229235 default :
230236 return ZIGBEE ;
Original file line number Diff line number Diff line change @@ -77,7 +77,11 @@ public void testHardwareVersionEnumDescriptions() {
7777 */
7878 @ Test
7979 public void testHardwareVersionEnumStaticAccess () {
80- for (HardwareVersionEnum hardwareVersionEnum :hardwareVersionValues )
80+ for (HardwareVersionEnum hardwareVersionEnum :hardwareVersionValues ) {
81+ // Do not check deprecated entry.
82+ if (hardwareVersionEnum == HardwareVersionEnum .CELLULAR )
83+ continue ;
8184 assertEquals (hardwareVersionEnum , HardwareVersionEnum .get (hardwareVersionEnum .getValue ()));
85+ }
8286 }
8387}
You can’t perform that action at this time.
0 commit comments