Kommentare bearbeitet.

Dokumentation neu generiert.
This commit is contained in:
Alex Volkmann 2019-03-11 17:46:24 +01:00
parent a5d6ef930c
commit 74f02bec5b
15 changed files with 1671 additions and 1631 deletions

2
.gitignore vendored
View File

@ -1 +1,3 @@
bin/
.classpath
src/gpio_java.class

View File

@ -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

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>&nbsp;</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>&nbsp;</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[]&nbsp;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&nbsp;port,
java.lang.String&nbsp;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&nbsp;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&nbsp;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&nbsp;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[]&nbsp;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&nbsp;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[]&nbsp;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&nbsp;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&nbsp;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&nbsp;void&nbsp;main(java.lang.String[]&nbsp;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&nbsp;void&nbsp;checkargs(java.lang.String[]&nbsp;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&nbsp;void&nbsp;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&nbsp;int&nbsp;gpio_getport(java.lang.String&nbsp;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&nbsp;void&nbsp;gpio_cmdhandler(java.lang.String&nbsp;port,
java.lang.String&nbsp;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&nbsp;void&nbsp;gpio_read_status(java.lang.String&nbsp;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&nbsp;void&nbsp;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&nbsp;void&nbsp;launchcmd(java.lang.String&nbsp;cmd)</pre>
<div class="block">Die launchcmd-Methode führt den prozess aus</div>
<pre>public static&nbsp;java.lang.String&nbsp;launchcmd(java.lang.String&nbsp;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>

View File

@ -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>

View File

@ -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 &lt;Unnamed&gt;">gpio_java</a></dt>
<dd>&nbsp;</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 &lt;Unnamed&gt;">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 &lt;Unnamed&gt;">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 &lt;Unnamed&gt;">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 &lt;Unnamed&gt;"><span class="typeNameLink">gpio_java</span></a> - Class in <a href="package-summary.html">&lt;Unnamed&gt;</a></dt>
<dd>&nbsp;</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 &lt;Unnamed&gt;">gpio_java</a></dt>
<dd>&nbsp;</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 &lt;Unnamed&gt;">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 &lt;Unnamed&gt;">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 &lt;Unnamed&gt;">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 &lt;Unnamed&gt;">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 &lt;Unnamed&gt;">gpio_java</a></dt>
<dd>&nbsp;</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 &lt;Unnamed&gt;">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>&nbsp;<a href="#I:C">C</a>&nbsp;<a href="#I:G">G</a>&nbsp;<a href="#I:I">I</a>&nbsp;<a href="#I:L">L</a>&nbsp;<a href="#I:M">M</a>&nbsp;<a href="#I:R">R</a>&nbsp;<a href="#I:S">S</a>&nbsp;</div>

View File

@ -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;

View File

@ -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>

View File

@ -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>&lt;Unnamed&gt;</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>

View File

@ -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>

View File

@ -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>

View File

@ -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)