Forráskód Böngészése

Adds first Sensor/Collector interface version

Andreas T. Meyer-Berg 5 éve
szülő
commit
c7309b83ff

+ 35 - 0
src/main/java/de/tu_darmstadt/tk/SmartHomeNetworkSim/core/devices/BoolCollector.java

@@ -0,0 +1,35 @@
+package de.tu_darmstadt.tk.SmartHomeNetworkSim.core.devices;
+
+/**
+ * Interface for collection of booleans, for example for actuators
+ *
+ * @author Andreas T. Meyer-Berg
+ */
+public interface BoolCollector {
+
+	// Information Name
+	/**
+	 * Name of the information that should be collected
+	 * @param name name of the collected information
+	 */
+	public void setFCinfoName(String name);
+	
+	/**
+	 * Return the name of the collected information
+	 * @return name of the collected information
+	 */
+	public String getFCinfoName();
+	
+	/**
+	 * Return the current value of the collector
+	 * @return value
+	 */
+	public boolean getFCval();
+	
+	/**
+	 * Set the current value of the collector
+	 * @param val new value
+	 */
+	public void setFCval(boolean val);
+
+}

+ 35 - 0
src/main/java/de/tu_darmstadt/tk/SmartHomeNetworkSim/core/devices/BoolSensor.java

@@ -0,0 +1,35 @@
+package de.tu_darmstadt.tk.SmartHomeNetworkSim.core.devices;
+
+/**
+ * Interface for bool sensors
+ *
+ * @author Andreas T. Meyer-Berg
+ */
+public interface BoolSensor {
+
+	// Information Name
+	/**
+	 * Name of the sensor reading
+	 * @param name name of the sensed information
+	 */
+	public void setBSinfoName(String name);
+	
+	/**
+	 * Return the sensor reading name
+	 * @return name of the sensed information
+	 */
+	public String getBSinfoName();
+
+	/**
+	 * Return the current value of the sensor
+	 * @return value
+	 */
+	public boolean getBSval();
+	
+	/**
+	 * Set the current value of the sensor
+	 * @param val new value
+	 */
+	public void setBSval(boolean val);
+
+}

+ 35 - 0
src/main/java/de/tu_darmstadt/tk/SmartHomeNetworkSim/core/devices/FloatCollector.java

@@ -0,0 +1,35 @@
+package de.tu_darmstadt.tk.SmartHomeNetworkSim.core.devices;
+
+/**
+ * Interface for collection of floats, for example for actuators
+ *
+ * @author Andreas T. Meyer-Berg
+ */
+public interface FloatCollector {
+
+	// Information Name
+	/**
+	 * Name of the information that should be collected
+	 * @param name name of the collected information
+	 */
+	public void setFCinfoName(String name);
+	
+	/**
+	 * Return the name of the collected information
+	 * @return name of the collected information
+	 */
+	public String getFCinfoName();
+	
+	/**
+	 * Return the current value of the collector
+	 * @return value
+	 */
+	public float getFCval();
+	
+	/**
+	 * Set the current value of the collector
+	 * @param val new value
+	 */
+	public void setFCval(long val);
+
+}

+ 59 - 0
src/main/java/de/tu_darmstadt/tk/SmartHomeNetworkSim/core/devices/FloatSensor.java

@@ -0,0 +1,59 @@
+package de.tu_darmstadt.tk.SmartHomeNetworkSim.core.devices;
+
+/**
+ * Interface for float sensors
+ *
+ * @author Andreas T. Meyer-Berg
+ */
+public interface FloatSensor {
+
+	// Information Name
+	/**
+	 * Name of the sensor reading
+	 * @param name name of the sensed information
+	 */
+	public void setFSinfoName(String name);
+	
+	/**
+	 * Return the sensor reading name
+	 * @return name of the sensed information
+	 */
+	public String getFSinfoName();
+
+	/**
+	 * Get max sensor value
+	 * @return max value
+	 */
+	public float getFSmax();
+	
+	/**
+	 * Set max sensor value
+	 * @param max new maximum value
+	 */
+	public void setFSmax(long max);
+
+	/**
+	 * Get min sensor value
+	 * @return minimum value
+	 */
+	public float getFSmin();
+	
+	/**
+	 * Set min sensor value
+	 * @param min new minimum value
+	 */
+	public void setFSmin(long min);
+	
+	/**
+	 * Return the current value of the sensor
+	 * @return value
+	 */
+	public float getFSval();
+	
+	/**
+	 * Set the current value of the sensor
+	 * @param val new value
+	 */
+	public void setFSval(long val);
+
+}

+ 5 - 0
src/main/java/de/tu_darmstadt/tk/SmartHomeNetworkSim/core/devices/package-info.java

@@ -0,0 +1,5 @@
+/**
+ * Package for different SmartDevices, such as sensors or actuators
+ * @author Andreas T. Meyer-Berg
+ */
+package de.tu_darmstadt.tk.SmartHomeNetworkSim.core.devices;