digi.xbee.models.status module

class digi.xbee.models.status.ATCommandStatus(value)[source]

Bases: enum.Enum

This class lists all the possible states of an AT command after executing it.

Inherited properties:
name (String): the name (id) of the ATCommandStatus.
value (String): the value of the ATCommandStatus.
Values:
ATCommandStatus.OK = (0, ‘Status OK’)
ATCommandStatus.ERROR = (1, ‘Status Error’)
ATCommandStatus.INVALID_COMMAND = (2, ‘Invalid command’)
ATCommandStatus.INVALID_PARAMETER = (3, ‘Invalid parameter’)
ATCommandStatus.TX_FAILURE = (4, ‘TX failure’)
ATCommandStatus.UNKNOWN = (255, ‘Unknown status’)

classmethod get(code)[source]

Returns the AT command status for the given code.

Parameters

code (Integer) – the code of the AT command status to get.

Returns

the AT command status with the given code.

Return type

ATCommandStatus

property code

Integer. The AT command status code.

property description

String. The AT command status description.

class digi.xbee.models.status.DiscoveryStatus(value)[source]

Bases: enum.Enum

This class lists all the possible states of the discovery process.

Inherited properties:
name (String): The name of the DiscoveryStatus.
value (Integer): The ID of the DiscoveryStatus.
Values:
DiscoveryStatus.NO_DISCOVERY_OVERHEAD = (0, ‘No discovery overhead’)
DiscoveryStatus.ADDRESS_DISCOVERY = (1, ‘Address discovery’)
DiscoveryStatus.ROUTE_DISCOVERY = (2, ‘Route discovery’)
DiscoveryStatus.ADDRESS_AND_ROUTE = (3, ‘Address and route’)
DiscoveryStatus.EXTENDED_TIMEOUT_DISCOVERY = (64, ‘Extended timeout discovery’)
DiscoveryStatus.UNKNOWN = (255, ‘Unknown’)

classmethod get(code)[source]

Returns the discovery status for the given code.

Parameters

code (Integer) – the code of the discovery status to get.

Returns

the discovery status with the given code.

Return type

DiscoveryStatus

property code

Integer. The discovery status code.

property description

String. The discovery status description.

class digi.xbee.models.status.TransmitStatus(value)[source]

Bases: enum.Enum

This class represents all available transmit status.

