public class TcpTcDataLink extends com.google.common.util.concurrent.AbstractService implements Runnable, TcDataLink, SystemParametersProducer
| Modifier and Type | Class and Description |
|---|---|
class |
TcpTcDataLink.TcAckStatus |
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 |
minimumTcPacketLength |
protected int |
port |
protected Selector |
selector |
protected CcsdsSeqAndChecksumFiller |
seqAndChecksumFiller |
protected SocketChannel |
socketChannel |
protected long |
tcCount |
protected ScheduledThreadPoolExecutor |
timer |
| Modifier | Constructor and Description |
|---|---|
protected |
TcpTcDataLink() |
|
TcpTcDataLink(String host,
int port) |
|
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.
|
int |
getMiniminimumTcPacketLength() |
Collection<ParameterValue> |
getSystemParameters()
return the next bunch of parameter values.
|
boolean |
isDisabled() |
protected boolean |
isSocketOpen()
we check if the socket is open by trying a select on the read part of it
|
protected void |
openSocket() |
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 CcsdsSeqAndChecksumFiller seqAndChecksumFiller
protected ScheduledThreadPoolExecutor timer
protected volatile boolean disabled
protected int minimumTcPacketLength
protected BlockingQueue<PreparedCommand> commandQueue
protected volatile long tcCount
protected final org.slf4j.Logger log
public TcpTcDataLink(String yamcsInstance, String name, String spec) throws ConfigurationException
ConfigurationExceptionprotected TcpTcDataLink()
public TcpTcDataLink(String host, int port)
protected long getCurrentTime()
protected void doStart()
doStart in class com.google.common.util.concurrent.AbstractServiceprotected void openSocket()
protected void disconnect()
protected boolean isSocketOpen()
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 SystemParametersProducerpublic int getMiniminimumTcPacketLength()
Copyright © 2018 Space Applications Services. All rights reserved.