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