Inherited properties:
name (String): the name (id) of ths TransmitStatus.
value (String): the value of ths TransmitStatus.
Values:
TransmitStatus.SUCCESS = (0, ‘Success.’)
TransmitStatus.NO_ACK = (1, ‘No acknowledgement received.’)
TransmitStatus.CCA_FAILURE = (2, ‘CCA failure.’)
TransmitStatus.PURGED = (3, ‘Transmission purged, it was attempted before stack was up.’)
TransmitStatus.WIFI_PHYSICAL_ERROR = (4, ‘Physical error occurred on the interface with the WiFi transceiver.’)
TransmitStatus.INVALID_DESTINATION = (21, ‘Invalid destination endpoint.’)
TransmitStatus.NO_BUFFERS = (24, ‘No buffers.’)
TransmitStatus.NETWORK_ACK_FAILURE = (33, ‘Network ACK Failure.’)
TransmitStatus.NOT_JOINED_NETWORK = (34, ‘Not joined to network.’)
TransmitStatus.SELF_ADDRESSED = (35, ‘Self-addressed.’)
TransmitStatus.ADDRESS_NOT_FOUND = (36, ‘Address not found.’)
TransmitStatus.ROUTE_NOT_FOUND = (37, ‘Route not found.’)
TransmitStatus.BROADCAST_FAILED = (38, ‘Broadcast source failed to hear a neighbor relay the message.’)
TransmitStatus.INVALID_BINDING_TABLE_INDEX = (43, ‘Invalid binding table index.’)
TransmitStatus.INVALID_ENDPOINT = (44, ‘Invalid endpoint’)
TransmitStatus.BROADCAST_ERROR_APS = (45, ‘Attempted broadcast with APS transmission.’)
TransmitStatus.BROADCAST_ERROR_APS_EE0 = (46, ‘Attempted broadcast with APS transmission, but EE=0.’)
TransmitStatus.SOFTWARE_ERROR = (49, ‘A software error occurred.’)
TransmitStatus.RESOURCE_ERROR = (50, ‘Resource error lack of free buffers, timers, etc.’)
TransmitStatus.PAYLOAD_TOO_LARGE = (116, ‘Data payload too large.’)
TransmitStatus.INDIRECT_MESSAGE_UNREQUESTED = (117, ‘Indirect message unrequested’)
TransmitStatus.SOCKET_CREATION_FAILED = (118, ‘Attempt to create a client socket failed.’)
TransmitStatus.IP_PORT_NOT_EXIST = (119, “TCP connection to given IP address and port doesn’t exist. Source port is non-zero so that a new connection is not attempted.”)
TransmitStatus.UDP_SRC_PORT_NOT_MATCH_LISTENING_PORT = (120, “Source port on a UDP transmission doesn’t match a listening port on the transmitting module.”)
TransmitStatus.TCP_SRC_PORT_NOT_MATCH_LISTENING_PORT = (121, “Source port on a TCP transmission doesn’t match a listening port on the transmitting module.”)
TransmitStatus.INVALID_IP_ADDRESS = (122, ‘Destination IPv4 address is not valid.’)
TransmitStatus.INVALID_IP_PROTOCOL = (123, ‘Protocol on an IPv4 transmission is not valid.’)
TransmitStatus.RELAY_INTERFACE_INVALID = (124, “Destination interface on a User Data Relay Frame doesn’t exist.”)
TransmitStatus.RELAY_INTERFACE_REJECTED = (125, ‘Destination interface on a User Data Relay Frame exists, but the interface is not accepting data.’)
TransmitStatus.SOCKET_CONNECTION_REFUSED = (128, ‘Destination server refused the connection.’)
TransmitStatus.SOCKET_CONNECTION_LOST = (129, ‘The existing connection was lost before the data was sent.’)
TransmitStatus.SOCKET_ERROR_NO_SERVER = (130, ‘The attempted connection timed out.’)
TransmitStatus.SOCKET_ERROR_CLOSED = (131, ‘The existing connection was closed.’)
TransmitStatus.SOCKET_ERROR_UNKNOWN_SERVER = (132, ‘The server could not be found.’)
TransmitStatus.SOCKET_ERROR_UNKNOWN_ERROR = (133, ‘An unknown error occurred.’)
TransmitStatus.INVALID_TLS_CONFIGURATION = (134, “TLS Profile on a 0x23 API request doesn’t exist, or one or more certificates is not valid.”)
TransmitStatus.KEY_NOT_AUTHORIZED = (187, ‘Key not authorized.’)
TransmitStatus.UNKNOWN = (255, ‘Unknown.’)

classmethod get(code)[source]

Returns the transmit status for the given code.

Parameters

code (Integer) – the code of the transmit status to get.

Returns

the transmit status with the given code.

Return type

TransmitStatus

property code

Integer. The transmit status code.

property description

String. The transmit status description.

class digi.xbee.models.status.ModemStatus(value)[source]

Bases: enum.Enum

Enumerates the different modem status events. This enumeration list is intended to be used within the ModemStatusPacket packet.

