Added dummy RPi dummy classes
Former-commit-id: 9bb5b35bf11b09dcb5b1328279f228b443d910f8
This commit is contained in:
parent
5f55b5da65
commit
0821be8ae9
3 changed files with 82 additions and 0 deletions
40
src/se/hal/plugin/localsensor/RPiController.java
Executable file
40
src/se/hal/plugin/localsensor/RPiController.java
Executable file
|
|
@ -0,0 +1,40 @@
|
||||||
|
package se.hal.plugin.localsensor;
|
||||||
|
|
||||||
|
import se.hal.intf.HalSensor;
|
||||||
|
import se.hal.intf.HalSensorController;
|
||||||
|
import se.hal.intf.HalSensorReportListener;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by ezivkoc on 2016-01-14.
|
||||||
|
*/
|
||||||
|
public class RPiController implements HalSensorController {
|
||||||
|
@Override
|
||||||
|
public void initialize() throws Exception {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void register(HalSensor sensor) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deregister(HalSensor sensor) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int size() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setListener(HalSensorReportListener listener) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void close() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
35
src/se/hal/plugin/localsensor/RPiSensor.java
Executable file
35
src/se/hal/plugin/localsensor/RPiSensor.java
Executable file
|
|
@ -0,0 +1,35 @@
|
||||||
|
package se.hal.plugin.localsensor;
|
||||||
|
|
||||||
|
import se.hal.intf.HalSensor;
|
||||||
|
import se.hal.intf.HalSensorController;
|
||||||
|
import se.hal.struct.PowerConsumptionSensor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by ezivkoc on 2016-01-14.
|
||||||
|
*/
|
||||||
|
public class RPiSensor implements PowerConsumptionSensor {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long getTimestamp() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public double getData() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AggregationMethod getAggregationMethod() {
|
||||||
|
return AggregationMethod.SUM;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Class<? extends HalSensorController> getSensorController() {
|
||||||
|
return RPiController.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean equals(Object obj){
|
||||||
|
return obj == this;
|
||||||
|
}
|
||||||
|
}
|
||||||
7
src/se/hal/plugin/localsensor/plugin.json
Executable file
7
src/se/hal/plugin/localsensor/plugin.json
Executable file
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"version": 1.0,
|
||||||
|
"name": "RPiImpulsCountSensor",
|
||||||
|
"interfaces": [
|
||||||
|
{"se.hal.intf.HalSensor": "se.hal.plugin.localsensor.RPiSensor"}
|
||||||
|
]
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue