public class DaveDevice extends AbstractConnectionDevice
AbstractConnectionDevice.ConnectionState
context, executor, id, itemFactory
Constructor and Description |
---|
DaveDevice(org.osgi.framework.BundleContext context,
String id,
Map<String,String> properties) |
Modifier and Type | Method and Description |
---|---|
void |
addBlock(String name,
AbstractRequestBlock deviceBlock) |
protected void |
configure(Map<String,String> properties) |
protected void |
configureConnector(org.apache.mina.transport.socket.nio.NioSocketConnector connector) |
ScheduledExecutorService |
getExecutor() |
String |
getId() |
String |
getItemId(String localId) |
protected void |
handleMessageReceived(org.apache.mina.core.session.IoSession session,
Object message) |
protected void |
handleSessionCreated(org.apache.mina.core.session.IoSession session) |
protected void |
handleSessionDisconnected() |
protected void |
performDispose() |
void |
removeBlock(String block) |
void |
writeBit(DaveRequestBlock block,
int index,
int subIndex,
boolean value) |
void |
writeData(DaveRequestBlock block,
int index,
byte[] data) |
checkSession, disconnect, dispose, getTimeout, getVarItemId, handleExceptionCaught, handleMessageSent, handleSessionClosed, handleSessionIdle, handleSessionOpened, setSession
public String getItemId(String localId)
getItemId
in class AbstractConnectionDevice
protected void performDispose()
performDispose
in class AbstractConnectionDevice
protected void configure(Map<String,String> properties) throws Exception
configure
in class AbstractConnectionDevice
Exception
protected void configureConnector(org.apache.mina.transport.socket.nio.NioSocketConnector connector)
configureConnector
in class AbstractConnectionDevice
public ScheduledExecutorService getExecutor()
getExecutor
in class AbstractConnectionDevice
public String getId()
public void writeBit(DaveRequestBlock block, int index, int subIndex, boolean value)
public void writeData(DaveRequestBlock block, int index, byte[] data)
public void addBlock(String name, AbstractRequestBlock deviceBlock)
public void removeBlock(String block)
protected void handleSessionCreated(org.apache.mina.core.session.IoSession session) throws Exception
handleSessionCreated
in class AbstractConnectionDevice
Exception
protected void handleSessionDisconnected()
handleSessionDisconnected
in class AbstractConnectionDevice
protected void handleMessageReceived(org.apache.mina.core.session.IoSession session, Object message) throws Exception
handleMessageReceived
in class AbstractConnectionDevice
Exception
Copyright © 2016 Eclipse NeoSCADA Project. All rights reserved.