Skip to content

Commit 6030ddf

Browse files
committed
cellular: add new Transmit Status codes
https://jira.digi.com/browse/XBJAPI-292 Signed-off-by: Ruben Moral <[email protected]>
1 parent 185c673 commit 6030ddf

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

library/src/main/java/com/digi/xbee/api/models/XBeeTransmitStatus.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,18 @@ public enum XBeeTransmitStatus {
4747
INDIRECT_MESSAGE_UNREQUESTED (0x75, "Indirect message unrequested"),
4848
SOCKET_CREATION_FAILED (0x76, "Attempt to create a client socket failed"),
4949
IP_PORT_NOT_EXIST (0x77, "TCP connection to given IP address and port doesn't exist. Source port is non-zero so that a new connection is not attempted"),
50+
/** @deprecated Use {@link #INVALID_UDP_PORT} instead. */
5051
UDP_SRC_PORT_NOT_MATCH_LISTENING_PORT (0x78, "Source port on a UDP transmission doesn't match a listening port on the transmitting module."),
52+
INVALID_UDP_PORT(0x78, "Invalid UDP port"),
53+
INVALID_TCP_PORT(0x79, "Invalid TCP port"),
54+
INVALID_HOST(0x7A, "Invalid host"),
55+
INVALID_DATA_MODE(0x7B, "Invalid data mode"),
56+
CONNECTION_REFUSED(0x80, "Connection refused"),
57+
CONNECTION_LOST(0x81, "Connection lost"),
58+
NO_SERVER(0x82, "No server"),
59+
SOCKET_CLOSED(0x83, "Socket closed"),
60+
UNKNOWN_SERVER(0x84, "Unknown server"),
61+
UNKNOWN_ERROR(0x85, "Unknown error"),
5162
KEY_NOT_AUTHORIZED (0xBB, "Key not authorized"),
5263
UNKNOWN (255, "Unknown");
5364

library/src/test/java/com/digi/xbee/api/models/XBeeTransmitStatusTest.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,11 @@ public void testXBeeTransmitStatusDescriptions() {
136136
*/
137137
@Test
138138
public void testXBeeTransmitStatusStaticAccess() {
139-
for (XBeeTransmitStatus status: transmitStatusValues)
139+
for (XBeeTransmitStatus status: transmitStatusValues) {
140+
// Do not check deprecated entry.
141+
if (status == XBeeTransmitStatus.UDP_SRC_PORT_NOT_MATCH_LISTENING_PORT)
142+
continue;
140143
assertEquals(status, XBeeTransmitStatus.get(status.getId()));
144+
}
141145
}
142146
}

0 commit comments

Comments
 (0)