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 @@
-
-
-
-
This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.
-
-
-
-
-
Package
-
Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:
-
-
Interfaces (italic)
-
Classes
-
Enums
-
Exceptions
-
Errors
-
Annotation Types
-
-
-
-
Class/Interface
-
Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:
-
-
Class inheritance diagram
-
Direct Subclasses
-
All Known Subinterfaces
-
All Known Implementing Classes
-
Class/interface declaration
-
Class/interface description
-
-
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
-
Method Summary
-
-
-
Field Detail
-
Constructor Detail
-
Method Detail
-
-
Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
-
-
-
Annotation Type
-
Each annotation type has its own separate page with the following sections:
-
-
Annotation Type declaration
-
Annotation Type description
-
Required Element Summary
-
Optional Element Summary
-
Element Detail
-
-
-
-
Enum
-
Each enum has its own separate page with the following sections:
-
-
Enum declaration
-
Enum description
-
Enum Constant Summary
-
Enum Constant Detail
-
-
-
-
Tree (Class Hierarchy)
-
There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object.
-
-
When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
-
When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.
-
-
-
-
Deprecated API
-
The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.
-
-
-
Index
-
The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.
-
-
-
Prev/Next
-
These links take you to the next or previous class, interface, package, or related page.
-
-
-
Frames/No Frames
-
These links show and hide the HTML frames. All pages are available with or without frames.
-
-
-
All Classes
-
The All Classes link shows all classes and interfaces except non-static nested types.
-
-
-
Serialized Form
-
Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.
This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.
+
+
+
+
+
Package
+
Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:
+
+
Interfaces (italic)
+
Classes
+
Enums
+
Exceptions
+
Errors
+
Annotation Types
+
+
+
+
Class/Interface
+
Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:
+
+
Class inheritance diagram
+
Direct Subclasses
+
All Known Subinterfaces
+
All Known Implementing Classes
+
Class/interface declaration
+
Class/interface description
+
+
+
Nested Class Summary
+
Field Summary
+
Constructor Summary
+
Method Summary
+
+
+
Field Detail
+
Constructor Detail
+
Method Detail
+
+
Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
+
+
+
Annotation Type
+
Each annotation type has its own separate page with the following sections:
+
+
Annotation Type declaration
+
Annotation Type description
+
Required Element Summary
+
Optional Element Summary
+
Element Detail
+
+
+
+
Enum
+
Each enum has its own separate page with the following sections:
+
+
Enum declaration
+
Enum description
+
Enum Constant Summary
+
Enum Constant Detail
+
+
+
+
Tree (Class Hierarchy)
+
There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object.
+
+
When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
+
When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.
+
+
+
+
Deprecated API
+
The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.
+
+
+
Index
+
The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.
+
+
+
Prev/Next
+
These links take you to the next or previous class, interface, package, or related page.
+
+
+
Frames/No Frames
+
These links show and hide the HTML frames. All pages are available with or without frames.
+
+
+
All Classes
+
The All Classes link shows all classes and interfaces except non-static nested types.
+
+
+
Serialized Form
+
Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.
+
+
+
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)