com.eurotech.framework.protocol.modbus
Class ModbusProtocolDeviceAcquisitionImpl
java.lang.Object
com.eurotech.framework.protocol.modbus.ModbusProtocolDeviceAcquisitionImpl
- All Implemented Interfaces:
- ModbusProtocolDeviceAcquisitionService
public class ModbusProtocolDeviceAcquisitionImpl
- extends Object
- implements ModbusProtocolDeviceAcquisitionService
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ModbusProtocolDeviceAcquisitionImpl
public ModbusProtocolDeviceAcquisitionImpl()
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 protocolconfigureProtocol
- 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.