digi.xbee.models.options module¶
-
class
digi.xbee.models.options.ReceiveOptions(value)[source]¶ Bases:
enum.EnumThis 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(value)[source]¶ Bases:
enum.EnumThis 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(value)[source]¶ Bases:
enum.EnumThis 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(value)[source]¶ Bases:
enum.EnumEnumerates the different options for the
SendDataRequestPacket.Values:SendDataRequestOptions.OVERWRITE = (0, ‘Overwrite’)SendDataRequestOptions.ARCHIVE = (1, ‘Archive’)SendDataRequestOptions.APPEND = (2, ‘Append’)SendDataRequestOptions.TRANSIENT = (3, ‘Transient data (do not store)’)-
property
code¶ Returns the code of the SendDataRequestOptions element.
- Returns
the code of the SendDataRequestOptions element.
- Return type
Integer
-
property
description¶ Returns the description of the SendDataRequestOptions element.
- Returns
the description of the SendDataRequestOptions element.
- Return type
String
-
property
-
class
digi.xbee.models.options.DiscoveryOptions(value)[source]¶ Bases:
enum.EnumEnumerates 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)
-
property
code¶ Returns the code of the DiscoveryOptions element.
- Returns
the code of the DiscoveryOptions element.
- Return type
Integer
-
property
description¶ Returns the description of the DiscoveryOptions element.
- Returns
the description of the DiscoveryOptions element.
- Return type
String
-
classmethod
get(code)[source]¶ Returns the DiscoveryOptions for the given code.
- Parameters
code (Integer) – the code of the DiscoveryOptions to get.
- Returns
- the DiscoveryOptions with the given code,
None if not found.
- Return type
-
static
calculate_discovery_value(protocol, options)[source]¶ Calculates the total value of a combination of several options for the given protocol.
- Parameters
protocol (
XBeeProtocol) – the XBeeProtocol to calculate the value of all the given discovery options.options – collection of options to get the final value.
- Returns
- The value to be configured in the module depending on the
given collection of options and the protocol.
- Return type
Integer
-
-
class
digi.xbee.models.options.XBeeLocalInterface(value)[source]¶ Bases:
enum.EnumEnumerates the different interfaces for the
UserDataRelayPacketandUserDataRelayOutputPacket.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’)-
property
code¶ Returns the code of the XBeeLocalInterface element.
- Returns
the code of the XBeeLocalInterface element.
- Return type
Integer
-
property
description¶ Returns the description of the XBeeLocalInterface element.
- Returns
the description of the XBeeLocalInterface element.
- Return type
String
-
property
-
class
digi.xbee.models.options.RegisterKeyOptions(value)[source]¶ Bases:
enum.EnumThis 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’)-
property
code¶ Returns the code of the RegisterKeyOptions element.
- Returns
the code of the RegisterKeyOptions element.
- Return type
Integer
-
property
description¶ Returns the description of the RegisterKeyOptions element.
- Returns
the description of the RegisterKeyOptions element.
- Return type
String
-
property
-
class
digi.xbee.models.options.SocketOption(value)[source]¶ Bases:
enum.EnumEnumerates the different Socket Options.
Values:SocketOption.TLS_PROFILE = (0, ‘TLS Profile’)SocketOption.UNKNOWN = (255, ‘Unknown’)-
property
code¶ Returns the code of the SocketOption element.
- Returns
the code of the SocketOption element.
- Return type
Integer
-
property
description¶ Returns the description of the SocketOption element.
- Returns
the description of the SocketOption element.
- Return type
String
-
property
-
class
digi.xbee.models.options.FileOpenRequestOption(value)[source]¶ Bases:
enum.IntFlagThis 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(value)[source]¶ Bases:
enum.IntFlagThis 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.
-