2626import com .digi .xbee .api .exceptions .XBeeDeviceException ;
2727import com .digi .xbee .api .exceptions .XBeeException ;
2828import com .digi .xbee .api .models .AssociationIndicationStatus ;
29+ import com .digi .xbee .api .models .CoAPURI ;
2930import com .digi .xbee .api .models .HTTPMethodEnum ;
3031import com .digi .xbee .api .models .IPProtocol ;
3132import com .digi .xbee .api .models .RemoteATCommandOptions ;
@@ -346,13 +347,13 @@ protected AssociationIndicationStatus getAssociationIndicationStatus()
346347 * valid URI string and must meet the following criteria. There
347348 * are built-in CoAP URIs:
348349 * <ul>
349- * <li><b>CoAPTxRequestPacket .URI_DATA_TRANSMISSION:</b> "XB/TX"
350+ * <li><b>CoAPURI .URI_DATA_TRANSMISSION:</b> "XB/TX"
350351 * for data transmissions (HTTP method must be set to PUT)</li>
351- * <li><b>CoAPTxRequestPacket .URI_AT_COMMAND:</b> "XB/AT" for
352+ * <li><b>CoAPURI .URI_AT_COMMAND:</b> "XB/AT" for
352353 * AT Command operation (HTTP method must be set to PUT or GET).
353354 * After the URI, an AT command needs to be specified, for example:
354- * CoAPTxRequestPacket .URI_AT_COMMAND + "/NI"</li>
355- * <li><b>CoAPTxRequestPacket .URI_IO_SAMPLING:</b> "XB/IO" for
355+ * CoAPURI .URI_AT_COMMAND + "/NI"</li>
356+ * <li><b>CoAPURI .URI_IO_SAMPLING:</b> "XB/IO" for
356357 * IO operation (HTTP method must be set to POST)</li>
357358 * </ul>
358359 * @param method HTTP method used for the transmission.
@@ -379,7 +380,7 @@ protected AssociationIndicationStatus getAssociationIndicationStatus()
379380 */
380381 public byte [] sendCoAPData (Inet6Address ipv6Address , String uri ,
381382 HTTPMethodEnum method , byte [] data ) throws TimeoutException , IllegalArgumentException , XBeeException {
382- boolean applyChanges = uri .startsWith (CoAPTxRequestPacket .URI_AT_COMMAND );
383+ boolean applyChanges = uri .startsWith (CoAPURI .URI_AT_COMMAND );
383384 return sendCoAPData (ipv6Address , uri , method , applyChanges , data , false );
384385 }
385386
@@ -402,13 +403,13 @@ public byte[] sendCoAPData(Inet6Address ipv6Address, String uri,
402403 * valid URI string and must meet the following criteria. There
403404 * are built-in CoAP URIs:
404405 * <ul>
405- * <li><b>CoAPTxRequestPacket .URI_DATA_TRANSMISSION:</b> "XB/TX"
406+ * <li><b>CoAPURI .URI_DATA_TRANSMISSION:</b> "XB/TX"
406407 * for data transmissions (HTTP method must be set to PUT)</li>
407- * <li><b>CoAPTxRequestPacket .URI_AT_COMMAND:</b> "XB/AT" for
408+ * <li><b>CoAPURI .URI_AT_COMMAND:</b> "XB/AT" for
408409 * AT Command operation (HTTP method must be set to PUT or GET).
409410 * After the URI, an AT command needs to be specified, for example:
410- * CoAPTxRequestPacket .URI_AT_COMMAND + "/NI"</li>
411- * <li><b>CoAPTxRequestPacket .URI_IO_SAMPLING:</b> "XB/IO" for
411+ * CoAPURI .URI_AT_COMMAND + "/NI"</li>
412+ * <li><b>CoAPURI .URI_IO_SAMPLING:</b> "XB/IO" for
412413 * IO operation (HTTP method must be set to POST)</li>
413414 * </ul>
414415 * @param method HTTP method used for the transmission.
@@ -455,13 +456,13 @@ public byte[] sendCoAPData(Inet6Address ipv6Address, String uri, HTTPMethodEnum
455456 * valid URI string and must meet the following criteria. There
456457 * are built-in CoAP URIs:
457458 * <ul>
458- * <li><b>CoAPTxRequestPacket .URI_DATA_TRANSMISSION:</b> "XB/TX"
459+ * <li><b>CoAPURI .URI_DATA_TRANSMISSION:</b> "XB/TX"
459460 * for data transmissions (PUT)</li>
460- * <li><b>CoAPTxRequestPacket .URI_AT_COMMAND:</b> "XB/AT" for
461+ * <li><b>CoAPURI .URI_AT_COMMAND:</b> "XB/AT" for
461462 * AT Command operation (PUT or GET). After the URI, an AT command
462463 * needs to be specified, for example:
463- * CoAPTxRequestPacket .URI_AT_COMMAND + "/NI"</li>
464- * <li><b>CoAPTxRequestPacket .URI_IO_SAMPLING:</b> "XB/IO" for
464+ * CoAPURI .URI_AT_COMMAND + "/NI"</li>
465+ * <li><b>CoAPURI .URI_IO_SAMPLING:</b> "XB/IO" for
465466 * IO operation (POST)</li>
466467 * </ul>
467468 * @param method HTTP method used for the transmission.
@@ -486,7 +487,7 @@ public byte[] sendCoAPData(Inet6Address ipv6Address, String uri, HTTPMethodEnum
486487 */
487488 public void sendCoAPDataAsync (Inet6Address ipv6Address , String uri ,
488489 HTTPMethodEnum method , byte [] data ) throws TimeoutException , IllegalArgumentException , XBeeException {
489- boolean applyChanges = uri .startsWith (CoAPTxRequestPacket .URI_AT_COMMAND );
490+ boolean applyChanges = uri .startsWith (CoAPURI .URI_AT_COMMAND );
490491 sendCoAPData (ipv6Address , uri , method , applyChanges , data , true );
491492 }
492493
@@ -505,13 +506,13 @@ public void sendCoAPDataAsync(Inet6Address ipv6Address, String uri,
505506 * valid URI string and must meet the following criteria. There
506507 * are built-in CoAP URIs:
507508 * <ul>
508- * <li><b>CoAPTxRequestPacket .URI_DATA_TRANSMISSION:</b> "XB/TX"
509+ * <li><b>CoAPURI .URI_DATA_TRANSMISSION:</b> "XB/TX"
509510 * for data transmissions (PUT)</li>
510- * <li><b>CoAPTxRequestPacket .URI_AT_COMMAND:</b> "XB/AT" for
511+ * <li><b>CoAPURI .URI_AT_COMMAND:</b> "XB/AT" for
511512 * AT Command operation (PUT or GET). After the URI, an AT command
512513 * needs to be specified, for example:
513- * CoAPTxRequestPacket .URI_AT_COMMAND + "/NI"</li>
514- * <li><b>CoAPTxRequestPacket .URI_IO_SAMPLING:</b> "XB/IO" for
514+ * CoAPURI .URI_AT_COMMAND + "/NI"</li>
515+ * <li><b>CoAPURI .URI_IO_SAMPLING:</b> "XB/IO" for
515516 * IO operation (POST)</li>
516517 * </ul>
517518 * @param method HTTP method used for the transmission.
@@ -570,13 +571,13 @@ public void sendCoAPDataAsync(Inet6Address ipv6Address, String uri, HTTPMethodEn
570571 * valid URI string and must meet the following criteria. There
571572 * are built-in CoAP URIs:
572573 * <ul>
573- * <li><b>CoAPTxRequestPacket .URI_DATA_TRANSMISSION:</b> "XB/TX"
574+ * <li><b>CoAPURI .URI_DATA_TRANSMISSION:</b> "XB/TX"
574575 * for data transmissions (PUT)</li>
575- * <li><b>CoAPTxRequestPacket .URI_AT_COMMAND:</b> "XB/AT" for
576+ * <li><b>CoAPURI .URI_AT_COMMAND:</b> "XB/AT" for
576577 * AT Command operation (PUT or GET). After the URI, an AT command
577578 * needs to be specified, for example:
578- * CoAPTxRequestPacket .URI_AT_COMMAND + "/NI"</li>
579- * <li><b>CoAPTxRequestPacket .URI_IO_SAMPLING:</b> "XB/IO" for
579+ * CoAPURI .URI_AT_COMMAND + "/NI"</li>
580+ * <li><b>CoAPURI .URI_IO_SAMPLING:</b> "XB/IO" for
580581 * IO operation (POST)</li>
581582 * </ul>
582583 * @param method HTTP method used for the transmission.
@@ -617,8 +618,8 @@ private byte[] sendCoAPData(Inet6Address ipv6Address, String uri, HTTPMethodEnum
617618 throw new NullPointerException ("HTTP method cannot be null" );
618619
619620 // If AT command uri is used but no AT command is specified throw an error.
620- if (uri .startsWith (CoAPTxRequestPacket .URI_AT_COMMAND )
621- && uri .length () < CoAPTxRequestPacket .URI_AT_COMMAND .length () + 3 )
621+ if (uri .startsWith (CoAPURI .URI_AT_COMMAND )
622+ && uri .length () < CoAPURI .URI_AT_COMMAND .length () + 3 )
622623 throw new IllegalArgumentException ("AT command URI must contain an AT command." );
623624
624625 // Check if device is remote.
0 commit comments