Kommentare bearbeitet.
Dokumentation neu generiert.
This commit is contained in:
parent
a5d6ef930c
commit
74f02bec5b
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1,3 @@
|
||||
bin/
|
||||
.classpath
|
||||
src/gpio_java.class
|
22
README.md
22
README.md
@ -2,25 +2,27 @@
|
||||
|
||||
# Deployment
|
||||
use the following command to transfer project to raspberry pi:
|
||||
```
|
||||
scp -r gpio pi@192.168.1.77:~
|
||||
```
|
||||
|
||||
# usage
|
||||
## switch relais on
|
||||
## switch first relais on
|
||||
```
|
||||
javadoc todo
|
||||
java gpio_java rel1 on
|
||||
```
|
||||
## switch relais off
|
||||
## switch first relais off
|
||||
```
|
||||
javadoc todo
|
||||
java gpio_java rel1 off
|
||||
```
|
||||
## read status of relais
|
||||
## read status of first relais
|
||||
```
|
||||
javadoc todo
|
||||
java gpio_java rel1 status
|
||||
```
|
||||
|
||||
## Create Dokumentation
|
||||
```
|
||||
javadoc todo
|
||||
javadoc -d doc *.java
|
||||
```
|
||||
|
||||
|
||||
@ -45,9 +47,9 @@ Pin GPIO Relais/Box
|
||||
* 26 GPIO 7 In8
|
||||
|
||||
# ToDo
|
||||
* Status Abfrage implementieren
|
||||
* Javadok Kommentare hinzufügen, Dokumentation generieren und anschauen
|
||||
* Test Durchführen und logfile erzeugen
|
||||
* Klärung : Was ist ein md File? Wie wird eine Tabelle Dokumentiert?
|
||||
* Javadoc Kommentare hinzuf<75>gen, Dokumentation generieren und anschauen
|
||||
* Test Durchführen und logfile erzeugen
|
||||
|
||||
|
||||
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="de">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_181) on Mon Mar 04 14:23:29 CET 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_181) on Mon Mar 11 17:41:56 CET 2019 -->
|
||||
<title>All Classes</title>
|
||||
<meta name="date" content="2019-03-04">
|
||||
<meta name="date" content="2019-03-11">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
</head>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="de">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_181) on Mon Mar 04 14:23:29 CET 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_181) on Mon Mar 11 17:41:56 CET 2019 -->
|
||||
<title>All Classes</title>
|
||||
<meta name="date" content="2019-03-04">
|
||||
<meta name="date" content="2019-03-11">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
</head>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="de">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_181) on Mon Mar 04 14:23:28 CET 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_181) on Mon Mar 11 17:41:55 CET 2019 -->
|
||||
<title>Constant Field Values</title>
|
||||
<meta name="date" content="2019-03-04">
|
||||
<meta name="date" content="2019-03-11">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
</head>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="de">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_181) on Mon Mar 04 14:23:29 CET 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_181) on Mon Mar 11 17:41:56 CET 2019 -->
|
||||
<title>Deprecated List</title>
|
||||
<meta name="date" content="2019-03-04">
|
||||
<meta name="date" content="2019-03-11">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
</head>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="de">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_181) on Mon Mar 04 14:23:28 CET 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_181) on Mon Mar 11 17:41:55 CET 2019 -->
|
||||
<title>gpio_java</title>
|
||||
<meta name="date" content="2019-03-04">
|
||||
<meta name="date" content="2019-03-11">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
</head>
|
||||
@ -18,7 +18,7 @@
|
||||
catch(err) {
|
||||
}
|
||||
//-->
|
||||
var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9};
|
||||
var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9};
|
||||
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"]};
|
||||
var altColor = "altColor";
|
||||
var rowColor = "rowColor";
|
||||
@ -128,11 +128,15 @@ extends java.lang.Object</pre>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><code>static java.lang.String[]</code></td>
|
||||
<td class="colLast"><code><span class="memberNameLink"><a href="gpio_java.html#action">action</a></span></code> </td>
|
||||
<td class="colLast"><code><span class="memberNameLink"><a href="gpio_java.html#action">action</a></span></code>
|
||||
<div class="block">Array with all allowed actions.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><code>static java.lang.String[][]</code></td>
|
||||
<td class="colLast"><code><span class="memberNameLink"><a href="gpio_java.html#rel_map">rel_map</a></span></code> </td>
|
||||
<td class="colLast"><code><span class="memberNameLink"><a href="gpio_java.html#rel_map">rel_map</a></span></code>
|
||||
<div class="block">Mapping from generic relay name to particular gpio port.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
@ -169,45 +173,50 @@ extends java.lang.Object</pre>
|
||||
<tr id="i0" class="altColor">
|
||||
<td class="colFirst"><code>static void</code></td>
|
||||
<td class="colLast"><code><span class="memberNameLink"><a href="gpio_java.html#checkargs-java.lang.String:A-">checkargs</a></span>(java.lang.String[] argumens)</code>
|
||||
<div class="block">Die checkargs-Methode prüft ob zwei korrekte Argumente eingetragen wurden.</div>
|
||||
<div class="block">The checkargs method checks whether two correct arguments have been entered.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="i1" class="rowColor">
|
||||
<td class="colFirst"><code>static void</code></td>
|
||||
<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 port,
|
||||
java.lang.String cmd)</code>
|
||||
<div class="block">Die gpio_cmdhandler-Methode schaltet die Relais an oder aus.</div>
|
||||
<div class="block">The gpio_cmdhandler method switches the relays on, off or returns the status.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="i2" class="altColor">
|
||||
<td class="colFirst"><code>static int</code></td>
|
||||
<td class="colLast"><code><span class="memberNameLink"><a href="gpio_java.html#gpio_getport-java.lang.String-">gpio_getport</a></span>(java.lang.String port)</code>
|
||||
<div class="block">Die gpio_getport-Methode vergleicht im rel_map welcher port gesucht ist</div>
|
||||
<div class="block">The gpio_getport method searches in the rel_map variable for the correct port and return index.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="i3" class="rowColor">
|
||||
<td class="colFirst"><code>static void</code></td>
|
||||
<td class="colLast"><code><span class="memberNameLink"><a href="gpio_java.html#init_gpio--">init_gpio</a></span>()</code>
|
||||
<div class="block">Die init_gpio-Methode ist eine schleife die alle rel als output definiert.</div>
|
||||
<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 port)</code>
|
||||
<div class="block">The method checks the status and displays it in the command line.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="i4" class="altColor">
|
||||
<td class="colFirst"><code>static void</code></td>
|
||||
<td class="colLast"><code><span class="memberNameLink"><a href="gpio_java.html#launchcmd-java.lang.String-">launchcmd</a></span>(java.lang.String cmd)</code>
|
||||
<div class="block">Die launchcmd-Methode führt den prozess aus</div>
|
||||
<td class="colLast"><code><span class="memberNameLink"><a href="gpio_java.html#init_gpio--">init_gpio</a></span>()</code>
|
||||
<div class="block">The init_gpio method defines all relevant GPIO ports as output.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="i5" class="rowColor">
|
||||
<td class="colFirst"><code>static void</code></td>
|
||||
<td class="colLast"><code><span class="memberNameLink"><a href="gpio_java.html#main-java.lang.String:A-">main</a></span>(java.lang.String[] args)</code>
|
||||
<div class="block">Die main-Methode ruft die Funktionen in der gegebenen Reihnfolge auf,
|
||||
und gibt die @param args weiter.</div>
|
||||
<td class="colFirst"><code>static java.lang.String</code></td>
|
||||
<td class="colLast"><code><span class="memberNameLink"><a href="gpio_java.html#launchcmd-java.lang.String-">launchcmd</a></span>(java.lang.String cmd)</code>
|
||||
<div class="block">The launchcmd method runs the command.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="i6" class="altColor">
|
||||
<td class="colFirst"><code>static void</code></td>
|
||||
<td class="colLast"><code><span class="memberNameLink"><a href="gpio_java.html#main-java.lang.String:A-">main</a></span>(java.lang.String[] args)</code>
|
||||
<div class="block">Implement the main function of the application gpio_java.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="i7" class="rowColor">
|
||||
<td class="colFirst"><code>static void</code></td>
|
||||
<td class="colLast"><code><span class="memberNameLink"><a href="gpio_java.html#show_usage--">show_usage</a></span>()</code>
|
||||
<div class="block">Die show_usage-Methode gibt eine Hilfestellung bei falscher Eingabe</div>
|
||||
<div class="block">The show_usage method provides assistance in case of wrong input.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -239,6 +248,7 @@ extends java.lang.Object</pre>
|
||||
<li class="blockList">
|
||||
<h4>rel_map</h4>
|
||||
<pre>public static java.lang.String[][] rel_map</pre>
|
||||
<div class="block">Mapping from generic relay name to particular gpio port.</div>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="action">
|
||||
@ -248,6 +258,7 @@ extends java.lang.Object</pre>
|
||||
<li class="blockList">
|
||||
<h4>action</h4>
|
||||
<pre>public static java.lang.String[] action</pre>
|
||||
<div class="block">Array with all allowed actions.</div>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
@ -282,11 +293,10 @@ extends java.lang.Object</pre>
|
||||
<li class="blockList">
|
||||
<h4>main</h4>
|
||||
<pre>public static void main(java.lang.String[] args)</pre>
|
||||
<div class="block">Die main-Methode ruft die Funktionen in der gegebenen Reihnfolge auf,
|
||||
und gibt die @param args weiter.</div>
|
||||
<div class="block">Implement the main function of the application gpio_java.</div>
|
||||
<dl>
|
||||
<dt><span class="paramLabel">Parameters:</span></dt>
|
||||
<dd><code>args</code> - Commandline argument der main funktion</dd>
|
||||
<dd><code>args</code> - The passing argument in the commandline.</dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
@ -297,10 +307,11 @@ extends java.lang.Object</pre>
|
||||
<li class="blockList">
|
||||
<h4>checkargs</h4>
|
||||
<pre>public static void checkargs(java.lang.String[] argumens)</pre>
|
||||
<div class="block">Die checkargs-Methode prüft ob zwei korrekte Argumente eingetragen wurden.</div>
|
||||
<div class="block">The checkargs method checks whether two correct arguments have been entered.
|
||||
If not, an error message appears.</div>
|
||||
<dl>
|
||||
<dt><span class="paramLabel">Parameters:</span></dt>
|
||||
<dd><code>argumens</code> - - Commandline argument</dd>
|
||||
<dd><code>argumens</code> - Commandline argument</dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
@ -311,7 +322,7 @@ extends java.lang.Object</pre>
|
||||
<li class="blockList">
|
||||
<h4>init_gpio</h4>
|
||||
<pre>public static void init_gpio()</pre>
|
||||
<div class="block">Die init_gpio-Methode ist eine schleife die alle rel als output definiert.</div>
|
||||
<div class="block">The init_gpio method defines all relevant GPIO ports as output.</div>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="gpio_getport-java.lang.String-">
|
||||
@ -321,12 +332,12 @@ extends java.lang.Object</pre>
|
||||
<li class="blockList">
|
||||
<h4>gpio_getport</h4>
|
||||
<pre>public static int gpio_getport(java.lang.String port)</pre>
|
||||
<div class="block">Die gpio_getport-Methode vergleicht im rel_map welcher port gesucht ist</div>
|
||||
<div class="block">The gpio_getport method searches in the rel_map variable for the correct port and return index.</div>
|
||||
<dl>
|
||||
<dt><span class="paramLabel">Parameters:</span></dt>
|
||||
<dd><code>port</code> - - erster eingabe Wert der CMD Zeile</dd>
|
||||
<dd><code>port</code> - relay(rel1-rel8)</dd>
|
||||
<dt><span class="returnLabel">Returns:</span></dt>
|
||||
<dd>idx - gibt den idx Wert aus rel_map zurück</dd>
|
||||
<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>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
@ -338,11 +349,25 @@ extends java.lang.Object</pre>
|
||||
<h4>gpio_cmdhandler</h4>
|
||||
<pre>public static void gpio_cmdhandler(java.lang.String port,
|
||||
java.lang.String cmd)</pre>
|
||||
<div class="block">Die gpio_cmdhandler-Methode schaltet die Relais an oder aus.</div>
|
||||
<div class="block">The gpio_cmdhandler method switches the relays on, off or returns the status.</div>
|
||||
<dl>
|
||||
<dt><span class="paramLabel">Parameters:</span></dt>
|
||||
<dd><code>port</code> - Relais(1-8)</dd>
|
||||
<dd><code>cmd</code> - Aktion (on/off/status)</dd>
|
||||
<dd><code>port</code> - relay(rel1-rel8)</dd>
|
||||
<dd><code>cmd</code> - action (on/off/status)</dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="gpio_read_status-java.lang.String-">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>gpio_read_status</h4>
|
||||
<pre>public static void gpio_read_status(java.lang.String port)</pre>
|
||||
<div class="block">The method checks the status and displays it in the command line.</div>
|
||||
<dl>
|
||||
<dt><span class="paramLabel">Parameters:</span></dt>
|
||||
<dd><code>port</code> - the relay board</dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
@ -353,7 +378,7 @@ extends java.lang.Object</pre>
|
||||
<li class="blockList">
|
||||
<h4>show_usage</h4>
|
||||
<pre>public static void show_usage()</pre>
|
||||
<div class="block">Die show_usage-Methode gibt eine Hilfestellung bei falscher Eingabe</div>
|
||||
<div class="block">The show_usage method provides assistance in case of wrong input.</div>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="launchcmd-java.lang.String-">
|
||||
@ -362,11 +387,13 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>launchcmd</h4>
|
||||
<pre>public static void launchcmd(java.lang.String cmd)</pre>
|
||||
<div class="block">Die launchcmd-Methode führt den prozess aus</div>
|
||||
<pre>public static java.lang.String launchcmd(java.lang.String cmd)</pre>
|
||||
<div class="block">The launchcmd method runs the command.</div>
|
||||
<dl>
|
||||
<dt><span class="paramLabel">Parameters:</span></dt>
|
||||
<dd><code>cmd</code> - - erster eingabe Wert der CMD Zeile</dd>
|
||||
<dd><code>cmd</code> - a specified system command.</dd>
|
||||
<dt><span class="returnLabel">Returns:</span></dt>
|
||||
<dd>retvalue returns a string</dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="de">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_181) on Mon Mar 04 14:23:29 CET 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_181) on Mon Mar 11 17:41:56 CET 2019 -->
|
||||
<title>API Help</title>
|
||||
<meta name="date" content="2019-03-04">
|
||||
<meta name="date" content="2019-03-11">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
</head>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="de">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_181) on Mon Mar 04 14:23:28 CET 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_181) on Mon Mar 11 17:41:56 CET 2019 -->
|
||||
<title>Index</title>
|
||||
<meta name="date" content="2019-03-04">
|
||||
<meta name="date" content="2019-03-11">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
</head>
|
||||
@ -73,7 +73,9 @@
|
||||
<h2 class="title">A</h2>
|
||||
<dl>
|
||||
<dt><span class="memberNameLink"><a href="gpio_java.html#action">action</a></span> - Static variable in class <a href="gpio_java.html" title="class in <Unnamed>">gpio_java</a></dt>
|
||||
<dd> </dd>
|
||||
<dd>
|
||||
<div class="block">Array with all allowed actions.</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<a name="I:C">
|
||||
<!-- -->
|
||||
@ -82,7 +84,7 @@
|
||||
<dl>
|
||||
<dt><span class="memberNameLink"><a href="gpio_java.html#checkargs-java.lang.String:A-">checkargs(String[])</a></span> - Static method in class <a href="gpio_java.html" title="class in <Unnamed>">gpio_java</a></dt>
|
||||
<dd>
|
||||
<div class="block">Die checkargs-Methode prüft ob zwei korrekte Argumente eingetragen wurden.</div>
|
||||
<div class="block">The checkargs method checks whether two correct arguments have been entered.</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<a name="I:G">
|
||||
@ -92,16 +94,20 @@
|
||||
<dl>
|
||||
<dt><span class="memberNameLink"><a href="gpio_java.html#gpio_cmdhandler-java.lang.String-java.lang.String-">gpio_cmdhandler(String, String)</a></span> - Static method in class <a href="gpio_java.html" title="class in <Unnamed>">gpio_java</a></dt>
|
||||
<dd>
|
||||
<div class="block">Die gpio_cmdhandler-Methode schaltet die Relais an oder aus.</div>
|
||||
<div class="block">The gpio_cmdhandler method switches the relays on, off or returns the status.</div>
|
||||
</dd>
|
||||
<dt><span class="memberNameLink"><a href="gpio_java.html#gpio_getport-java.lang.String-">gpio_getport(String)</a></span> - Static method in class <a href="gpio_java.html" title="class in <Unnamed>">gpio_java</a></dt>
|
||||
<dd>
|
||||
<div class="block">Die gpio_getport-Methode vergleicht im rel_map welcher port gesucht ist</div>
|
||||
<div class="block">The gpio_getport method searches in the rel_map variable for the correct port and return index.</div>
|
||||
</dd>
|
||||
<dt><a href="gpio_java.html" title="class in <Unnamed>"><span class="typeNameLink">gpio_java</span></a> - Class in <a href="package-summary.html"><Unnamed></a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="memberNameLink"><a href="gpio_java.html#gpio_java--">gpio_java()</a></span> - Constructor for class <a href="gpio_java.html" title="class in <Unnamed>">gpio_java</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="memberNameLink"><a href="gpio_java.html#gpio_read_status-java.lang.String-">gpio_read_status(String)</a></span> - Static method in class <a href="gpio_java.html" title="class in <Unnamed>">gpio_java</a></dt>
|
||||
<dd>
|
||||
<div class="block">The method checks the status and displays it in the command line.</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<a name="I:I">
|
||||
<!-- -->
|
||||
@ -110,7 +116,7 @@
|
||||
<dl>
|
||||
<dt><span class="memberNameLink"><a href="gpio_java.html#init_gpio--">init_gpio()</a></span> - Static method in class <a href="gpio_java.html" title="class in <Unnamed>">gpio_java</a></dt>
|
||||
<dd>
|
||||
<div class="block">Die init_gpio-Methode ist eine schleife die alle rel als output definiert.</div>
|
||||
<div class="block">The init_gpio method defines all relevant GPIO ports as output.</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<a name="I:L">
|
||||
@ -120,7 +126,7 @@
|
||||
<dl>
|
||||
<dt><span class="memberNameLink"><a href="gpio_java.html#launchcmd-java.lang.String-">launchcmd(String)</a></span> - Static method in class <a href="gpio_java.html" title="class in <Unnamed>">gpio_java</a></dt>
|
||||
<dd>
|
||||
<div class="block">Die launchcmd-Methode führt den prozess aus</div>
|
||||
<div class="block">The launchcmd method runs the command.</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<a name="I:M">
|
||||
@ -130,8 +136,7 @@
|
||||
<dl>
|
||||
<dt><span class="memberNameLink"><a href="gpio_java.html#main-java.lang.String:A-">main(String[])</a></span> - Static method in class <a href="gpio_java.html" title="class in <Unnamed>">gpio_java</a></dt>
|
||||
<dd>
|
||||
<div class="block">Die main-Methode ruft die Funktionen in der gegebenen Reihnfolge auf,
|
||||
und gibt die @param args weiter.</div>
|
||||
<div class="block">Implement the main function of the application gpio_java.</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<a name="I:R">
|
||||
@ -140,7 +145,9 @@
|
||||
<h2 class="title">R</h2>
|
||||
<dl>
|
||||
<dt><span class="memberNameLink"><a href="gpio_java.html#rel_map">rel_map</a></span> - Static variable in class <a href="gpio_java.html" title="class in <Unnamed>">gpio_java</a></dt>
|
||||
<dd> </dd>
|
||||
<dd>
|
||||
<div class="block">Mapping from generic relay name to particular gpio port.</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<a name="I:S">
|
||||
<!-- -->
|
||||
@ -149,7 +156,7 @@
|
||||
<dl>
|
||||
<dt><span class="memberNameLink"><a href="gpio_java.html#show_usage--">show_usage()</a></span> - Static method in class <a href="gpio_java.html" title="class in <Unnamed>">gpio_java</a></dt>
|
||||
<dd>
|
||||
<div class="block">Die show_usage-Methode gibt eine Hilfestellung bei falscher Eingabe</div>
|
||||
<div class="block">The show_usage method provides assistance in case of wrong input.</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<a href="#I:A">A</a> <a href="#I:C">C</a> <a href="#I:G">G</a> <a href="#I:I">I</a> <a href="#I:L">L</a> <a href="#I:M">M</a> <a href="#I:R">R</a> <a href="#I:S">S</a> </div>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="de">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_181) on Mon Mar 04 14:23:29 CET 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_181) on Mon Mar 11 17:41:56 CET 2019 -->
|
||||
<title>Generated Documentation (Untitled)</title>
|
||||
<script type="text/javascript">
|
||||
tmpTargetPage = "" + window.location.search;
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="de">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_181) on Mon Mar 04 14:23:28 CET 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_181) on Mon Mar 11 17:41:56 CET 2019 -->
|
||||
<title>Class Hierarchy</title>
|
||||
<meta name="date" content="2019-03-04">
|
||||
<meta name="date" content="2019-03-11">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
</head>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="de">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_181) on Mon Mar 04 14:23:28 CET 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_181) on Mon Mar 11 17:41:55 CET 2019 -->
|
||||
<title><Unnamed></title>
|
||||
<meta name="date" content="2019-03-04">
|
||||
<meta name="date" content="2019-03-11">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
</head>
|
||||
|
@ -2,8 +2,8 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="de">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_181) on Mon Mar 04 14:23:28 CET 2019 -->
|
||||
<meta name="date" content="2019-03-04">
|
||||
<!-- Generated by javadoc (1.8.0_181) on Mon Mar 11 17:41:55 CET 2019 -->
|
||||
<meta name="date" content="2019-03-11">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
</head>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="de">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_181) on Mon Mar 04 14:23:28 CET 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_181) on Mon Mar 11 17:41:55 CET 2019 -->
|
||||
<title> Class Hierarchy</title>
|
||||
<meta name="date" content="2019-03-04">
|
||||
<meta name="date" content="2019-03-11">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
</head>
|
||||
|
@ -11,6 +11,7 @@ import java.util.Arrays;
|
||||
|
||||
public class gpio_java
|
||||
{
|
||||
/** Mapping from generic relay name to particular gpio port. */
|
||||
public static String rel_map [][] = {
|
||||
{"rel1","14"},
|
||||
{"rel2","15"},
|
||||
@ -21,9 +22,10 @@ public class gpio_java
|
||||
{"rel7","8"},
|
||||
{"rel8","7"}
|
||||
};
|
||||
/** Array with all allowed actions.*/
|
||||
public static String [] action = {"on", "off", "status"};
|
||||
|
||||
/** The main method calls the functions in the given order and passes the @param args.
|
||||
/** Implement the main function of the application gpio_java.
|
||||
* @param args The passing argument in the commandline.
|
||||
*/
|
||||
public static void main (String [] args)
|
||||
@ -95,7 +97,7 @@ public class gpio_java
|
||||
}
|
||||
}
|
||||
|
||||
/** The init_gpio method is a loop that defines all relays as output.*/
|
||||
/** The init_gpio method defines all relevant GPIO ports as output.*/
|
||||
public static void init_gpio()
|
||||
{
|
||||
int idx;
|
||||
@ -112,7 +114,7 @@ public class gpio_java
|
||||
return;
|
||||
}
|
||||
|
||||
/** The gpio_getport method searches in the rel_map variable for the correct port and using a loop for this.
|
||||
/** The gpio_getport method searches in the rel_map variable for the correct port and return index.
|
||||
* @param port relay(rel1-rel8)
|
||||
* @return 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.
|
||||
* */
|
||||
@ -188,7 +190,7 @@ public class gpio_java
|
||||
}
|
||||
|
||||
|
||||
/** Die show_usage-Methode gibt eine Hilfestellung bei falscher Eingabe*/
|
||||
/** The show_usage method provides assistance in case of wrong input.*/
|
||||
public static void show_usage()
|
||||
{
|
||||
System.out.println("gpio_java allows you to control an 8 port relay board.");
|
||||
@ -208,7 +210,7 @@ public class gpio_java
|
||||
}
|
||||
|
||||
/** The launchcmd method runs the command.
|
||||
* @param cmd
|
||||
* @param cmd a specified system command.
|
||||
* @return retvalue returns a string
|
||||
* */
|
||||
public static String launchcmd(String cmd)
|
||||
|
Loading…
x
Reference in New Issue
Block a user