digi.xbee.models.mode module

class digi.xbee.models.mode.OperatingMode(value)[source]

Bases: enum.Enum

This class represents all operating modes available.

Inherited properties:
name (String): the name (id) of this OperatingMode.
value (String): the value of this OperatingMode.
Values:
OperatingMode.AT_MODE = (0, ‘AT mode’)
OperatingMode.API_MODE = (1, ‘API mode’)
OperatingMode.ESCAPED_API_MODE = (2, ‘API mode with escaped characters’)
OperatingMode.MICROPYTHON_MODE = (4, ‘MicroPython REPL’)
OperatingMode.BYPASS_MODE = (5, ‘Bypass mode’)
OperatingMode.UNKNOWN = (99, ‘Unknown’)

classmethod get(code)[source]

Returns the OperatingMode for the given code.

Parameters

code (Integer) – the code corresponding to the operating mode to get.

Returns

the OperatingMode with the given code.

Return type

OperatingMode

property code

Integer. The operating mode code.

property description

String: The operating mode description.

class digi.xbee.models.mode.APIOutputMode(value)[source]

Bases: enum.Enum

Enumerates the different API output modes. The API output mode establishes the way data will be output through the serial interface of an XBee device.

Inherited properties:
name (String): the name (id) of this OperatingMode.
value (String): the value of this OperatingMode.
Values:
APIOutputMode.NATIVE = (0, ‘Native’)
APIOutputMode.EXPLICIT = (1, ‘Explicit’)
APIOutputMode.EXPLICIT_ZDO_PASSTHRU = (3, ‘Explicit with ZDO Passthru’)

classmethod get(code)[source]

Returns the APIOutputMode for the given code.

Parameters

code (Integer) – the code corresponding to the API output mode to get.

Returns

the APIOutputMode with the given code, None if there is not an

APIOutputMode with that code.

Return type

OperatingMode

property code

Integer. The API output mode code.

property description

String: The API output mode description.

class digi.xbee.models.mode.APIOutputModeBit(value)[source]

Bases: enum.Enum

Enumerates the different API output mode bit options. The API output mode establishes the way data will be output through the serial interface of an XBee.

Inherited properties:
name (String): the name (id) of this APIOutputModeBit.
value (String): the value of this APIOutputModeBit.
Values:
APIOutputModeBit.EXPLICIT = (1, ‘Output in Native/Explicit API format’)
APIOutputModeBit.UNSUPPORTED_ZDO_PASSTHRU = (2, ‘Unsupported ZDO request pass-through’)
APIOutputModeBit.SUPPORTED_ZDO_PASSTHRU = (4, ‘Supported ZDO request pass-through’)
APIOutputModeBit.BINDING_PASSTHRU = (8, ‘Binding request pass-through’)

classmethod get(code)[source]

Returns the APIOutputModeBit for the given code.

Parameters

code (Integer) – the code corresponding to the API output mode to get.

Returns

the APIOutputModeBit with the given code, None

if there is not an APIOutputModeBit with that code.

Return type

OperatingMode

classmethod calculate_api_output_mode_value(protocol, options)[source]

Calculates the total value of a combination of several option bits for the given protocol.

Parameters
  • protocol (digi.xbee.models.protocol.XBeeProtocol) – The XBeeProtocol to calculate the value of all the given API output options.

  • options – Collection of option bits to get the final value.

Returns

The value to be configured in the module depending on the given

collection of option bits and the protocol.

Return type

Integer

property code

Integer. The API output mode bit code.

property description

String: The API output mode bit description.

class digi.xbee.models.mode.IPAddressingMode(value)[source]

Bases: enum.Enum

Enumerates the different IP addressing modes.

Values:
IPAddressingMode.DHCP = (0, ‘DHCP’)
IPAddressingMode.STATIC = (1, ‘Static’)

classmethod get(code)[source]

Returns the IPAddressingMode for the given code.

Parameters

code (Integer) – the code corresponding to the IP addressing mode to get.

Returns

the IPAddressingMode with the given code, None if there is not an

IPAddressingMode with that code.

Return type

IPAddressingMode

property code

Integer. The IP addressing mode code.

property description

String. The IP addressing mode description.