changed the IIO
This commit is contained in:
parent
321707368f
commit
accf9b02b7
@ -1,8 +1,19 @@
|
||||
package com.example.aped.communication;
|
||||
|
||||
public interface IIO {
|
||||
public interface IIO
|
||||
{
|
||||
/**
|
||||
* reads a value from a device connected to the raspberry
|
||||
* @param deviceName the name of the device to read from
|
||||
* @return the value read
|
||||
*/
|
||||
String read(String deviceName);
|
||||
|
||||
public Object read(String deviceName);
|
||||
|
||||
public Object write(String deviceName, Object value);
|
||||
/**
|
||||
* writes a value to a device connected to the raspberry
|
||||
* @param deviceName the name of the device to write to
|
||||
* @param value the value to write to the device
|
||||
* @return the value written
|
||||
*/
|
||||
String write(String deviceName, String value);
|
||||
}
|
||||
|
@ -3,12 +3,12 @@ package com.example.aped.communication;
|
||||
public class TestIO implements IIO {
|
||||
|
||||
@Override
|
||||
public Object read(String deviceName) {
|
||||
return new String("test");
|
||||
public String read(String deviceName) {
|
||||
return "test";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object write(String deviceName, Object value) {
|
||||
public String write(String deviceName, String value) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user