Values:
ModemStatus.HARDWARE_RESET = (0, ‘Device was reset’)
ModemStatus.WATCHDOG_TIMER_RESET = (1, ‘Watchdog timer was reset’)
ModemStatus.JOINED_NETWORK = (2, ‘Device joined to network’)
ModemStatus.DISASSOCIATED = (3, ‘Device disassociated’)
ModemStatus.ERROR_SYNCHRONIZATION_LOST = (4, ‘Configuration error/synchronization lost’)
ModemStatus.COORDINATOR_REALIGNMENT = (5, ‘Coordinator realignment’)
ModemStatus.COORDINATOR_STARTED = (6, ‘The coordinator started’)
ModemStatus.NETWORK_SECURITY_KEY_UPDATED = (7, ‘Network security key was updated’)
ModemStatus.NETWORK_WOKE_UP = (11, ‘Network Woke Up’)
ModemStatus.NETWORK_WENT_TO_SLEEP = (12, ‘Network Went To Sleep’)
ModemStatus.VOLTAGE_SUPPLY_LIMIT_EXCEEDED = (13, ‘Voltage supply limit exceeded’)
ModemStatus.REMOTE_MANAGER_CONNECTED = (14, ‘Remote Manager connected’)
ModemStatus.REMOTE_MANAGER_DISCONNECTED = (15, ‘Remote Manager disconnected’)
ModemStatus.MODEM_CONFIG_CHANGED_WHILE_JOINING = (17, ‘Modem configuration changed while joining’)
ModemStatus.BLUETOOTH_CONNECTED = (50, ‘A Bluetooth connection has been made and API mode has been unlocked.’)
ModemStatus.BLUETOOTH_DISCONNECTED = (51, ‘An unlocked Bluetooth connection has been disconnected.’)
ModemStatus.BANDMASK_CONFIGURATION_ERROR = (52, ‘LTE-M/NB-IoT bandmask configuration has failed.’)
ModemStatus.ERROR_STACK = (128, ‘Stack error’)
ModemStatus.ERROR_AP_NOT_CONNECTED = (130, ‘Send/join command issued without connecting from AP’)
ModemStatus.ERROR_AP_NOT_FOUND = (131, ‘Access point not found’)
ModemStatus.ERROR_PSK_NOT_CONFIGURED = (132, ‘PSK not configured’)
ModemStatus.ERROR_SSID_NOT_FOUND = (135, ‘SSID not found’)
ModemStatus.ERROR_FAILED_JOIN_SECURITY = (136, ‘Failed to join with security enabled’)
ModemStatus.ERROR_INVALID_CHANNEL = (138, ‘Invalid channel’)
ModemStatus.ERROR_FAILED_JOIN_AP = (142, ‘Failed to join access point’)
ModemStatus.UNKNOWN = (255, ‘UNKNOWN’)

classmethod get(code)[source]

Returns the modem status for the given code.

Parameters

code (Integer) – the code of the modem status to get.

Returns

the ModemStatus with the given code.

Return type

ModemStatus

property code

Integer. The modem status code.

property description

String. The modem status description.

class digi.xbee.models.status.PowerLevel(value)[source]

Bases: enum.Enum

Enumerates the different power levels. The power level indicates the output power value of a radio when transmitting data.

Values:
PowerLevel.LEVEL_LOWEST = (0, ‘Lowest’)
PowerLevel.LEVEL_LOW = (1, ‘Low’)
PowerLevel.LEVEL_MEDIUM = (2, ‘Medium’)
PowerLevel.LEVEL_HIGH = (3, ‘High’)
PowerLevel.LEVEL_HIGHEST = (4, ‘Highest’)
PowerLevel.LEVEL_UNKNOWN = (255, ‘Unknown’)

classmethod get(code)[source]

Returns the power level for the given code.

Parameters

code (Integer) – the code of the power level to get.

Returns

the PowerLevel with the given code.

Return type

PowerLevel

property code

Integer. The power level code.

property description

String. The power level description.

class digi.xbee.models.status.AssociationIndicationStatus(value)[source]

Bases: enum.Enum

Enumerates the different association indication statuses.

Values:
AssociationIndicationStatus.SUCCESSFULLY_JOINED = (0, ‘Successfully formed or joined a network.’)
AssociationIndicationStatus.AS_TIMEOUT = (1, ‘Active Scan Timeout.’)
AssociationIndicationStatus.AS_NO_PANS_FOUND = (2, ‘Active Scan found no PANs.’)
AssociationIndicationStatus.AS_ASSOCIATION_NOT_ALLOWED = (3, ‘Active Scan found PAN, but the CoordinatorAllowAssociation bit is not set.’)
AssociationIndicationStatus.AS_BEACONS_NOT_SUPPORTED = (4, ‘Active Scan found PAN, but Coordinator and End Device are not configured to support beacons.’)
AssociationIndicationStatus.AS_ID_DOESNT_MATCH = (5, ‘Active Scan found PAN, but the Coordinator ID parameter does not match the ID parameter of the End Device.’)
AssociationIndicationStatus.AS_CHANNEL_DOESNT_MATCH = (6, ‘Active Scan found PAN, but the Coordinator CH parameter does not match the CH parameter of the End Device.’)
AssociationIndicationStatus.ENERGY_SCAN_TIMEOUT = (7, ‘Energy Scan Timeout.’)
AssociationIndicationStatus.COORDINATOR_START_REQUEST_FAILED = (8, ‘Coordinator start request failed.’)
AssociationIndicationStatus.COORDINATOR_INVALID_PARAMETER = (9, ‘Coordinator could not start due to invalid parameter.’)
AssociationIndicationStatus.COORDINATOR_REALIGNMENT = (10, ‘Coordinator Realignment is in progress.’)
AssociationIndicationStatus.AR_NOT_SENT = (11, ‘Association Request not sent.’)
AssociationIndicationStatus.AR_TIMED_OUT = (12, ‘Association Request timed out - no reply was received.’)
AssociationIndicationStatus.AR_INVALID_PARAMETER = (13, ‘Association Request had an Invalid Parameter.’)
AssociationIndicationStatus.AR_CHANNEL_ACCESS_FAILURE = (14, ‘Association Request Channel Access Failure. Request was not transmitted - CCA failure.’)
AssociationIndicationStatus.AR_COORDINATOR_ACK_WASNT_RECEIVED = (15, ‘Remote Coordinator did not send an ACK after Association Request was sent.’)
AssociationIndicationStatus.AR_COORDINATOR_DIDNT_REPLY = (16, ‘Remote Coordinator did not reply to the Association Request, but an ACK was received after sending the request.’)
AssociationIndicationStatus.SYNCHRONIZATION_LOST = (18, ‘Sync-Loss - Lost synchronization with a Beaconing Coordinator.’)
AssociationIndicationStatus.DISASSOCIATED = (19, ‘ Disassociated - No longer associated to Coordinator.’)
AssociationIndicationStatus.NO_PANS_FOUND = (33, ‘Scan found no PANs.’)
AssociationIndicationStatus.NO_PANS_WITH_ID_FOUND = (34, ‘Scan found no valid PANs based on current SC and ID settings.’)
AssociationIndicationStatus.NJ_EXPIRED = (35, ‘Valid Coordinator or Routers found, but they are not allowing joining (NJ expired).’)
AssociationIndicationStatus.NO_JOINABLE_BEACONS_FOUND = (36, ‘No joinable beacons were found.’)
AssociationIndicationStatus.UNEXPECTED_STATE = (37, ‘Unexpected state, node should not be attempting to join at this time.’)
AssociationIndicationStatus.JOIN_FAILED = (39, ‘Node Joining attempt failed (typically due to incompatible security settings).’)
AssociationIndicationStatus.COORDINATOR_START_FAILED = (42, ‘Coordinator Start attempt failed.’)
AssociationIndicationStatus.CHECKING_FOR_COORDINATOR = (43, ‘Checking for an existing coordinator.’)
AssociationIndicationStatus.NETWORK_LEAVE_FAILED = (44, ‘Attempt to leave the network failed.’)
AssociationIndicationStatus.DEVICE_DIDNT_RESPOND = (171, ‘Attempted to join a device that did not respond.’)
AssociationIndicationStatus.UNSECURED_KEY_RECEIVED = (172, ‘Secure join error - network security key received unsecured.’)
AssociationIndicationStatus.KEY_NOT_RECEIVED = (173, ‘Secure join error - network security key not received.’)
AssociationIndicationStatus.INVALID_SECURITY_KEY = (175, ‘Secure join error - joining device does not have the right preconfigured link key.’)
AssociationIndicationStatus.SCANNING_NETWORK = (255, ‘Scanning for a network/Attempting to associate.’)

classmethod get(code)[source]

Returns the AssociationIndicationStatus for the given code.

Parameters

code (Integer) – the code of the AssociationIndicationStatus to get.

Returns

the AssociationIndicationStatus with the given code.

Return type

AssociationIndicationStatus

property code

Integer. The association indication status code.

property description

String. The association indication status description.

class digi.xbee.models.status.CellularAssociationIndicationStatus(value)[source]

Bases: enum.Enum

Enumerates the different association indication statuses for the Cellular protocol.

Values:
CellularAssociationIndicationStatus.SUCCESSFULLY_CONNECTED = (0, ‘Connected to the Internet.’)
CellularAssociationIndicationStatus.REGISTERING_CELLULAR_NETWORK = (34, ‘Registering to cellular network’)
CellularAssociationIndicationStatus.CONNECTING_INTERNET = (35, ‘Connecting to the Internet’)
CellularAssociationIndicationStatus.MODEM_FIRMWARE_CORRUPT = (36, ‘The cellular component requires a new firmware image.’)
CellularAssociationIndicationStatus.REGISTRATION_DENIED = (37, ‘Cellular network registration was denied.’)
CellularAssociationIndicationStatus.AIRPLANE_MODE = (42, ‘Airplane mode is active.’)
CellularAssociationIndicationStatus.USB_DIRECT = (43, ‘USB Direct mode is active.’)
CellularAssociationIndicationStatus.PSM_LOW_POWER = (44, ‘The cellular component is in the PSM low-power state.’)
CellularAssociationIndicationStatus.BYPASS_MODE = (47, ‘Bypass mode active’)
CellularAssociationIndicationStatus.INITIALIZING = (255, ‘Initializing’)

classmethod get(code)[source]

Returns the CellularAssociationIndicationStatus for the given code.

Parameters

code (Integer) – the code of the CellularAssociationIndicationStatus to get.

Returns

the CellularAssociationIndicationStatus

with the given code.

Return type

CellularAssociationIndicationStatus

property code

Integer. The cellular association indication status code.

property description

String. The cellular association indication status description.

class digi.xbee.models.status.DeviceCloudStatus(value)[source]

Bases: enum.Enum

Enumerates the different Device Cloud statuses.

Values:
DeviceCloudStatus.SUCCESS = (0, ‘Success’)
DeviceCloudStatus.BAD_REQUEST = (1, ‘Bad request’)
DeviceCloudStatus.RESPONSE_UNAVAILABLE = (2, ‘Response unavailable’)
DeviceCloudStatus.DEVICE_CLOUD_ERROR = (3, ‘Device Cloud error’)
DeviceCloudStatus.CANCELED = (32, ‘Device Request canceled by user’)
DeviceCloudStatus.TIME_OUT = (33, ‘Session timed out’)
DeviceCloudStatus.UNKNOWN_ERROR = (64, ‘Unknown error’)

classmethod get(code)[source]

Returns the Device Cloud status for the given code.

Parameters

code (Integer) – the code of the Device Cloud status to get.

Returns

the DeviceCloudStatus with the given code, None if there is not any

status with the provided code.

Return type

DeviceCloudStatus

property code

Integer. The Device Cloud status code.

property description

String. The Device Cloud status description.

class digi.xbee.models.status.FrameError(value)[source]

Bases: enum.Enum

Enumerates the different frame errors.

Values:
FrameError.INVALID_TYPE = (2, ‘Invalid frame type’)
FrameError.INVALID_LENGTH = (3, ‘Invalid frame length’)
FrameError.INVALID_CHECKSUM = (4, ‘Erroneous checksum on last frame’)
FrameError.PAYLOAD_TOO_BIG = (5, ‘Payload of last API frame was too big to fit into a buffer’)
FrameError.STRING_ENTRY_TOO_BIG = (6, ‘String entry was too big on last API frame sent’)
FrameError.WRONG_STATE = (7, ‘Wrong state to receive frame’)
FrameError.WRONG_REQUEST_ID = (8, “Device request ID of device response didn’t match the number in the request”)

classmethod get(code)[source]

Returns the frame error for the given code.

Parameters

code (Integer) – the code of the frame error to get.

Returns

the FrameError with the given code, None if there is not any frame error

with the provided code.

Return type

FrameError

property code

Integer. The frame error code.

property description

String. The frame error description.

class digi.xbee.models.status.WiFiAssociationIndicationStatus(value)[source]

Bases: enum.Enum

Enumerates the different Wi-Fi association indication statuses.

