digi.xbee.models.options module¶
-
class
digi.xbee.models.options.
ReceiveOptions
[source]¶ Bases:
enum.Enum
This class lists all the possible options that have been set while receiving an XBee packet.
The receive options are usually set as a bitfield meaning that the options can be combined using the ‘|’ operand.
Values:ReceiveOptions.NONE = 0ReceiveOptions.PACKET_ACKNOWLEDGED = 1ReceiveOptions.BROADCAST_PACKET = 2ReceiveOptions.BROADCAST_PANS_PACKET = 4ReceiveOptions.SECURE_SESSION_ENC = 16ReceiveOptions.APS_ENCRYPTED = 32ReceiveOptions.SENT_FROM_END_DEVICE = 64ReceiveOptions.REPEATER_MODE = 128ReceiveOptions.DIGIMESH_MODE = 192-
NONE
= 0¶ No special receive options.
-
PACKET_ACKNOWLEDGED
= 1¶ Packet was acknowledged.
Not valid for WiFi protocol.
-
BROADCAST_PACKET
= 2¶ Packet was sent as a broadcast.
Not valid for WiFi protocol.
-
BROADCAST_PANS_PACKET
= 4¶ Packet was broadcast accros all PANs.
Only for 802.15.4 protocol.
-
SECURE_SESSION_ENC
= 16¶ Packet sent across a Secure Session.
Only for XBee 3.
-
APS_ENCRYPTED
= 32¶ Packet encrypted with APS encryption.
Only valid for Zigbee protocol.
-
SENT_FROM_END_DEVICE
= 64¶ Packet was sent from an end device (if known).
Only valid for Zigbee protocol.
-
POINT_MULTIPOINT_MODE
= 64¶ Transmission is performed using point-to-Multipoint mode.
Only valid for DigiMesh 868/900 and Point-to-Multipoint 868/900 protocols.
-
REPEATER_MODE
= 128¶ Transmission is performed using repeater mode.
Only valid for DigiMesh 868/900 and Point-to-Multipoint 868/900 protocols.
-
DIGIMESH_MODE
= 192¶ Transmission is performed using DigiMesh mode.
Only valid for DigiMesh 868/900 and Point-to-Multipoint 868/900 protocols.
-
-
class
digi.xbee.models.options.
TransmitOptions
[source]¶ Bases:
enum.Enum
This class lists all the possible options that can be set while transmitting an XBee packet.
The transmit options are usually set as a bitfield meaning that the options can be combined using the ‘|’ operand.
Not all options are available for all cases, that’s why there are different names with same values. In each moment, you must be sure that the option your are going to use, is a valid option in your context.
Values:TransmitOptions.NONE = 0TransmitOptions.DISABLE_ACK = 1TransmitOptions.DONT_ATTEMPT_RD = 2TransmitOptions.USE_BROADCAST_PAN_ID = 4TransmitOptions.ENABLE_MULTICAST = 8TransmitOptions.SECURE_SESSION_ENC = 16TransmitOptions.ENABLE_APS_ENCRYPTION = 32TransmitOptions.USE_EXTENDED_TIMEOUT = 64TransmitOptions.REPEATER_MODE = 128TransmitOptions.DIGIMESH_MODE = 192-
NONE
= 0¶ No special transmit options.
-
DISABLE_ACK
= 1¶ Disables acknowledgments on all unicasts.
Only valid for Zigbee, DigiMesh, 802.15.4, and Point-to-multipoint protocols.
-
DISABLE_RETRIES_AND_REPAIR
= 1¶ Disables the retries and router repair in the frame.
Only valid for Zigbee protocol.
-
DONT_ATTEMPT_RD
= 2¶ Doesn’t attempt Route Discovery.
Disables Route Discovery on all DigiMesh unicasts.
Only valid for DigiMesh protocol.
-
BROADCAST_PAN
= 2¶ Sends packet with broadcast {@code PAN ID}. Packet will be sent to all PANs.
Only valid for 802.15.4 XBee 3 protocol.
-
USE_BROADCAST_PAN_ID
= 4¶ Sends packet with broadcast {@code PAN ID}. Packet will be sent to all devices in the same channel ignoring the {@code PAN ID}.
It cannot be combined with other options.
Only valid for 802.15.4 XBee protocol.
-
ENABLE_UNICAST_NACK
= 4¶ Enables unicast NACK messages.
NACK message is enabled on the packet.
Only valid for DigiMesh 868/900 protocol, and XBee 3 DigiMesh.
-
ENABLE_UNICAST_TRACE_ROUTE
= 4¶ Enables unicast trace route messages.
Trace route is enabled on the packets.
Only valid for DigiMesh 868/900 protocol.
-
INDIRECT_TRANSMISSION
= 4¶ Used for binding transmissions.
Only valid for Zigbee protocol.
-
ENABLE_MULTICAST
= 8¶ Enables multicast transmission request.
Only valid for Zigbee XBee protocol.
-
ENABLE_TRACE_ROUTE
= 8¶ Enable a unicast Trace Route on DigiMesh transmissions When set, the transmission will generate a Route Information - 0x8D frame.
Only valid for DigiMesh XBee protocol.
-
SECURE_SESSION_ENC
= 16¶ Encrypt payload for transmission across a Secure Session. Reduces maximum payload size by 4 bytes.
Only for XBee 3.
-
ENABLE_APS_ENCRYPTION
= 32¶ Enables APS encryption, only if {@code EE=1}.
Enabling APS encryption decreases the maximum number of RF payload bytes by 4 (below the value reported by {@code NP}).
Only valid for Zigbee XBee protocol.
-
USE_EXTENDED_TIMEOUT
= 64¶ Uses the extended transmission timeout.
Setting the extended timeout bit causes the stack to set the extended transmission timeout for the destination address.
Only valid for Zigbee XBee protocol.
-
POINT_MULTIPOINT_MODE
= 64¶ Transmission is performed using point-to-Multipoint mode.
Only valid for DigiMesh 868/900 and Point-to-Multipoint 868/900 protocols.
-
REPEATER_MODE
= 128¶ Transmission is performed using repeater mode.
Only valid for DigiMesh 868/900 and Point-to-Multipoint 868/900 protocols.
-
DIGIMESH_MODE
= 192¶ Transmission is performed using DigiMesh mode.
Only valid for DigiMesh 868/900 and Point-to-Multipoint 868/900 protocols.
-
-
class
digi.xbee.models.options.
RemoteATCmdOptions
[source]¶ Bases:
enum.Enum
This class lists all the possible options that can be set while transmitting a remote AT Command.
These options are usually set as a bitfield meaning that the options can be combined using the ‘|’ operand.
Values:RemoteATCmdOptions.NONE = 0RemoteATCmdOptions.DISABLE_ACK = 1RemoteATCmdOptions.APPLY_CHANGES = 2RemoteATCmdOptions.SECURE_SESSION_ENC = 16RemoteATCmdOptions.EXTENDED_TIMEOUT = 64-
NONE
= 0¶ No special transmit options
-
DISABLE_ACK
= 1¶ Disables ACK
-
APPLY_CHANGES
= 2¶ Applies changes in the remote device.
If this option is not set, AC command must be sent before changes will take effect.
-
SECURE_SESSION_ENC
= 16¶ Send the remote command securely. Requires a Secure Session be established with the destination.
Only for XBee 3.
-
EXTENDED_TIMEOUT
= 64¶ Uses the extended transmission timeout.
Setting the extended timeout bit causes the stack to set the extended transmission timeout for the destination address.
Only valid for ZigBee XBee protocol.
-
-
class
digi.xbee.models.options.
SendDataRequestOptions
(code, description)[source]¶ Bases:
enum.Enum
Enumerates the different options for theSendDataRequestPacket
.Values:SendDataRequestOptions.OVERWRITE = (0, ‘Overwrite’)SendDataRequestOptions.ARCHIVE = (1, ‘Archive’)SendDataRequestOptions.APPEND = (2, ‘Append’)SendDataRequestOptions.TRANSIENT = (3, ‘Transient data (do not store)’)-
code
¶ Returns the code of the SendDataRequestOptions element.
Returns: the code of the SendDataRequestOptions element. Return type: Integer
-
description
¶ Returns the description of the SendDataRequestOptions element.
Returns: the description of the SendDataRequestOptions element. Return type: String
-
-
class
digi.xbee.models.options.
DiscoveryOptions
(code, description)[source]¶ Bases:
enum.Enum
Enumerates the different options used in the discovery process.Values:DiscoveryOptions.APPEND_DD = (1, ‘Append device type identifier (DD)’)DiscoveryOptions.DISCOVER_MYSELF = (2, ‘Local device sends response frame’)DiscoveryOptions.APPEND_RSSI = (4, ‘Append RSSI (of the last hop)’)-
APPEND_DD
= (1, 'Append device type identifier (DD)')¶ Append device type identifier (DD) to the discovery response.
- Valid for the following protocols:
- DigiMesh
- Point-to-multipoint (Digi Point)
- Zigbee
-
DISCOVER_MYSELF
= (2, 'Local device sends response frame')¶ Local device sends response frame when discovery is issued.
- Valid for the following protocols:
- DigiMesh
- Point-to-multipoint (Digi Point)
- Zigbee
- 802.15.4
-
APPEND_RSSI
= (4, 'Append RSSI (of the last hop)')¶ Append RSSI of the last hop to the discovery response.
- Valid for the following protocols:
- DigiMesh
- Point-to-multipoint (Digi Point)
-
code
¶ Returns the code of the DiscoveryOptions element.
Returns: the code of the DiscoveryOptions element. Return type: Integer
-
description
¶ Returns the description of the DiscoveryOptions element.
Returns: the description of the DiscoveryOptions element. Return type: String
-
-
class
digi.xbee.models.options.
XBeeLocalInterface
(code, description)[source]¶ Bases:
enum.Enum
Enumerates the different interfaces for the
UserDataRelayPacket
andUserDataRelayOutputPacket
.Inherited properties:name (String): the name (id) of the XBee local interface.value (String): the value of the XBee local interface.Values:XBeeLocalInterface.SERIAL = (0, ‘Serial port (UART when in API mode, or SPI interface)’)XBeeLocalInterface.BLUETOOTH = (1, ‘BLE API interface (on XBee devices which support BLE)’)XBeeLocalInterface.MICROPYTHON = (2, ‘MicroPython’)XBeeLocalInterface.UNKNOWN = (255, ‘Unknown interface’)-
code
¶ Returns the code of the XBeeLocalInterface element.
Returns: the code of the XBeeLocalInterface element. Return type: Integer
-
description
¶ Returns the description of the XBeeLocalInterface element.
Returns: the description of the XBeeLocalInterface element. Return type: String
-
-
class
digi.xbee.models.options.
RegisterKeyOptions
(code, description)[source]¶ Bases:
enum.Enum
This class lists all the possible options that have been set while receiving an XBee packet.
The receive options are usually set as a bitfield meaning that the options can be combined using the ‘|’ operand.
Values:RegisterKeyOptions.LINK_KEY = (0, ‘Key is a Link Key (KY on joining node)’)RegisterKeyOptions.INSTALL_CODE = (1, ‘Key is an Install Code (I? on joining node,DC must be set to 1 on joiner)’)RegisterKeyOptions.UNKNOWN = (255, ‘Unknown key option’)-
code
¶ Returns the code of the RegisterKeyOptions element.
Returns: the code of the RegisterKeyOptions element. Return type: Integer
-
description
¶ Returns the description of the RegisterKeyOptions element.
Returns: the description of the RegisterKeyOptions element. Return type: String
-
-
class
digi.xbee.models.options.
SocketOption
(code, description)[source]¶ Bases:
enum.Enum
Enumerates the different Socket Options.Values:SocketOption.TLS_PROFILE = (0, ‘TLS Profile’)SocketOption.UNKNOWN = (255, ‘Unknown’)-
code
¶ Returns the code of the SocketOption element.
Returns: the code of the SocketOption element. Return type: Integer
-
description
¶ Returns the description of the SocketOption element.
Returns: the description of the SocketOption element. Return type: String
-
-
class
digi.xbee.models.options.
FileOpenRequestOption
[source]¶ Bases:
enum.IntFlag
This enumeration lists all the available options for FSCmdType.FILE_OPEN command requests.
Inherited properties:name (String): Name (id) of this FileOpenRequestOption.value (String): Value of this FileOpenRequestOption.Values:FileOpenRequestOption.CREATE = 1FileOpenRequestOption.EXCLUSIVE = 2FileOpenRequestOption.READ = 4FileOpenRequestOption.WRITE = 8FileOpenRequestOption.TRUNCATE = 16FileOpenRequestOption.APPEND = 32FileOpenRequestOption.SECURE = 128-
CREATE
= 1¶ Create if file does not exist.
-
EXCLUSIVE
= 2¶ Error out if file exists.
-
READ
= 4¶ Open file for reading.
-
WRITE
= 8¶ Open file for writing.
-
TRUNCATE
= 16¶ Truncate file to 0 bytes.
-
APPEND
= 32¶ Append to end of file.
-
SECURE
= 128¶ Create a secure write-only file.
-
-
class
digi.xbee.models.options.
DirResponseFlag
[source]¶ Bases:
enum.IntFlag
This enumeration lists all the available flags for FSCmdType.DIR_OPEN and FSCmdType.DIR_READ command responses.
Inherited properties:name (String): Name (id) of this DirResponseFlag.value (String): Value of this DirResponseFlag.Values:DirResponseFlag.IS_DIR = 128DirResponseFlag.IS_SECURE = 64DirResponseFlag.IS_LAST = 1-
IS_DIR
= 128¶ Entry is a directory.
-
IS_SECURE
= 64¶ Entry is stored securely.
-
IS_LAST
= 1¶ Entry is the last.
-