public class ModbusMaster extends AbstractConnectionDevice
AbstractConnectionDevice.ConnectionStatecontext, 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, setSessionpublic 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
Exceptionpublic JobManager getJobManager()
protected void configure(Map<String,String> properties) throws Exception
configure in class AbstractConnectionDeviceExceptionprotected void configureConnector(NioSocketConnector connector)
configureConnector in class AbstractConnectionDevicepublic 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 AbstractConnectionDeviceExceptionprotected void handleSessionOpened(IoSession session) throws Exception
handleSessionOpened in class AbstractConnectionDeviceExceptionprotected void handleMessageReceived(IoSession session, Object message) throws Exception
handleMessageReceived in class AbstractConnectionDeviceExceptionprotected void handleExceptionCaught(IoSession session, Throwable error) throws Exception
handleExceptionCaught in class AbstractConnectionDeviceExceptionprotected void handleSessionClosed(IoSession session) throws Exception
handleSessionClosed in class AbstractConnectionDeviceException