Values:
WiFiAssociationIndicationStatus.SUCCESSFULLY_JOINED = (0, ‘Successfully joined to access point.’)
WiFiAssociationIndicationStatus.INITIALIZING = (1, ‘Initialization in progress.’)
WiFiAssociationIndicationStatus.INITIALIZED = (2, ‘Initialized, but not yet scanning.’)
WiFiAssociationIndicationStatus.DISCONNECTING = (19, ‘Disconnecting from access point.’)
WiFiAssociationIndicationStatus.SSID_NOT_CONFIGURED = (35, ‘SSID not configured’)
WiFiAssociationIndicationStatus.INVALID_KEY = (36, ‘Encryption key invalid (NULL or invalid length).’)
WiFiAssociationIndicationStatus.JOIN_FAILED = (39, ‘SSID found, but join failed.’)
WiFiAssociationIndicationStatus.WAITING_FOR_AUTH = (64, ‘Waiting for WPA or WPA2 authentication.’)
WiFiAssociationIndicationStatus.WAITING_FOR_IP = (65, ‘Joined to a network and waiting for IP address.’)
WiFiAssociationIndicationStatus.SETTING_UP_SOCKETS = (66, ‘Joined to a network and IP configured. Setting up listening sockets.’)
WiFiAssociationIndicationStatus.SCANNING_FOR_SSID = (255, ‘Scanning for the configured SSID.’)

classmethod get(code)[source]

Returns the Wi-Fi association indication status for the given code.

Parameters

code (Integer) – the code of the Wi-Fi association indication status to get.

Returns

the WiFiAssociationIndicationStatus with the given code,

None if there is not any Wi-Fi association indication status with the provided code.

Return type

WiFiAssociationIndicationStatus

property code

Integer. The Wi-Fi association indication status code.

property description

String. The Wi-Fi association indication status description.

class digi.xbee.models.status.NetworkDiscoveryStatus(value)[source]

Bases: enum.Enum

Enumerates the different statuses of the network discovery process.

Values:
NetworkDiscoveryStatus.SUCCESS = (0, ‘Success’)
NetworkDiscoveryStatus.ERROR_READ_TIMEOUT = (1, ‘Read timeout error’)
NetworkDiscoveryStatus.ERROR_NET_DISCOVER = (2, ‘Error executing network discovery’)

classmethod get(code)[source]

Returns the network discovery status for the given code.

Parameters

code (Integer) – the code of the network discovery status to get.

Returns

the NetworkDiscoveryStatus with the given code, None if

there is not any status with the provided code.

Return type

NetworkDiscoveryStatus

property code

Integer. The network discovery status code.

property description

String. The network discovery status description.

class digi.xbee.models.status.ZigbeeRegisterStatus(value)[source]

Bases: enum.Enum

Enumerates the different statuses of the Zigbee Device Register process.

Values:
ZigbeeRegisterStatus.SUCCESS = (0, ‘Success’)
ZigbeeRegisterStatus.KEY_TOO_LONG = (1, ‘Key too long’)
ZigbeeRegisterStatus.ADDRESS_NOT_FOUND = (177, ‘Address not found in the key table’)
ZigbeeRegisterStatus.INVALID_KEY = (178, ‘Key is invalid (00 and FF are reserved)’)
ZigbeeRegisterStatus.INVALID_ADDRESS = (179, ‘Invalid address’)
ZigbeeRegisterStatus.KEY_TABLE_FULL = (180, ‘Key table is full’)
ZigbeeRegisterStatus.KEY_NOT_FOUND = (255, ‘Key not found’)
ZigbeeRegisterStatus.UNKNOWN = (238, ‘Unknown’)

classmethod get(code)[source]

Returns the Zigbee Device Register status for the given code.

Parameters

code (Integer) – the code of the Zigbee Device Register status to get.

Returns

the ZigbeeRegisterStatus with the given code,

ZigbeeRegisterStatus.UNKNOWN if there is not any status with the provided code.

Return type

ZigbeeRegisterStatus

property code

Integer. The Zigbee Device Register status code.

property description

String. The Zigbee Device Register status description.

class digi.xbee.models.status.SocketStatus(value)[source]

