diff --git a/.gitignore b/.gitignore index 6dd29b7..e462184 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ -bin/ \ No newline at end of file +bin/ +.classpath +src/gpio_java.class \ No newline at end of file diff --git a/README.md b/README.md index 6812d48..a3ef3c8 100644 --- a/README.md +++ b/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�gen, Dokumentation generieren und anschauen +* Test Durchführen und logfile erzeugen diff --git a/doc/allclasses-frame.html b/doc/allclasses-frame.html index 087cd98..c3895cd 100644 --- a/doc/allclasses-frame.html +++ b/doc/allclasses-frame.html @@ -1,19 +1,19 @@ - - - - - -All Classes - - - - - -

All Classes

-
- -
- - + + + + + +All Classes + + + + + +

All Classes

+
+ +
+ + diff --git a/doc/allclasses-noframe.html b/doc/allclasses-noframe.html index 94d67ab..37d8c87 100644 --- a/doc/allclasses-noframe.html +++ b/doc/allclasses-noframe.html @@ -1,19 +1,19 @@ - - - - - -All Classes - - - - - -

All Classes

-
- -
- - + + + + + +All Classes + + + + + +

All Classes

+
+ +
+ + diff --git a/doc/constant-values.html b/doc/constant-values.html index 538690e..1df96a2 100644 --- a/doc/constant-values.html +++ b/doc/constant-values.html @@ -1,120 +1,120 @@ - - - - - -Constant Field Values - - - - - - - - -
- - -
Skip navigation links
- - - - -
- - -
-

Constant Field Values

-

Contents

-
- -
- - -
Skip navigation links
- - - - -
- - - - + + + + + +Constant Field Values + + + + + + + + +
+ + +
Skip navigation links
+ + + + +
+ + +
+

Constant Field Values

+

Contents

+
+ +
+ + +
Skip navigation links
+ + + + +
+ + + + diff --git a/doc/deprecated-list.html b/doc/deprecated-list.html index c5487f3..f13a9e3 100644 --- a/doc/deprecated-list.html +++ b/doc/deprecated-list.html @@ -1,120 +1,120 @@ - - - - - -Deprecated List - - - - - - - - -
- - -
Skip navigation links
- - - - -
- - -
-

Deprecated API

-

Contents

-
- -
- - -
Skip navigation links
- - - - -
- - - - + + + + + +Deprecated List + + + + + + + + +
+ + +
Skip navigation links
+ + + + +
+ + +
+

Deprecated API

+

Contents

+
+ +
+ + +
Skip navigation links
+ + + + +
+ + + + diff --git a/doc/gpio_java.html b/doc/gpio_java.html index 033c5c2..4e4f0a1 100644 --- a/doc/gpio_java.html +++ b/doc/gpio_java.html @@ -1,441 +1,468 @@ - - - - - -gpio_java - - - - - - - - -
- - -
Skip navigation links
- - - - -
- - - -
-

Class gpio_java

-
-
- -
- -
-
- -
-
- -
-
- - -
- - -
Skip navigation links
- - - - -
- - - - + + + + + +gpio_java + + + + + + + + +
+ + +
Skip navigation links
+ + + + +
+ + + +
+

Class gpio_java

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + +
Skip navigation links
+ + + + +
+ + + + diff --git a/doc/help-doc.html b/doc/help-doc.html index 235091a..f9ff5a8 100644 --- a/doc/help-doc.html +++ b/doc/help-doc.html @@ -1,217 +1,217 @@ - - - - - -API Help - - - - - - - - -
- - -
Skip navigation links
- - - - -
- - -
-

How This API Document Is Organized

-
This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.
-
-
- -This help file applies to API documentation generated using the standard doclet.
- -
- - -
Skip navigation links
- - - - -
- - - - + + + + + +API Help + + + + + + + + +
+ + +
Skip navigation links
+ + + + +
+ + +
+

How This API Document Is Organized

+
This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.
+
+
+ +This help file applies to API documentation generated using the standard doclet.
+ +
+ + +
Skip navigation links
+ + + + +
+ + + + diff --git a/doc/index-all.html b/doc/index-all.html index 095f640..7de7e89 100644 --- a/doc/index-all.html +++ b/doc/index-all.html @@ -1,202 +1,209 @@ - - - - - -Index - - - - - - - - -
- - -
Skip navigation links
- - - - -
- - -
A C G I L M R S  - - -

A

-
-
action - Static variable in class gpio_java
-
 
-
- - - -

C

-
-
checkargs(String[]) - Static method in class gpio_java
-
-
Die checkargs-Methode prüft ob zwei korrekte Argumente eingetragen wurden.
-
-
- - - -

G

-
-
gpio_cmdhandler(String, String) - Static method in class gpio_java
-
-
Die gpio_cmdhandler-Methode schaltet die Relais an oder aus.
-
-
gpio_getport(String) - Static method in class gpio_java
-
-
Die gpio_getport-Methode vergleicht im rel_map welcher port gesucht ist
-
-
gpio_java - Class in <Unnamed>
-
 
-
gpio_java() - Constructor for class gpio_java
-
 
-
- - - -

I

-
-
init_gpio() - Static method in class gpio_java
-
-
Die init_gpio-Methode ist eine schleife die alle rel als output definiert.
-
-
- - - -

L

-
-
launchcmd(String) - Static method in class gpio_java
-
-
Die launchcmd-Methode führt den prozess aus
-
-
- - - -

M

-
-
main(String[]) - Static method in class gpio_java
-
-
Die main-Methode ruft die Funktionen in der gegebenen Reihnfolge auf, - und gibt die @param args weiter.
-
-
- - - -

R

-
-
rel_map - Static variable in class gpio_java
-
 
-
- - - -

S

-
-
show_usage() - Static method in class gpio_java
-
-
Die show_usage-Methode gibt eine Hilfestellung bei falscher Eingabe
-
-
-A C G I L M R S 
- -
- - -
Skip navigation links
- - - - -
- - - - + + + + + +Index + + + + + + + + +
+ + +
Skip navigation links
+ + + + +
+ + +
A C G I L M R S  + + +

A

+
+
action - Static variable in class gpio_java
+
+
Array with all allowed actions.
+
+
+ + + +

C

+
+
checkargs(String[]) - Static method in class gpio_java
+
+
The checkargs method checks whether two correct arguments have been entered.
+
+
+ + + +

G

+
+
gpio_cmdhandler(String, String) - Static method in class gpio_java
+
+
The gpio_cmdhandler method switches the relays on, off or returns the status.
+
+
gpio_getport(String) - Static method in class gpio_java
+
+
The gpio_getport method searches in the rel_map variable for the correct port and return index.
+
+
gpio_java - Class in <Unnamed>
+
 
+
gpio_java() - Constructor for class gpio_java
+
 
+
gpio_read_status(String) - Static method in class gpio_java
+
+
The method checks the status and displays it in the command line.
+
+
+ + + +

I

+
+
init_gpio() - Static method in class gpio_java
+
+
The init_gpio method defines all relevant GPIO ports as output.
+
+
+ + + +

L

+
+
launchcmd(String) - Static method in class gpio_java
+
+
The launchcmd method runs the command.
+
+
+ + + +

M

+
+
main(String[]) - Static method in class gpio_java
+
+
Implement the main function of the application gpio_java.
+
+
+ + + +

R

+
+
rel_map - Static variable in class gpio_java
+
+
Mapping from generic relay name to particular gpio port.
+
+
+ + + +

S

+
+
show_usage() - Static method in class gpio_java
+
+
The show_usage method provides assistance in case of wrong input.
+
+
+A C G I L M R S 
+ +
+ + +
Skip navigation links
+ + + + +
+ + + + diff --git a/doc/index.html b/doc/index.html index 265b8ee..108a26d 100644 --- a/doc/index.html +++ b/doc/index.html @@ -1,72 +1,72 @@ - - - - - -Generated Documentation (Untitled) - - - - - - -<noscript> -<div>JavaScript is disabled on your browser.</div> -</noscript> -<h2>Frame Alert</h2> -<p>This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. Link to <a href="gpio_java.html">Non-frame version</a>.</p> - - - + + + + + +Generated Documentation (Untitled) + + + + + + +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<h2>Frame Alert</h2> +<p>This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. Link to <a href="gpio_java.html">Non-frame version</a>.</p> + + + diff --git a/doc/overview-tree.html b/doc/overview-tree.html index 0322780..115ea12 100644 --- a/doc/overview-tree.html +++ b/doc/overview-tree.html @@ -1,129 +1,129 @@ - - - - - -Class Hierarchy - - - - - - - - -
- - -
Skip navigation links
- - - - -
- - -
-

Hierarchy For All Packages

-
-
-

Class Hierarchy

- -
- -
- - -
Skip navigation links
- - - - -
- - - - + + + + + +Class Hierarchy + + + + + + + + +
+ + +
Skip navigation links
+ + + + +
+ + +
+

Hierarchy For All Packages

+
+
+

Class Hierarchy

+ +
+ +
+ + +
Skip navigation links
+ + + + +
+ + + + diff --git a/doc/package-frame.html b/doc/package-frame.html index 075f779..1c89f4f 100644 --- a/doc/package-frame.html +++ b/doc/package-frame.html @@ -1,20 +1,20 @@ - - - - - -<Unnamed> - - - - - -

<Unnamed>

-
-

Classes

- -
- - + + + + + +<Unnamed> + + + + + +

<Unnamed>

+
+

Classes

+ +
+ + diff --git a/doc/package-summary.html b/doc/package-summary.html index 34f44b5..4d2e2c1 100644 --- a/doc/package-summary.html +++ b/doc/package-summary.html @@ -1,127 +1,127 @@ - - - - - - - - - - - - -
- - -
Skip navigation links
- - - - -
- - -
-

Package <Unnamed>

-
-
- -
- -
- - -
Skip navigation links
- - - - -
- - - - + + + + + + + + + + + + +
+ + +
Skip navigation links
+ + + + +
+ + +
+

Package <Unnamed>

+
+
+ +
+ +
+ + +
Skip navigation links
+ + + + +
+ + + + diff --git a/doc/package-tree.html b/doc/package-tree.html index 6821949..0765420 100644 --- a/doc/package-tree.html +++ b/doc/package-tree.html @@ -1,129 +1,129 @@ - - - - - - Class Hierarchy - - - - - - - - -
- - -
Skip navigation links
- - - - -
- - -
-

Hierarchy For Package <Unnamed>

-
-
-

Class Hierarchy

- -
- -
- - -
Skip navigation links
- - - - -
- - - - + + + + + + Class Hierarchy + + + + + + + + +
+ + +
Skip navigation links
+ + + + +
+ + +
+

Hierarchy For Package <Unnamed>

+
+
+

Class Hierarchy

+ +
+ +
+ + +
Skip navigation links
+ + + + +
+ + + + diff --git a/src/gpio_java.java b/src/gpio_java.java index ccaca72..341a352 100644 --- a/src/gpio_java.java +++ b/src/gpio_java.java @@ -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)