1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <?xml-stylesheet type="text/xsl" href="helma.xsl"?>
3 <xmlroot xmlns:hop="http://www.helma.org/docs/guide/features/database">
4 <hopobject id="2478" name="getPlatform" prototype="Page" created="1366432084314" lastModified="1366435289078">
5 <hop:parent idref="2471" prototyperef="Page"/>
6 <is_xhtml type="boolean">true</is_xhtml>
7 <http_remotehost>127.0.0.1</http_remotehost>
8 <http_language>en-US,en;q=0.8</http_language>
10 <http_browser>Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.65 Safari/537.31</http_browser>
11 <time type="date">20.04.2013 00:21:29 CDT</time>
12 <hopsession>127.0.0.198.47.16.6rtsmlet7d0o</hopsession>
13 <body><script src="/static/bonescript-demo.js"></script>
\r
15 <!-- side menu -->
\r
16 <h2>Bonescript</h2>
\r
17 <div id='side-menu' class="t3_sidebar">
\r
18 <ul class="left-menu">
\r
19 <strong>Navigation</strong>
\r
20 <li><a href="/static/side-menu.html">Menu contents</a></li>
\r
24 <!-- content -->
\r
25 <div class="t3_content_1">
\r
26 <div id='connect-status'></div>
\r
27 <div id="content_child">
\r
29 <h1>getPlatform([callback])</h1>
\r
30 <h2>Arguments</h2>
\r
32 <li><em>callback</em>: called upon completion</li>
\r
34 <h2>Return value</h2>
\r
36 <li><em>name</em>: name of the board</li>
\r
37 <li><em>serialNumber</em>: serial number of the board</li>
\r
38 <li><em>version</em>: revision of the board</li>
\r
39 <li><em>bonescript</em>: verison of bonescript</li>
\r
41 <h2>callback(x)</h2>
\r
43 <li><em>x</em>: same as the return value.</li>
\r
46 <button class="dynlink" onclick="demoRun('code')">run</button>
\r
47 <button class="dynlink" onclick="demoRestore('code')">restore</button>
\r
49 <pre id="code" class="use-editor" style="height:150px;">
\r
50 var b = require('bonescript');
\r
51 b.getPlatform(printData);
\r
52 function printData(x) {
\r
53 console.log('name = ' + x.name);
\r
54 console.log('version = ' + x.version);
\r
55 console.log('serialNumber = ' + x.serialNumber);
\r
56 console.log('bonescript = ' + x.bonescript);
\r
58 <pre id='console-output' style='height:120px;'></pre>
\r
59 <h2>Build and execute instructions</h2>
\r
61 <li>Plug the board in or point to it on the network</li>
\r
62 <li>Click the run button above</li>
\r
67 <div style="clear: both;"></div></body>
68 <pseudoparent idref="2471" prototyperef="Page"/>
69 <http_referer>http://beagleboard.org/support/BoneScript/getPlatform/edit</http_referer>
70 <http_host>beagleboard.org</http_host>
72 <user>blog.hangerhead.com</user>