com.eurotech.framework.protocol.modbus
Interface ModbusProtocolDeviceAcquisitionService

All Known Implementing Classes:
ModbusProtocolDeviceAcquisitionImpl

public interface ModbusProtocolDeviceAcquisitionService


Field Summary
static String SERVICE_NAME
          Reports the class name representing this interface.
 
Method Summary
 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 m_connectionFactory)
           
 

Field Detail

SERVICE_NAME

static final String SERVICE_NAME
Reports the class name representing this interface.

Method Detail

getProtocolDevice

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

Parameters:
protocol - 'toString' name of desired protocol
Returns:
ProtocolDevice implementation of the selected protocol, ready to connect and use
Throws:
ModbusProtocolException(NOT_AVAILABLE) - the selected protocol is not installed in this system
ModbusProtocolException

getProtocolDevice

ModbusProtocolDevice getProtocolDevice(String protocol,
                                       Properties configureProtocol,
                                       Properties configureConnection,
                                       Properties configureDataMap)
                                       throws ModbusProtocolException
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.

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(NOT_AVAILABLE) - the selected protocol is not installed in this system
ModbusProtocolException(INVALID_CONFIGURATION) - one of the configurations is invalid or a required configuration is missing
ModbusProtocolException

setConnectionFactory

void setConnectionFactory(org.osgi.service.io.ConnectionFactory m_connectionFactory)


Copyright © 2013. All Rights Reserved.