Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <!-- NewPage -->
  3. <html lang="de">
  4. <head>
  5. <!-- Generated by javadoc (1.8.0_181) on Mon Mar 11 17:41:55 CET 2019 -->
  6. <title>gpio_java</title>
  7. <meta name="date" content="2019-03-11">
  8. <link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
  9. <script type="text/javascript" src="script.js"></script>
  10. </head>
  11. <body>
  12. <script type="text/javascript"><!--
  13. try {
  14. if (location.href.indexOf('is-external=true') == -1) {
  15. parent.document.title="gpio_java";
  16. }
  17. }
  18. catch(err) {
  19. }
  20. //-->
  21. var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9};
  22. var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"]};
  23. var altColor = "altColor";
  24. var rowColor = "rowColor";
  25. var tableTab = "tableTab";
  26. var activeTableTab = "activeTableTab";
  27. </script>
  28. <noscript>
  29. <div>JavaScript is disabled on your browser.</div>
  30. </noscript>
  31. <!-- ========= START OF TOP NAVBAR ======= -->
  32. <div class="topNav"><a name="navbar.top">
  33. <!-- -->
  34. </a>
  35. <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
  36. <a name="navbar.top.firstrow">
  37. <!-- -->
  38. </a>
  39. <ul class="navList" title="Navigation">
  40. <li><a href="package-summary.html">Package</a></li>
  41. <li class="navBarCell1Rev">Class</li>
  42. <li><a href="package-tree.html">Tree</a></li>
  43. <li><a href="deprecated-list.html">Deprecated</a></li>
  44. <li><a href="index-all.html">Index</a></li>
  45. <li><a href="help-doc.html">Help</a></li>
  46. </ul>
  47. </div>
  48. <div class="subNav">
  49. <ul class="navList">
  50. <li>Prev&nbsp;Class</li>
  51. <li>Next&nbsp;Class</li>
  52. </ul>
  53. <ul class="navList">
  54. <li><a href="index.html?gpio_java.html" target="_top">Frames</a></li>
  55. <li><a href="gpio_java.html" target="_top">No&nbsp;Frames</a></li>
  56. </ul>
  57. <ul class="navList" id="allclasses_navbar_top">
  58. <li><a href="allclasses-noframe.html">All&nbsp;Classes</a></li>
  59. </ul>
  60. <div>
  61. <script type="text/javascript"><!--
  62. allClassesLink = document.getElementById("allclasses_navbar_top");
  63. if(window==top) {
  64. allClassesLink.style.display = "block";
  65. }
  66. else {
  67. allClassesLink.style.display = "none";
  68. }
  69. //-->
  70. </script>
  71. </div>
  72. <div>
  73. <ul class="subNavList">
  74. <li>Summary:&nbsp;</li>
  75. <li>Nested&nbsp;|&nbsp;</li>
  76. <li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
  77. <li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
  78. <li><a href="#method.summary">Method</a></li>
  79. </ul>
  80. <ul class="subNavList">
  81. <li>Detail:&nbsp;</li>
  82. <li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
  83. <li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
  84. <li><a href="#method.detail">Method</a></li>
  85. </ul>
  86. </div>
  87. <a name="skip.navbar.top">
  88. <!-- -->
  89. </a></div>
  90. <!-- ========= END OF TOP NAVBAR ========= -->
  91. <!-- ======== START OF CLASS DATA ======== -->
  92. <div class="header">
  93. <h2 title="Class gpio_java" class="title">Class gpio_java</h2>
  94. </div>
  95. <div class="contentContainer">
  96. <ul class="inheritance">
  97. <li>java.lang.Object</li>
  98. <li>
  99. <ul class="inheritance">
  100. <li>gpio_java</li>
  101. </ul>
  102. </li>
  103. </ul>
  104. <div class="description">
  105. <ul class="blockList">
  106. <li class="blockList">
  107. <hr>
  108. <br>
  109. <pre>public class <span class="typeNameLabel">gpio_java</span>
  110. extends java.lang.Object</pre>
  111. </li>
  112. </ul>
  113. </div>
  114. <div class="summary">
  115. <ul class="blockList">
  116. <li class="blockList">
  117. <!-- =========== FIELD SUMMARY =========== -->
  118. <ul class="blockList">
  119. <li class="blockList"><a name="field.summary">
  120. <!-- -->
  121. </a>
  122. <h3>Field Summary</h3>
  123. <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
  124. <caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
  125. <tr>
  126. <th class="colFirst" scope="col">Modifier and Type</th>
  127. <th class="colLast" scope="col">Field and Description</th>
  128. </tr>
  129. <tr class="altColor">
  130. <td class="colFirst"><code>static java.lang.String[]</code></td>
  131. <td class="colLast"><code><span class="memberNameLink"><a href="gpio_java.html#action">action</a></span></code>
  132. <div class="block">Array with all allowed actions.</div>
  133. </td>
  134. </tr>
  135. <tr class="rowColor">
  136. <td class="colFirst"><code>static java.lang.String[][]</code></td>
  137. <td class="colLast"><code><span class="memberNameLink"><a href="gpio_java.html#rel_map">rel_map</a></span></code>
  138. <div class="block">Mapping from generic relay name to particular gpio port.</div>
  139. </td>
  140. </tr>
  141. </table>
  142. </li>
  143. </ul>
  144. <!-- ======== CONSTRUCTOR SUMMARY ======== -->
  145. <ul class="blockList">
  146. <li class="blockList"><a name="constructor.summary">
  147. <!-- -->
  148. </a>
  149. <h3>Constructor Summary</h3>
  150. <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
  151. <caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
  152. <tr>
  153. <th class="colOne" scope="col">Constructor and Description</th>
  154. </tr>
  155. <tr class="altColor">
  156. <td class="colOne"><code><span class="memberNameLink"><a href="gpio_java.html#gpio_java--">gpio_java</a></span>()</code>&nbsp;</td>
  157. </tr>
  158. </table>
  159. </li>
  160. </ul>
  161. <!-- ========== METHOD SUMMARY =========== -->
  162. <ul class="blockList">
  163. <li class="blockList"><a name="method.summary">
  164. <!-- -->
  165. </a>
  166. <h3>Method Summary</h3>
  167. <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
  168. <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
  169. <tr>
  170. <th class="colFirst" scope="col">Modifier and Type</th>
  171. <th class="colLast" scope="col">Method and Description</th>
  172. </tr>
  173. <tr id="i0" class="altColor">
  174. <td class="colFirst"><code>static void</code></td>
  175. <td class="colLast"><code><span class="memberNameLink"><a href="gpio_java.html#checkargs-java.lang.String:A-">checkargs</a></span>(java.lang.String[]&nbsp;argumens)</code>
  176. <div class="block">The checkargs method checks whether two correct arguments have been entered.</div>
  177. </td>
  178. </tr>
  179. <tr id="i1" class="rowColor">
  180. <td class="colFirst"><code>static void</code></td>
  181. <td class="colLast"><code><span class="memberNameLink"><a href="gpio_java.html#gpio_cmdhandler-java.lang.String-java.lang.String-">gpio_cmdhandler</a></span>(java.lang.String&nbsp;port,
  182. java.lang.String&nbsp;cmd)</code>
  183. <div class="block">The gpio_cmdhandler method switches the relays on, off or returns the status.</div>
  184. </td>
  185. </tr>
  186. <tr id="i2" class="altColor">
  187. <td class="colFirst"><code>static int</code></td>
  188. <td class="colLast"><code><span class="memberNameLink"><a href="gpio_java.html#gpio_getport-java.lang.String-">gpio_getport</a></span>(java.lang.String&nbsp;port)</code>
  189. <div class="block">The gpio_getport method searches in the rel_map variable for the correct port and return index.</div>
  190. </td>
  191. </tr>
  192. <tr id="i3" class="rowColor">
  193. <td class="colFirst"><code>static void</code></td>
  194. <td class="colLast"><code><span class="memberNameLink"><a href="gpio_java.html#gpio_read_status-java.lang.String-">gpio_read_status</a></span>(java.lang.String&nbsp;port)</code>
  195. <div class="block">The method checks the status and displays it in the command line.</div>
  196. </td>
  197. </tr>
  198. <tr id="i4" class="altColor">
  199. <td class="colFirst"><code>static void</code></td>
  200. <td class="colLast"><code><span class="memberNameLink"><a href="gpio_java.html#init_gpio--">init_gpio</a></span>()</code>
  201. <div class="block">The init_gpio method defines all relevant GPIO ports as output.</div>
  202. </td>
  203. </tr>
  204. <tr id="i5" class="rowColor">
  205. <td class="colFirst"><code>static java.lang.String</code></td>
  206. <td class="colLast"><code><span class="memberNameLink"><a href="gpio_java.html#launchcmd-java.lang.String-">launchcmd</a></span>(java.lang.String&nbsp;cmd)</code>
  207. <div class="block">The launchcmd method runs the command.</div>
  208. </td>
  209. </tr>
  210. <tr id="i6" class="altColor">
  211. <td class="colFirst"><code>static void</code></td>
  212. <td class="colLast"><code><span class="memberNameLink"><a href="gpio_java.html#main-java.lang.String:A-">main</a></span>(java.lang.String[]&nbsp;args)</code>
  213. <div class="block">Implement the main function of the application gpio_java.</div>
  214. </td>
  215. </tr>
  216. <tr id="i7" class="rowColor">
  217. <td class="colFirst"><code>static void</code></td>
  218. <td class="colLast"><code><span class="memberNameLink"><a href="gpio_java.html#show_usage--">show_usage</a></span>()</code>
  219. <div class="block">The show_usage method provides assistance in case of wrong input.</div>
  220. </td>
  221. </tr>
  222. </table>
  223. <ul class="blockList">
  224. <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
  225. <!-- -->
  226. </a>
  227. <h3>Methods inherited from class&nbsp;java.lang.Object</h3>
  228. <code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
  229. </ul>
  230. </li>
  231. </ul>
  232. </li>
  233. </ul>
  234. </div>
  235. <div class="details">
  236. <ul class="blockList">
  237. <li class="blockList">
  238. <!-- ============ FIELD DETAIL =========== -->
  239. <ul class="blockList">
  240. <li class="blockList"><a name="field.detail">
  241. <!-- -->
  242. </a>
  243. <h3>Field Detail</h3>
  244. <a name="rel_map">
  245. <!-- -->
  246. </a>
  247. <ul class="blockList">
  248. <li class="blockList">
  249. <h4>rel_map</h4>
  250. <pre>public static&nbsp;java.lang.String[][] rel_map</pre>
  251. <div class="block">Mapping from generic relay name to particular gpio port.</div>
  252. </li>
  253. </ul>
  254. <a name="action">
  255. <!-- -->
  256. </a>
  257. <ul class="blockListLast">
  258. <li class="blockList">
  259. <h4>action</h4>
  260. <pre>public static&nbsp;java.lang.String[] action</pre>
  261. <div class="block">Array with all allowed actions.</div>
  262. </li>
  263. </ul>
  264. </li>
  265. </ul>
  266. <!-- ========= CONSTRUCTOR DETAIL ======== -->
  267. <ul class="blockList">
  268. <li class="blockList"><a name="constructor.detail">
  269. <!-- -->
  270. </a>
  271. <h3>Constructor Detail</h3>
  272. <a name="gpio_java--">
  273. <!-- -->
  274. </a>
  275. <ul class="blockListLast">
  276. <li class="blockList">
  277. <h4>gpio_java</h4>
  278. <pre>public&nbsp;gpio_java()</pre>
  279. </li>
  280. </ul>
  281. </li>
  282. </ul>
  283. <!-- ============ METHOD DETAIL ========== -->
  284. <ul class="blockList">
  285. <li class="blockList"><a name="method.detail">
  286. <!-- -->
  287. </a>
  288. <h3>Method Detail</h3>
  289. <a name="main-java.lang.String:A-">
  290. <!-- -->
  291. </a>
  292. <ul class="blockList">
  293. <li class="blockList">
  294. <h4>main</h4>
  295. <pre>public static&nbsp;void&nbsp;main(java.lang.String[]&nbsp;args)</pre>
  296. <div class="block">Implement the main function of the application gpio_java.</div>
  297. <dl>
  298. <dt><span class="paramLabel">Parameters:</span></dt>
  299. <dd><code>args</code> - The passing argument in the commandline.</dd>
  300. </dl>
  301. </li>
  302. </ul>
  303. <a name="checkargs-java.lang.String:A-">
  304. <!-- -->
  305. </a>
  306. <ul class="blockList">
  307. <li class="blockList">
  308. <h4>checkargs</h4>
  309. <pre>public static&nbsp;void&nbsp;checkargs(java.lang.String[]&nbsp;argumens)</pre>
  310. <div class="block">The checkargs method checks whether two correct arguments have been entered.
  311. If not, an error message appears.</div>
  312. <dl>
  313. <dt><span class="paramLabel">Parameters:</span></dt>
  314. <dd><code>argumens</code> - Commandline argument</dd>
  315. </dl>
  316. </li>
  317. </ul>
  318. <a name="init_gpio--">
  319. <!-- -->
  320. </a>
  321. <ul class="blockList">
  322. <li class="blockList">
  323. <h4>init_gpio</h4>
  324. <pre>public static&nbsp;void&nbsp;init_gpio()</pre>
  325. <div class="block">The init_gpio method defines all relevant GPIO ports as output.</div>
  326. </li>
  327. </ul>
  328. <a name="gpio_getport-java.lang.String-">
  329. <!-- -->
  330. </a>
  331. <ul class="blockList">
  332. <li class="blockList">
  333. <h4>gpio_getport</h4>
  334. <pre>public static&nbsp;int&nbsp;gpio_getport(java.lang.String&nbsp;port)</pre>
  335. <div class="block">The gpio_getport method searches in the rel_map variable for the correct port and return index.</div>
  336. <dl>
  337. <dt><span class="paramLabel">Parameters:</span></dt>
  338. <dd><code>port</code> - relay(rel1-rel8)</dd>
  339. <dt><span class="returnLabel">Returns:</span></dt>
  340. <dd>idx returns an index. The index allows access to the array rel_map. If an error occurs in the function, the value -1 is returned.</dd>
  341. </dl>
  342. </li>
  343. </ul>
  344. <a name="gpio_cmdhandler-java.lang.String-java.lang.String-">
  345. <!-- -->
  346. </a>
  347. <ul class="blockList">
  348. <li class="blockList">
  349. <h4>gpio_cmdhandler</h4>
  350. <pre>public static&nbsp;void&nbsp;gpio_cmdhandler(java.lang.String&nbsp;port,
  351. java.lang.String&nbsp;cmd)</pre>
  352. <div class="block">The gpio_cmdhandler method switches the relays on, off or returns the status.</div>
  353. <dl>
  354. <dt><span class="paramLabel">Parameters:</span></dt>
  355. <dd><code>port</code> - relay(rel1-rel8)</dd>
  356. <dd><code>cmd</code> - action (on/off/status)</dd>
  357. </dl>
  358. </li>
  359. </ul>
  360. <a name="gpio_read_status-java.lang.String-">
  361. <!-- -->
  362. </a>
  363. <ul class="blockList">
  364. <li class="blockList">
  365. <h4>gpio_read_status</h4>
  366. <pre>public static&nbsp;void&nbsp;gpio_read_status(java.lang.String&nbsp;port)</pre>
  367. <div class="block">The method checks the status and displays it in the command line.</div>
  368. <dl>
  369. <dt><span class="paramLabel">Parameters:</span></dt>
  370. <dd><code>port</code> - the relay board</dd>
  371. </dl>
  372. </li>
  373. </ul>
  374. <a name="show_usage--">
  375. <!-- -->
  376. </a>
  377. <ul class="blockList">
  378. <li class="blockList">
  379. <h4>show_usage</h4>
  380. <pre>public static&nbsp;void&nbsp;show_usage()</pre>
  381. <div class="block">The show_usage method provides assistance in case of wrong input.</div>
  382. </li>
  383. </ul>
  384. <a name="launchcmd-java.lang.String-">
  385. <!-- -->
  386. </a>
  387. <ul class="blockListLast">
  388. <li class="blockList">
  389. <h4>launchcmd</h4>
  390. <pre>public static&nbsp;java.lang.String&nbsp;launchcmd(java.lang.String&nbsp;cmd)</pre>
  391. <div class="block">The launchcmd method runs the command.</div>
  392. <dl>
  393. <dt><span class="paramLabel">Parameters:</span></dt>
  394. <dd><code>cmd</code> - a specified system command.</dd>
  395. <dt><span class="returnLabel">Returns:</span></dt>
  396. <dd>retvalue returns a string</dd>
  397. </dl>
  398. </li>
  399. </ul>
  400. </li>
  401. </ul>
  402. </li>
  403. </ul>
  404. </div>
  405. </div>
  406. <!-- ========= END OF CLASS DATA ========= -->
  407. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  408. <div class="bottomNav"><a name="navbar.bottom">
  409. <!-- -->
  410. </a>
  411. <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
  412. <a name="navbar.bottom.firstrow">
  413. <!-- -->
  414. </a>
  415. <ul class="navList" title="Navigation">
  416. <li><a href="package-summary.html">Package</a></li>
  417. <li class="navBarCell1Rev">Class</li>
  418. <li><a href="package-tree.html">Tree</a></li>
  419. <li><a href="deprecated-list.html">Deprecated</a></li>
  420. <li><a href="index-all.html">Index</a></li>
  421. <li><a href="help-doc.html">Help</a></li>
  422. </ul>
  423. </div>
  424. <div class="subNav">
  425. <ul class="navList">
  426. <li>Prev&nbsp;Class</li>
  427. <li>Next&nbsp;Class</li>
  428. </ul>
  429. <ul class="navList">
  430. <li><a href="index.html?gpio_java.html" target="_top">Frames</a></li>
  431. <li><a href="gpio_java.html" target="_top">No&nbsp;Frames</a></li>
  432. </ul>
  433. <ul class="navList" id="allclasses_navbar_bottom">
  434. <li><a href="allclasses-noframe.html">All&nbsp;Classes</a></li>
  435. </ul>
  436. <div>
  437. <script type="text/javascript"><!--
  438. allClassesLink = document.getElementById("allclasses_navbar_bottom");
  439. if(window==top) {
  440. allClassesLink.style.display = "block";
  441. }
  442. else {
  443. allClassesLink.style.display = "none";
  444. }
  445. //-->
  446. </script>
  447. </div>
  448. <div>
  449. <ul class="subNavList">
  450. <li>Summary:&nbsp;</li>
  451. <li>Nested&nbsp;|&nbsp;</li>
  452. <li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
  453. <li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
  454. <li><a href="#method.summary">Method</a></li>
  455. </ul>
  456. <ul class="subNavList">
  457. <li>Detail:&nbsp;</li>
  458. <li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
  459. <li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
  460. <li><a href="#method.detail">Method</a></li>
  461. </ul>
  462. </div>
  463. <a name="skip.navbar.bottom">
  464. <!-- -->
  465. </a></div>
  466. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  467. </body>
  468. </html>