|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DeviceDriverInterface
Interface that all openMUC i/o drivers have to implement. Drivers that implement this interface can be plugged into the framework
Field Summary | |
---|---|
static int |
ERROR_INVALID_MESSAGE
|
static int |
ERROR_TIMEOUT
|
static int |
IO_ERROR
|
Method Summary | |
---|---|
void |
configureInterface(java.lang.String iface,
java.lang.String configStr)
Configure the interface. |
java.util.List<ChannelInformation> |
getDeviceChannels(DeviceURI url)
Scan a device for available channels This operation is optional and my not be supported by specific drivers |
java.util.List<DeviceURI> |
getDeviceList(BusURI url)
Scan the bus for connected meters This operation is optional and my not be supported by specific drivers |
java.lang.String |
getDriverID()
|
java.util.List<java.lang.String> |
getSupportedOperations()
Get a list of supported operations by the driver. |
void |
readDeviceAsync(DeviceURI url,
java.util.List<ChannelIdentifier> channels,
DataReceivedListener callback,
java.lang.Object handle)
|
java.util.List<Measurement> |
readDeviceSync(DeviceURI url,
java.util.List<ChannelIdentifier> channels)
|
void |
writeChannel(DeviceURI url,
ChannelIdentifier channel,
double value)
Write a channel/register on connected meter / device / i/o |
Field Detail |
---|
static final int ERROR_TIMEOUT
static final int ERROR_INVALID_MESSAGE
static final int IO_ERROR
Method Detail |
---|
void configureInterface(java.lang.String iface, java.lang.String configStr) throws NoSuchInterfaceException, MethodNotImplementedException, java.io.IOException
iface
- Interface descriptor. E.g. com1 for "/dev/ttyS0" usb1 for
"/dev/ttyUSB0"configStr
- Configuration data for interface e.g. "setting=2400-7N1"
mbus:com1:p1?setting=2400-7N1
NoSuchInterfaceException
- if the interface is not present
MethodNotImplementedException
- if method is not implemented by driver
java.io.IOException
java.util.List<java.lang.String> getSupportedOperations()
java.lang.String getDriverID()
java.util.List<DeviceURI> getDeviceList(BusURI url) throws MethodNotImplementedException, java.io.IOException
url
-
MethodNotImplementedException
- if method is not implemented by driver
java.io.IOException
java.util.List<ChannelInformation> getDeviceChannels(DeviceURI url) throws MethodNotImplementedException, java.io.IOException
url
-
MethodNotImplementedException
- if method is not implemented by driver
java.io.IOException
void readDeviceAsync(DeviceURI url, java.util.List<ChannelIdentifier> channels, DataReceivedListener callback, java.lang.Object handle) throws MethodNotImplementedException
url
- URL of the devicechannels
- List of channels to readout. If channels == null all channels
will be read.callback
- Callback object if task finished or error/timeout occured.
MethodNotImplementedException
- if method is not implemented by driver
java.io.IOException
java.util.List<Measurement> readDeviceSync(DeviceURI url, java.util.List<ChannelIdentifier> channels) throws MethodNotImplementedException, java.io.IOException
url
- channels
-
MethodNotImplementedException
- if method is not implemented by driver
java.io.IOException
void writeChannel(DeviceURI url, ChannelIdentifier channel, double value) throws MethodNotImplementedException, java.io.IOException
url
- - URL of the device in a driver specific formatchannel
- - channel to write tovalue
- - value to write to register
MethodNotImplementedException
- if method is not implemented by driver
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |