org.openmuc.metering.driver.manager
Class DriverManagerImpl

java.lang.Object
  extended by org.openmuc.metering.driver.manager.DriverManagerImpl
All Implemented Interfaces:
DeviceDriverManager

public class DriverManagerImpl
extends java.lang.Object
implements DeviceDriverManager


Constructor Summary
DriverManagerImpl()
           
 
Method Summary
 java.util.List<DeviceURI> getConnectedDevices(BusURI url)
          Returns a list of connected Devices to this busURI
 java.util.List<ChannelInformation> getDeviceChannels(DeviceURI url)
          Returns a List of Channels for a given Device.
 void readDeviceAsync(DeviceURI url, java.util.List<ChannelIdentifier> registers, DataReceivedListener callback, java.lang.Object handle)
          Delegates a readDeviceAsync request to the appropriate communication driver
 java.util.List<Measurement> readDeviceSync(DeviceURI url, java.util.List<ChannelIdentifier> channels)
          Immediately reads a Device and returns measured Results
 void registerDriver(DeviceDriverInterface driver, java.lang.String driverID)
           
 void unregisterDriver(DeviceDriverInterface driver)
           
 void writeChannel(DeviceURI url, ChannelIdentifier register, double value)
          Delegates a writeChannel request for the given channel and value to the appropriate communication driver.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DriverManagerImpl

public DriverManagerImpl()
Method Detail

registerDriver

public void registerDriver(DeviceDriverInterface driver,
                           java.lang.String driverID)

unregisterDriver

public void unregisterDriver(DeviceDriverInterface driver)

readDeviceAsync

public void readDeviceAsync(DeviceURI url,
                            java.util.List<ChannelIdentifier> registers,
                            DataReceivedListener callback,
                            java.lang.Object handle)
                     throws NoSuchDriverException
Description copied from interface: DeviceDriverManager
Delegates a readDeviceAsync request to the appropriate communication driver

Specified by:
readDeviceAsync in interface DeviceDriverManager
Throws:
NoSuchDriverException

writeChannel

public void writeChannel(DeviceURI url,
                         ChannelIdentifier register,
                         double value)
                  throws NoSuchDriverException,
                         MethodNotImplementedException,
                         java.io.IOException
Description copied from interface: DeviceDriverManager
Delegates a writeChannel request for the given channel and value to the appropriate communication driver.

Specified by:
writeChannel in interface DeviceDriverManager
Throws:
NoSuchDriverException
MethodNotImplementedException
java.io.IOException

getConnectedDevices

public java.util.List<DeviceURI> getConnectedDevices(BusURI url)
                                              throws MethodNotImplementedException,
                                                     NoSuchDriverException,
                                                     java.io.IOException
Description copied from interface: DeviceDriverManager
Returns a list of connected Devices to this busURI

Specified by:
getConnectedDevices in interface DeviceDriverManager
Throws:
MethodNotImplementedException
NoSuchDriverException
java.io.IOException

getDeviceChannels

public java.util.List<ChannelInformation> getDeviceChannels(DeviceURI url)
                                                     throws MethodNotImplementedException,
                                                            NoSuchDriverException,
                                                            java.io.IOException
Description copied from interface: DeviceDriverManager
Returns a List of Channels for a given Device.

Specified by:
getDeviceChannels in interface DeviceDriverManager
Throws:
MethodNotImplementedException
NoSuchDriverException
java.io.IOException

readDeviceSync

public java.util.List<Measurement> readDeviceSync(DeviceURI url,
                                                  java.util.List<ChannelIdentifier> channels)
                                           throws MethodNotImplementedException,
                                                  java.io.IOException
Description copied from interface: DeviceDriverManager
Immediately reads a Device and returns measured Results

Specified by:
readDeviceSync in interface DeviceDriverManager
Throws:
MethodNotImplementedException
java.io.IOException