001/**
002 * Copyright (c) 2014 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 APS encryption, only if {@code EE=1} (value: {@value}).
083         * 
084         * <p>Enabling APS encryption decreases the maximum number of RF payload 
085         * bytes by 4 (below the value reported by {@code NP}).</p>
086         * 
087         * <p>Only valid for ZigBee XBee protocol.</p>
088         */
089        public static final int ENABLE_APS_ENCRYPTION = 0x20;
090        
091        /**
092         * Uses the extended transmission timeout (value: {@value}).
093         * 
094         * <p>Setting the extended timeout bit causes the stack to set the 
095         * extended transmission timeout for the destination address.</p>
096         * 
097         * <p>Only valid for ZigBee XBee protocol.</p>
098         */
099        public static final int USE_EXTENDED_TIMEOUT = 0x40;
100        
101        /**
102         * Transmission is performed using point-to-Multipoint mode 
103         * (value: {@value}).
104         * 
105         * <p>Only valid for DigiMesh 868/900 and Point-to-Multipoint 868/900 
106         * protocols.</p>
107         */
108        public static final int POINT_MULTIPOINT_MODE = 0x40;
109        
110        /**
111         * Transmission is performed using repeater mode (value: {@value}).
112         * 
113         * <p>Only valid for DigiMesh 868/900 and Point-to-Multipoint 868/900 
114         * protocols.</p>
115         */
116        public static final int REPEATER_MODE = 0x80;
117        
118        /**
119         * Transmission is performed using DigiMesh mode (value: {@value}).
120         * 
121         * <p>Only valid for DigiMesh 868/900 and Point-to-Multipoint 868/900 
122         * protocols.</p>
123         */
124        public static final int DIGIMESH_MODE = 0xC0;
125}