Bases: enum.Enum

Enumerates the different Socket statuses.

Values:
SocketStatus.SUCCESS = (0, ‘Operation successful’)
SocketStatus.INVALID_PARAM = (1, ‘Invalid parameters’)
SocketStatus.FAILED_TO_READ = (2, ‘Failed to retrieve option value’)
SocketStatus.CONNECTION_IN_PROGRESS = (3, ‘Connection already in progress’)
SocketStatus.ALREADY_CONNECTED = (4, ‘Already connected/bound/listening’)
SocketStatus.UNKNOWN_ERROR = (5, ‘Unknown error’)
SocketStatus.BAD_SOCKET = (32, ‘Bad socket ID’)
SocketStatus.NOT_REGISTERED = (34, ‘Not registered to cell network’)
SocketStatus.INTERNAL_ERROR = (49, ‘Internal error’)
SocketStatus.RESOURCE_ERROR = (50, ‘Resource error: retry the operation later’)
SocketStatus.INVALID_PROTOCOL = (123, ‘Invalid protocol’)
SocketStatus.UNKNOWN = (255, ‘Unknown’)

classmethod get(code)[source]

Returns the Socket status for the given code.

Parameters

code (Integer) – the code of the Socket status to get.

Returns

the SocketStatus with the given code,

SocketStatus.UNKNOWN if there is not any status with the provided code.

Return type

SocketStatus

property code

Integer. The Socket status code.

property description

String. The Socket status description.

class digi.xbee.models.status.SocketState(value)[source]

Bases: enum.Enum

Enumerates the different Socket states.

Values:
SocketState.CONNECTED = (0, ‘Connected’)
SocketState.FAILED_DNS = (1, ‘Failed DNS lookup’)
SocketState.CONNECTION_REFUSED = (2, ‘Connection refused’)
SocketState.TRANSPORT_CLOSED = (3, ‘Transport closed’)
SocketState.TIMED_OUT = (4, ‘Timed out’)
SocketState.INTERNAL_ERROR = (5, ‘Internal error’)
SocketState.HOST_UNREACHABLE = (6, ‘Host unreachable’)
SocketState.CONNECTION_LOST = (7, ‘Connection lost’)
SocketState.UNKNOWN_ERROR = (8, ‘Unknown error’)
SocketState.UNKNOWN_SERVER = (9, ‘Unknown server’)
SocketState.RESOURCE_ERROR = (10, ‘Resource error’)
SocketState.LISTENER_CLOSED = (11, ‘Listener closed’)
SocketState.UNKNOWN = (255, ‘Unknown’)

classmethod get(code)[source]

Returns the Socket state for the given code.

Parameters

code (Integer) – the code of the Socket state to get.

Returns

the SocketState with the given code,

SocketState.UNKNOWN if there is not any status with the provided code.

Return type

SocketState

property code

Integer. The Socket state code.

property description

String. The Socket state description.

class digi.xbee.models.status.SocketInfoState(value)[source]

Bases: enum.Enum

Enumerates the different Socket info states.

Values:
SocketInfoState.ALLOCATED = (0, ‘Allocated’)
SocketInfoState.CONNECTING = (1, ‘Connecting’)
SocketInfoState.CONNECTED = (2, ‘Connected’)
SocketInfoState.LISTENING = (3, ‘Listening’)
SocketInfoState.BOUND = (4, ‘Bound’)
SocketInfoState.CLOSING = (5, ‘Closing’)
SocketInfoState.UNKNOWN = (255, ‘Unknown’)

classmethod get(code)[source]

Returns the Socket info state for the given code.

Parameters

code (Integer) – the code of the Socket info state to get.

Returns

the SocketInfoState with the given code,

SocketInfoState.UNKNOWN if there is not any state with the provided code.

Return type

SocketInfoState

classmethod get_by_description(description)[source]

Returns the Socket info state for the given description.

Parameters

description (String) – the description of the Socket info state to get.

Returns

the SocketInfoState with the given description,

SocketInfoState.UNKNOWN if there is not any state with the provided description.

Return type

SocketInfoState

property code

Integer. The Socket info state code.

property description

String. The Socket info state description.