xbee:xml
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
xbee:xml [2010/05/23 17:24] – rfile | xbee:xml [2010/05/23 20:41] (current) – rfile | ||
---|---|---|---|
Line 7: | Line 7: | ||
<box 95%> | <box 95%> | ||
- | < | + | |
Re: zb_tcp_serial.py Control Port | Re: zb_tcp_serial.py Control Port | ||
Got it working! Here's the python code that runs on my PC to obtain the Zigbee address to TCP port mapping (I used the list method as the discover output was identical - I presume that if I've discovered new devices through the Web interface, they' | Got it working! Here's the python code that runs on my PC to obtain the Zigbee address to TCP port mapping (I used the list method as the discover output was identical - I presume that if I've discovered new devices through the Web interface, they' | ||
--------- | --------- | ||
+ | < | ||
import xmlrpclib | import xmlrpclib | ||
# | # | ||
Line 47: | Line 48: | ||
</ | </ | ||
</ | </ | ||
+ | |||
+ | controller | ||
+ | <code php> | ||
+ | <?php | ||
+ | |||
+ | class Latlon extends Controller { | ||
+ | | ||
+ | { | ||
+ | parent:: | ||
+ | } | ||
+ | |||
+ | |||
+ | function index() { | ||
+ | $this-> | ||
+ | $posdata[' | ||
+ | |||
+ | $this-> | ||
+ | } | ||
+ | |||
+ | } | ||
+ | |||
+ | </ | ||
+ | |||
+ | model | ||
+ | <code php> | ||
+ | <?php | ||
+ | |||
+ | |||
+ | class Lat_lon extends Model { | ||
+ | |||
+ | function getAll() { | ||
+ | $q = $this-> | ||
+ | |||
+ | if($q-> | ||
+ | foreach ($q-> | ||
+ | $lldata[] = $row; | ||
+ | } | ||
+ | return $lldata ; | ||
+ | } | ||
+ | } | ||
+ | |||
+ | |||
+ | } | ||
+ | |||
+ | |||
+ | </ | ||
+ | view | ||
+ | <code php> | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | <meta http-equiv=" | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | <div id=" | ||
+ | < | ||
+ | |||
+ | <?php | ||
+ | foreach($rows as $r){ | ||
+ | echo "< | ||
+ | echo "< | ||
+ | echo "< | ||
+ | echo "< | ||
+ | } | ||
+ | |||
+ | ?> | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | </ |
xbee/xml.1274653459.txt.gz · Last modified: 2010/05/23 17:24 by rfile