Skip to content

Commit fdc0182

Browse files
committed
Updated documentation for version 2.1.0 with "response parsing" section.
1 parent fcc36de commit fdc0182

1 file changed

Lines changed: 26 additions & 2 deletions

File tree

docs/source/index.rst

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,7 @@ asynchonous notification of received data is needed::
102102

103103
When asychonous mode is enabled, the provided callback method
104104
is called by a background thread managed by the xbee package.
105-
Any/all thread safety considerations may apply when employing
106-
this functionality to modify external state.
105+
Make sure that updates to external state are thread-safe.
107106

108107
Note that a background thread is automatically started
109108
to handle receiving and processing incoming data from an
@@ -157,6 +156,31 @@ sample dictionary will always follow this pattern::
157156
The number of dio and adc values returned depends upon the type and
158157
configuration of the XBee device used with this library.
159158

159+
Response Parsing
160+
~~~~~~~~~~~~~~~~
161+
162+
*As of version 2.1.0*
163+
164+
For XBee devices, sample data within I/O sample messages is automatically
165+
parsed into the above format. In addition, when an "IS", Force Sample,
166+
AT command is issued, either to a local device or a remote device, the
167+
value of the "parameter" field in the response will be automatically
168+
parsed as I/O sample data.
169+
170+
ZigBee devices extend this behavior to include automatic parsing of
171+
"ND", Node Discover, AT command responses. The parameter field of a
172+
ND AT response will assume the following format::
173+
174+
{"source_addr": two bytes,
175+
"source_addr_long": eight bytes,
176+
"node_identifier": string,
177+
"parent_address": two bytes,
178+
"device_type": one byte,
179+
"status": one byte,
180+
"profile_id": two bytes,
181+
"manufacturer": two bytes,
182+
}
183+
160184
Sending Data to an XBee Device
161185
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
162186

0 commit comments

Comments
 (0)