public class ModbusMaster extends AbstractConnectionDevice
AbstractConnectionDevice.ConnectionState
context, executor, id, itemFactory
Constructor and Description |
---|
ModbusMaster(BundleContext context,
String id,
ScheduledExecutorService executor,
NioProcessor processor,
String threadPrefix,
String itemPrefix) |
Modifier and Type | Method and Description |
---|---|
void |
addSlave(ModbusSlave slave) |
protected void |
configure(Map<String,String> properties) |
protected void |
configureConnector(NioSocketConnector connector) |
static ModbusMaster |
create(BundleContext context,
ScheduledExecutorService executor,
String id,
NioProcessor processor,
Map<String,String> parameters) |
String |
getId() |
JobManager |
getJobManager() |
String |
getName() |
protected void |
handleExceptionCaught(IoSession session,
Throwable error) |
protected void |
handleMessageReceived(IoSession session,
Object message) |
protected void |
handleSessionClosed(IoSession session) |
protected void |
handleSessionCreated(IoSession session) |
protected void |
handleSessionOpened(IoSession session) |
void |
removeSlave(ModbusSlave slave) |
checkSession, disconnect, dispose, getExecutor, getItemId, getTimeout, getVarItemId, handleMessageSent, handleSessionDisconnected, handleSessionIdle, performDispose, setSession
public ModbusMaster(BundleContext context, String id, ScheduledExecutorService executor, NioProcessor processor, String threadPrefix, String itemPrefix)
public static ModbusMaster create(BundleContext context, ScheduledExecutorService executor, String id, NioProcessor processor, Map<String,String> parameters) throws Exception
Exception
public JobManager getJobManager()
protected void configure(Map<String,String> properties) throws Exception
configure
in class AbstractConnectionDevice
Exception
protected void configureConnector(NioSocketConnector connector)
configureConnector
in class AbstractConnectionDevice
public void addSlave(ModbusSlave slave)
public void removeSlave(ModbusSlave slave)
public String getId()
public String getName()
protected void handleSessionCreated(IoSession session) throws Exception
handleSessionCreated
in class AbstractConnectionDevice
Exception
protected void handleSessionOpened(IoSession session) throws Exception
handleSessionOpened
in class AbstractConnectionDevice
Exception
protected void handleMessageReceived(IoSession session, Object message) throws Exception
handleMessageReceived
in class AbstractConnectionDevice
Exception
protected void handleExceptionCaught(IoSession session, Throwable error) throws Exception
handleExceptionCaught
in class AbstractConnectionDevice
Exception
protected void handleSessionClosed(IoSession session) throws Exception
handleSessionClosed
in class AbstractConnectionDevice
Exception