com.eurotech.framework.protocol.modbus
Class ModbusProtocolDeviceAcquisitionImpl

java.lang.Object
  extended by com.eurotech.framework.protocol.modbus.ModbusProtocolDeviceAcquisitionImpl
All Implemented Interfaces:
ModbusProtocolDeviceAcquisitionService

public class ModbusProtocolDeviceAcquisitionImpl
extends Object
implements ModbusProtocolDeviceAcquisitionService


Field Summary
 
Fields inherited from interface com.eurotech.framework.protocol.modbus.ModbusProtocolDeviceAcquisitionService
SERVICE_NAME
 
Constructor Summary
ModbusProtocolDeviceAcquisitionImpl()
           
 
Method Summary
protected  void activate(org.osgi.service.component.ComponentContext componentContext)
           
protected  void deactivate(org.osgi.service.component.ComponentContext componentContext)
           
 ModbusProtocolDevice getProtocolDevice(String protocol)
          Gets the desired protocol interface if available.
 ModbusProtocolDevice getProtocolDevice(String protocol, Properties configureProtocol, Properties configureConnection, Properties configureDataMap)
          Gets the desired protocol interface if available and configures the interface.
 void setConnectionFactory(org.osgi.service.io.ConnectionFactory connectionFactory)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModbusProtocolDeviceAcquisitionImpl

public ModbusProtocolDeviceAcquisitionImpl()
Method Detail

setConnectionFactory

public void setConnectionFactory(org.osgi.service.io.ConnectionFactory connectionFactory)
Specified by:
setConnectionFactory in interface ModbusProtocolDeviceAcquisitionService

activate

protected void activate(org.osgi.service.component.ComponentContext componentContext)

deactivate

protected void deactivate(org.osgi.service.component.ComponentContext componentContext)

getProtocolDevice

public ModbusProtocolDevice getProtocolDevice(String protocol)
                                       throws ModbusProtocolException
Description copied from interface: ModbusProtocolDeviceAcquisitionService
Gets the desired protocol interface if available. Search all installed field device protocols for a name matching the protocol.

Specified by:
getProtocolDevice in interface ModbusProtocolDeviceAcquisitionService
Parameters:
protocol - 'toString' name of desired protocol
Returns:
ProtocolDevice implementation of the selected protocol, ready to connect and use
Throws:
ModbusProtocolException

getProtocolDevice

public ModbusProtocolDevice getProtocolDevice(String protocol,
                                              Properties configureProtocol,
                                              Properties configureConnection,
                                              Properties configureDataMap)
                                       throws ModbusProtocolException
Description copied from interface: ModbusProtocolDeviceAcquisitionService
Gets the desired protocol interface if available and configures the interface. Search all installed field device protocols for a name matching the protocol, if found then attempt to configure the protocol.

Specified by:
getProtocolDevice in interface ModbusProtocolDeviceAcquisitionService
Parameters:
protocol - 'toString' name of desired protocol
configureProtocol - key/value paring directly from configuration file or may be generated.
configureConnection - key/value paring directly from configuration file or may be generated.
configureDataMap - key/value paring directly from configuration file or may be generated. Not all protocols require this configuration, this Dictionary may be null. If the selected protocol does require this configuration, a null Dictionary will cause the protocol to not configure and will throw a ProtocolConfigurationInvalidException.
Returns:
ProtocolDevice implementation of the selected protocol, ready to connect and use
Throws:
ModbusProtocolException


Copyright © 2013. All Rights Reserved.