public class TcpTcDataLink extends com.google.common.util.concurrent.AbstractService implements Runnable, TcDataLink, SystemParametersProducer
| Modifier and Type | Class and Description |
|---|---|
class |
TcpTcDataLink.TcAckStatus |
| Modifier and Type | Field and Description |
|---|---|
protected CommandHistoryPublisher |
commandHistoryListener |
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() |
String |
getLinkStatus()
Returns one of "OK" or "UNAVAIL".
|
int |
getMiniminimumTcPacketLength() |
Collection<Pvalue.ParameterValue> |
getSystemParameters() |
protected void |
handleAcks(Commanding.CommandId cmdId,
int seqCount) |
boolean |
isDisabled() |
protected boolean |
isSocketOpen()
we check if the socket is open by trying a select on the read part of it
|
static void |
main(String[] argv) |
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 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 TcDataLinkprotected void handleAcks(Commanding.CommandId cmdId, int seqCount)
public void setCommandHistoryPublisher(CommandHistoryPublisher commandHistoryListener)
setCommandHistoryPublisher in interface TcDataLinkpublic String 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 static void main(String[] argv) throws ConfigurationException, InterruptedException
public long getDataCount()
getDataCount in interface Linkprotected void setupSysVariables()
public Collection<Pvalue.ParameterValue> getSystemParameters()
getSystemParameters in interface SystemParametersProducerpublic int getMiniminimumTcPacketLength()
Copyright © 2017 Space Applications Services. All rights reserved.