org.openmuc.metering.driver.manager
Class MeterDriverManagerImpl

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

public class MeterDriverManagerImpl
extends java.lang.Object
implements DeviceDriverManager


Constructor Summary
MeterDriverManagerImpl()
           
 
Method Summary
 java.util.List<DeviceURI> getConnectedDevices(BusURI url)
          Gets a list of connected Devices to this busURL
 java.util.List<ChannelInformation> getDeviceChannels(DeviceURI url)
          Gets 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 readMeterData request to the appropriate 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MeterDriverManagerImpl

public MeterDriverManagerImpl()
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 readMeterData request to the appropriate 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
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
Gets a list of connected Devices to this busURL

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
Gets 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