diff --git a/src/main/java/de/neemann/digital/core/io/Button.java b/src/main/java/de/neemann/digital/core/io/Button.java index bbeed1b80..0c911f7d8 100644 --- a/src/main/java/de/neemann/digital/core/io/Button.java +++ b/src/main/java/de/neemann/digital/core/io/Button.java @@ -10,10 +10,15 @@ import de.neemann.digital.core.element.Keys; import de.neemann.digital.lang.Lang; /** + * The Button + * * @author hneemann */ public class Button implements Element { + /** + * The Button description + */ public static final ElementTypeDescription DESCRIPTION = new ElementTypeDescription(Button.class) .addAttribute(Keys.ROTATE) .addAttribute(Keys.LABEL); @@ -21,6 +26,11 @@ public class Button implements Element { private final ObservableValue output; private final String label; + /** + * Creates a new instance + * + * @param attributes the attributes + */ public Button(ElementAttributes attributes) { output = new ObservableValue("out", 1); label = attributes.get(Keys.LABEL); diff --git a/src/main/java/de/neemann/digital/core/io/Const.java b/src/main/java/de/neemann/digital/core/io/Const.java index c2ed9c8db..468b73cb7 100644 --- a/src/main/java/de/neemann/digital/core/io/Const.java +++ b/src/main/java/de/neemann/digital/core/io/Const.java @@ -10,10 +10,15 @@ import de.neemann.digital.core.element.Keys; import de.neemann.digital.lang.Lang; /** + * A constant + * * @author hneemann */ public class Const implements Element { + /** + * The Constant description + */ public static final ElementTypeDescription DESCRIPTION = new ElementTypeDescription(Const.class) .addAttribute(Keys.ROTATE) .addAttribute(Keys.BITS) @@ -21,6 +26,11 @@ public class Const implements Element { private final ObservableValue output; + /** + * Creates a new instance + * + * @param attributes the attributes + */ public Const(ElementAttributes attributes) { output = new ObservableValue("out", attributes.get(Keys.BITS)); output.setValue(attributes.get(Keys.VALUE)); diff --git a/src/main/java/de/neemann/digital/core/io/In.java b/src/main/java/de/neemann/digital/core/io/In.java index 214cf9240..40e0cc52d 100644 --- a/src/main/java/de/neemann/digital/core/io/In.java +++ b/src/main/java/de/neemann/digital/core/io/In.java @@ -10,6 +10,8 @@ import de.neemann.digital.core.element.Keys; import de.neemann.digital.lang.Lang; /** + * The Input + * * @author hneemann */ public class In implements Element { diff --git a/src/main/java/de/neemann/digital/core/io/Out.java b/src/main/java/de/neemann/digital/core/io/Out.java index 65dc9ce92..3309d99f0 100644 --- a/src/main/java/de/neemann/digital/core/io/Out.java +++ b/src/main/java/de/neemann/digital/core/io/Out.java @@ -11,10 +11,15 @@ import de.neemann.digital.core.element.Keys; import static de.neemann.digital.core.element.PinInfo.input; /** + * The different outputs + * * @author hneemann */ public class Out implements Element { + /** + * The Input description + */ public static final ElementTypeDescription DESCRIPTION = new ElementTypeDescription(Out.class, input("in")) { @Override @@ -27,12 +32,18 @@ public class Out implements Element { .addAttribute(Keys.LABEL) .addAttribute(Keys.DESCRIPTION); + /** + * The LED description + */ public static final ElementTypeDescription LEDDESCRIPTION = new ElementTypeDescription("LED", Out.class, input("in")) .addAttribute(Keys.ROTATE) .addAttribute(Keys.LABEL) .addAttribute(Keys.COLOR); + /** + * The seven segment display description + */ public static final ElementTypeDescription SEVENDESCRIPTION = new ElementTypeDescription("Seven-Seg", attributes -> { @@ -42,6 +53,9 @@ public class Out implements Element { .addAttribute(Keys.LABEL) .addAttribute(Keys.COLOR); + /** + * The seven segment hex display description + */ public static final ElementTypeDescription SEVENHEXDESCRIPTION = new ElementTypeDescription("Seven-Seg-Hex", attributes -> { @@ -54,11 +68,21 @@ public class Out implements Element { private final String label; private ObservableValue value; + /** + * Creates a new instance + * + * @param attributes the attributes + */ public Out(ElementAttributes attributes) { bits = new int[]{attributes.getBits()}; label = attributes.get(Keys.LABEL); } + /** + * Creates a new instance + * + * @param bits the bitcount of the different inputs + */ public Out(int... bits) { this.bits = bits; label = null; diff --git a/src/main/java/de/neemann/digital/core/io/Probe.java b/src/main/java/de/neemann/digital/core/io/Probe.java index 9b788a5ae..be39080f1 100644 --- a/src/main/java/de/neemann/digital/core/io/Probe.java +++ b/src/main/java/de/neemann/digital/core/io/Probe.java @@ -11,11 +11,15 @@ import de.neemann.digital.core.element.Keys; import static de.neemann.digital.core.element.PinInfo.input; /** + * The measurement Probe + * * @author hneemann */ public class Probe implements Element { - + /** + * The Probe description + */ public static final ElementTypeDescription DESCRIPTION = new ElementTypeDescription("Probe", Probe.class, input("in")) .addAttribute(Keys.ROTATE) @@ -24,6 +28,11 @@ public class Probe implements Element { private final String label; private ObservableValue value; + /** + * Creates a new instance + * + * @param attributes the attributes + */ public Probe(ElementAttributes attributes) { label = attributes.get(Keys.LABEL); } diff --git a/src/main/java/de/neemann/digital/core/io/package-info.java b/src/main/java/de/neemann/digital/core/io/package-info.java new file mode 100644 index 000000000..4a522db40 --- /dev/null +++ b/src/main/java/de/neemann/digital/core/io/package-info.java @@ -0,0 +1,6 @@ +/** + * The basic IO elements like Buttons, Inputs, Outputs, LEDs + * + * @author hneemann + */ +package de.neemann.digital.core.io; diff --git a/src/main/java/de/neemann/digital/core/package-info.java b/src/main/java/de/neemann/digital/core/package-info.java index 349a29866..69318696b 100644 --- a/src/main/java/de/neemann/digital/core/package-info.java +++ b/src/main/java/de/neemann/digital/core/package-info.java @@ -8,4 +8,4 @@ * * @author hneemann */ -package de.neemann.digital.core; \ No newline at end of file +package de.neemann.digital.core;