Base class for all XBee responses
The XBeeResponse is a wrapper around the underlying raw API frame.
Parameters: | frame (bytearray) – unescaped raw API frame |
---|
API ID
Subclasses must implement this and return the corresponding API ID
Unescaped raw API frame
Length, on 2 bytes starting right after the FRAME_DELIMITER of the frame
Response to a Tx64Request
Frame example: 7E 00 10 80 00 13 A2 00 40 52 2B AA 16 03 F1 2E AA BD C9 FB
RSSI, immediatly following the source_address
Response to a Tx16Request
Frame example: 7E 00 0A 81 52 1A 23 01 12 33 85 A1 F2 91’
RSSI, immediatly following the source_address
IO sample response using 64-bits addressing
Frame example: 7E 00 14 82 00 13 A2 00 40 52 2B AA 23 01 02 14 88 00 80 00 8F 03 ED 00 08 02 4C 00 0C 3E
RSSI, immediatly following the source_address
Analog mask, immediatly following the sample_count
It is the whole byte of which first and last bit are set to 0 because useless in this context. Second bit (right to left) tells if analog channel 0 (A0) is enabled (bit to 1) or disabled (bit to 0), third bit is for A1 and so on until seventh bit which is for A5
Digital mask, on 2 bytes including the analog_mask byte
It is the whole first byte (right to left) and the second one of which all bits except the first one are set to 0 because useless in this context. First bit (right to left) tells if digital channel 0 (D0) is enabled (bit to 1) or disabled (bit to 0), second bit is for D1 and so on until ninth bit which is for D8
True if at least one analog channel is enabled, False otherwise
True if at least one digital channel is enabled, False otherwise
Tells if a given analog pin is enabled or not
Parameters: | pin (int) – analog pin number |
---|---|
Returns: | True if the given analog pin is enabled, False otherwise |
Return type: | boolean |
Tells if a given digital pin is enabled or not
Parameters: | pin (int) – digital pin number |
---|---|
Returns: | True if the given digital pin is enabled, False otherwise |
Return type: | boolean |
Tells if a given digital pin is on or not in a sample
Parameters: |
|
---|---|
Returns: | True if the given digital pin is on in the sample, False otherwise |
Return type: | boolean |
Gives the analog value of a pin in a sample
Parameters: |
|
---|---|
Returns: | analog pin value |
Return type: | int |
IO sample response using 16-bits addressing
Frame example: 7E 00 14 83 7D 84 23 01 02 14 88 00 80 00 8F 03 ED 00 08 02 4C 00 0C 58
RSSI, immediatly following the source_address
Analog mask, immediatly following the sample_count
It is the whole byte of which first and last bit are set to 0 because useless in this context. Second bit (right to left) tells if analog channel 0 (A0) is enabled (bit to 1) or disabled (bit to 0), third bit is for A1 and so on until seventh bit which is for A5
Digital mask, on 2 bytes including the analog_mask byte
It is the whole first byte (right to left) and the second one of which all bits except the first one are set to 0 because useless in this context. First bit (right to left) tells if digital channel 0 (D0) is enabled (bit to 1) or disabled (bit to 0), second bit is for D1 and so on until ninth bit which is for D8
True if at least one analog channel is enabled, False otherwise
True if at least one digital channel is enabled, False otherwise
Tells if a given analog pin is enabled or not
Parameters: | pin (int) – analog pin number |
---|---|
Returns: | True if the given analog pin is enabled, False otherwise |
Return type: | boolean |
Tells if a given digital pin is enabled or not
Parameters: | pin (int) – digital pin number |
---|---|
Returns: | True if the given digital pin is enabled, False otherwise |
Return type: | boolean |
Tells if a given digital pin is on or not in a sample
Parameters: |
|
---|---|
Returns: | True if the given digital pin is on in the sample, False otherwise |
Return type: | boolean |
Gives the analog value of a pin in a sample
Parameters: |
|
---|---|
Returns: | analog pin value |
Return type: | int |
Response to a AtRequest
Frame example: 7E 00 07 88 52 4D 59 00 00 00 7F
Status response emitted by the module after a Tx64Request or a Tx16Request
Frame example: 7E 00 03 89 2A 74 D8
Modem status response
Frame example: 7E 00 02 8A 06 6F
Status response emitted by the module after a ZBTxRequest or a ZBExplicitTxRequest
Frame example: 7E 00 07 8B 01 7D 84 00 00 01 71
Retry count, immediately following the destination_address
Delivery status, immediately following the retry_count
Discovery status, immediately following the delivery_status
Response to a ZBTxRequest
Frame example: 7E 00 12 90 00 13 A2 00 40 52 2B AA 7D 84 01 52 78 44 61 74 61 0D
16-bits source address, on 2 bytes immediately following the source_address_64
Options, immediately following the source_address_16
Response to a ZBExplicitTxRequest
Frame example: 7E 00 18 91 00 13 A2 00 40 52 2B AA 7D 84 E0 E0 22 11 C1 05 02 52 78 44 61 74 61 52
16-bits source address, on 2 bytes immediately following the source_address_64
Source endpoint, immediately following the source_address_16
Destination endpoint, immediately following the source_endpoint
Cluster id, on 2 bytes immediately following the destination_endpoint
Profile id, on 2 bytes immediately following the cluster_id
Options, immediately following the profile_id
IO sample response
Frame example: 7E 00 14 92 00 13 A2 00 40 52 2B AA 7D 84 01 01 00 1C 02 00 14 02 25 F5
16-bits source address, on 2 bytes immediately following the source_address_64
Options, immediately following the source_address_16
Digital mask, on 2 bytes, immediately following the sample_count
Analog mask, immediately following the digital_mask
True if at least one digital channel is enabled, False otherwise
True if at least one analog channel is enabled, False otherwise
Tells if a given digital pin is enabled or not
Parameters: | pin (int) – digital pin number |
---|---|
Returns: | True if the given digital pin is enabled, False otherwise |
Return type: | boolean |
Tells if a given analog pin is enabled or not
Parameters: | pin (int) – analog pin number |
---|---|
Returns: | True if the given analog pin is enabled, False otherwise |
Return type: | boolean |
Tells if a given digital pin is on or not
Parameters: | pin (int) – digital pin number |
---|---|
Returns: | True if the given digital pin is on, False otherwise |
Return type: | boolean |
Gives the analog value of a pin
Parameters: | pin (int) – analog pin number |
---|---|
Returns: | analog pin value |
Return type: | int |
Response to a RemoteAtRequest
Frame example: 7E 00 13 97 55 00 13 A2 00 40 52 2B AA 7D 84 53 4C 00 40 52 2B AA F0
16-bits source address, on 2 bytes immediately following the source_address_64
Command, on two bytes immediately following the source_address_16
Mapping from Response API IDs to XBeeResponse