public class OlcbInterface extends Object
Created by bracz on 12/27/15.
Modifier and Type | Class and Description |
---|---|
(package private) class |
OlcbInterface.MessageDispatcher |
(package private) class |
OlcbInterface.OutputConnectionSniffer
Performs local feedback of addressed and global messages.
|
private class |
OlcbInterface.QueuedOutputConnection
This class keeps an output connection operating using an internal queue.
|
Modifier and Type | Field and Description |
---|---|
private DatagramService |
dcs |
private DatagramMeteringBuffer |
dmb |
private EventTable |
eventTable |
private OlcbInterface.MessageDispatcher |
inputConnection |
protected Connection |
internalOutputConnection |
private static Logger |
log |
private MemoryConfigurationService |
mcs |
private Map<NodeID,ConfigRepresentation> |
nodeConfigs |
private NodeID |
nodeId |
private MimicNodeStore |
nodeStore |
protected Connection |
outputConnection |
private OlcbInterface.QueuedOutputConnection |
queuedOutputConnection |
private OlcbInterface.OutputConnectionSniffer |
wrappedOutputConnection |
Constructor and Description |
---|
OlcbInterface(NodeID nodeId_,
Connection outputConnection_)
Creates the message-level interface.
|
Modifier and Type | Method and Description |
---|---|
void |
flushSendQueue()
Blocks the current thread until the outgoing messages are all sent out.
|
ConfigRepresentation |
getConfigForNode(NodeID remoteNode)
Creates a new or returns a cached CDI representation for the given node.
|
DatagramMeteringBuffer |
getDatagramMeteringBuffer() |
DatagramService |
getDatagramService() |
EventTable |
getEventTable() |
Connection |
getInputConnection()
Accessor for the outside interface for arriving inbound messages.
|
MemoryConfigurationService |
getMemoryConfigurationService() |
NodeID |
getNodeId() |
MimicNodeStore |
getNodeStore() |
Connection |
getOutputConnection()
Accessor for client libraries to send messages out.
|
void |
injectMemoryConfigurationService(MemoryConfigurationService s) |
void |
registerMessageListener(Connection c) |
void |
unRegisterMessageListener(Connection c) |
private static final Logger log
protected final Connection internalOutputConnection
protected final Connection outputConnection
private final OlcbInterface.OutputConnectionSniffer wrappedOutputConnection
private final OlcbInterface.QueuedOutputConnection queuedOutputConnection
private final OlcbInterface.MessageDispatcher inputConnection
private final NodeID nodeId
private final MimicNodeStore nodeStore
private final DatagramMeteringBuffer dmb
private final DatagramService dcs
private MemoryConfigurationService mcs
private final Map<NodeID,ConfigRepresentation> nodeConfigs
private EventTable eventTable
public OlcbInterface(NodeID nodeId_, Connection outputConnection_)
nodeId_
- is the node ID for the node on this interface. Will send out a node
initialized ready with this node ID.outputConnection_
- implements the hardware interface for sending messages to the
network. Usually this is an internal object of the CanInterface.public Connection getInputConnection()
public Connection getOutputConnection()
public NodeID getNodeId()
public MimicNodeStore getNodeStore()
public DatagramService getDatagramService()
public DatagramMeteringBuffer getDatagramMeteringBuffer()
public MemoryConfigurationService getMemoryConfigurationService()
public void injectMemoryConfigurationService(MemoryConfigurationService s)
public EventTable getEventTable()
public ConfigRepresentation getConfigForNode(NodeID remoteNode)
remoteNode
- target node (on the network)public void flushSendQueue()
public void registerMessageListener(Connection c)
public void unRegisterMessageListener(Connection c)
Copyright © 2017 The OpenLCB Group. All rights reserved.