public class TcpTcDataLink extends com.google.common.util.concurrent.AbstractService implements Runnable, TcDataLink, SystemParametersProducer
Link.Status| Modifier and Type | Field and Description |
|---|---|
protected CommandHistoryPublisher |
commandHistoryListener |
protected BlockingQueue<PreparedCommand> |
commandQueue |
protected boolean |
disabled |
protected String |
host |
protected org.slf4j.Logger |
log |
protected int |
port |
protected Selector |
selector |
protected SocketChannel |
socketChannel |
protected long |
tcCount |
protected ScheduledThreadPoolExecutor |
timer |
| Constructor and Description |
|---|
TcpTcDataLink(String yamcsInstance,
String name,
Map<String,Object> config) |
TcpTcDataLink(String yamcsInstance,
String name,
String spec) |
| Modifier and Type | Method and Description |
|---|---|
void |
disable()
Disable any data I/O through this link.
|
protected void |
disconnect() |
protected void |
doStart() |
void |
doStop() |
void |
enable()
Reenable the data transit if disabled by the disable() method.
|
protected long |
getCurrentTime() |
long |
getDataCount() |
String |
getDetailedStatus() |
Link.Status |
getLinkStatus()
Returns the current link status.
|
Collection<ParameterValue> |
getSystemParameters()
return the next bunch of parameter values.
|
protected void |
initPostprocessor(String instance,
Map<String,Object> args) |
boolean |
isDisabled() |
protected boolean |
openSocket()
attempts to open the socket if not alreayd open and returns true if its open at the end of the call
|
void |
run() |
void |
sendTc(PreparedCommand pc)
Sends
|
void |
setCommandHistoryPublisher(CommandHistoryPublisher commandHistoryListener) |
protected void |
setupSysVariables() |
addListener, awaitRunning, awaitRunning, awaitTerminated, awaitTerminated, failureCause, isRunning, notifyFailed, notifyStarted, notifyStopped, startAsync, state, stopAsync, toStringprotected SocketChannel socketChannel
protected String host
protected int port
protected CommandHistoryPublisher commandHistoryListener
protected Selector selector
protected ScheduledThreadPoolExecutor timer
protected volatile boolean disabled
protected BlockingQueue<PreparedCommand> commandQueue
protected volatile long tcCount
protected final org.slf4j.Logger log
public TcpTcDataLink(String yamcsInstance, String name, Map<String,Object> config) throws ConfigurationException
ConfigurationExceptionpublic TcpTcDataLink(String yamcsInstance, String name, String spec) throws ConfigurationException
ConfigurationExceptionprotected long getCurrentTime()
protected void doStart()
doStart in class com.google.common.util.concurrent.AbstractServiceprotected boolean openSocket()
protected void disconnect()
public void sendTc(PreparedCommand pc)
sendTc in interface TcDataLinkpublic void setCommandHistoryPublisher(CommandHistoryPublisher commandHistoryListener)
setCommandHistoryPublisher in interface TcDataLinkpublic Link.Status getLinkStatus()
LinkgetLinkStatus in interface Linkpublic String getDetailedStatus()
getDetailedStatus in interface Linkpublic void disable()
Linkpublic void enable()
Linkpublic boolean isDisabled()
isDisabled in interface Linkpublic void doStop()
doStop in class com.google.common.util.concurrent.AbstractServicepublic long getDataCount()
getDataCount in interface Linkprotected void setupSysVariables()
public Collection<ParameterValue> getSystemParameters()
SystemParametersProducergetSystemParameters in interface SystemParametersProducerCopyright © 2018 Space Applications Services. All rights reserved.