001/** 002 * Copyright 2017, Digi International Inc. 003 * 004 * This Source Code Form is subject to the terms of the Mozilla Public 005 * License, v. 2.0. If a copy of the MPL was not distributed with this 006 * file, you can obtain one at http://mozilla.org/MPL/2.0/. 007 * 008 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 009 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 010 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 011 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 012 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 013 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 014 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 015 */ 016package com.digi.xbee.api.models; 017 018/** 019 * This class lists all the possible options that can be set while 020 * transmitting an XBee data packet. 021 * 022 * <p>The transmit options are usually set as a bitfield meaning that the 023 * options can be combined using the '|' operand.</p> 024 */ 025public class XBeeTransmitOptions { 026 027 /** 028 * No special transmit options (value: {@value}). 029 */ 030 public static final int NONE = 0x00; 031 032 /** 033 * Disables acknowledgments on all unicasts (value: {@value}). 034 * 035 * <p>Only valid for DigiMesh, 802.15.4 and Point-to-multipoint 036 * protocols.</p> 037 */ 038 public static final int DISABLE_ACK = 0x01; 039 040 /** 041 * Disables the retries and router repair in the frame (value: {@value}). 042 * 043 * <p>Only valid for ZigBee protocol.</p> 044 */ 045 public static final int DISABLE_RETRIES_AND_REPAIR = 0x01; 046 047 /** 048 * Doesn't attempt Route Discovery (value: {@value}). 049 * 050 * <p>Disables Route Discovery on all DigiMesh unicasts.</p> 051 * 052 * <p>Only valid for DigiMesh protocol.</p> 053 */ 054 public static final int DONT_ATTEMPT_RD = 0x02; 055 056 /** 057 * Sends packet with broadcast {@code PAN ID}. Packet will be sent to all 058 * devices in the same channel ignoring the {@code PAN ID} 059 * (value: {@value}). 060 * 061 * <p>It cannot be combined with other options.</p> 062 * 063 * <p>Only valid for 802.15.4 XBee protocol.</p> 064 */ 065 public static final int USE_BROADCAST_PAN_ID = 0x04; 066 067 /** 068 * Enables unicast NACK messages (value: {@value}). 069 * 070 * <p>NACK message is enabled on the packet.</p> 071 * 072 * <p>Only valid for DigiMesh 868/900 protocol.</p> 073 */ 074 public static final int ENABLE_UNICAST_NACK = 0x04; 075 076 /** 077 * Enables unicast trace route messages (value: {@value}). 078 * 079 * <p>Trace route is enabled on the packets.</p> 080 * 081 * <p>Only valid for DigiMesh 868/900 protocol.</p> 082 */ 083 public static final int ENABLE_UNICAST_TRACE_ROUTE = 0x04; 084 085 /** 086 * Enables multicast transmission request (value: {@value}). 087 * 088 * <p>Only valid for ZigBee XBee protocol.</p> 089 */ 090 public static final int ENABLE_MULTICAST = 0x08; 091 092 /** 093 * Enables APS encryption, only if {@code EE=1} (value: {@value}). 094 * 095 * <p>Enabling APS encryption decreases the maximum number of RF payload 096 * bytes by 4 (below the value reported by {@code NP}).</p> 097 * 098 * <p>Only valid for ZigBee XBee protocol.</p> 099 */ 100 public static final int ENABLE_APS_ENCRYPTION = 0x20; 101 102 /** 103 * Uses the extended transmission timeout (value: {@value}). 104 * 105 * <p>Setting the extended timeout bit causes the stack to set the 106 * extended transmission timeout for the destination address.</p> 107 * 108 * <p>Only valid for ZigBee XBee protocol.</p> 109 */ 110 public static final int USE_EXTENDED_TIMEOUT = 0x40; 111 112 /** 113 * Transmission is performed using point-to-Multipoint mode 114 * (value: {@value}). 115 * 116 * <p>Only valid for DigiMesh 868/900 and Point-to-Multipoint 868/900 117 * protocols.</p> 118 */ 119 public static final int POINT_MULTIPOINT_MODE = 0x40; 120 121 /** 122 * Transmission is performed using repeater mode (value: {@value}). 123 * 124 * <p>Only valid for DigiMesh 868/900 and Point-to-Multipoint 868/900 125 * protocols.</p> 126 */ 127 public static final int REPEATER_MODE = 0x80; 128 129 /** 130 * Transmission is performed using DigiMesh mode (value: {@value}). 131 * 132 * <p>Only valid for DigiMesh 868/900 and Point-to-Multipoint 868/900 133 * protocols.</p> 134 */ 135 public static final int DIGIMESH_MODE = 0xC0; 136}