Package org.yamcs.tctm.ccsds
Class AbstractTcFrameLink
- java.lang.Object
-
- com.google.common.util.concurrent.AbstractService
-
- org.yamcs.tctm.AbstractLink
-
- org.yamcs.tctm.ccsds.AbstractTcFrameLink
-
- All Implemented Interfaces:
com.google.common.util.concurrent.Service,SystemParametersProducer,AggregatedDataLink,Link,TcDataLink
- Direct Known Subclasses:
UdpTcFrameLink
public abstract class AbstractTcFrameLink extends AbstractLink implements AggregatedDataLink, TcDataLink
Sends TC as TC frames (CCSDS 232.0-B-3) or TC frames embedded in CLTU (CCSDS 231.0-B-3).
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.yamcs.tctm.Link
Link.Status
-
-
Field Summary
Fields Modifier and Type Field Description protected CltuGeneratorcltuGeneratorprotected CommandHistoryPublishercommandHistoryPublisherprotected intframeCountprotected MasterChannelFrameMultiplexermultiplexer-
Fields inherited from class org.yamcs.tctm.AbstractLink
config, disabled, eventProducer, linkName, log, timeService, yamcsInstance
-
-
Constructor Summary
Constructors Constructor Description AbstractTcFrameLink()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidackBypassFrame(TcTransferFrame tf)Ack the BD frames Note: the AD frames are acknowledged in the when the COP1 ack is receivedprotected voidfailBypassFrame(TcTransferFrame tf, String reason)longgetDataInCount()longgetDataOutCount()List<Link>getSubLinks()voidinit(String yamcsInstance, String linkName, YConfiguration config)Called at startup to initialize the link.voidresetCounters()voidsendTc(PreparedCommand preparedCommand)voidsetCommandHistoryPublisher(CommandHistoryPublisher commandHistoryPublisher)-
Methods inherited from class org.yamcs.tctm.AbstractLink
collectSystemParameters, connectionStatus, disable, doDisable, doEnable, enable, getConfig, getCurrentTime, getDetailedStatus, getEventLoop, getLinkStatus, getName, getSystemParameters, isDisabled, isRunningAndEnabled, setupSystemParameters
-
Methods inherited from class com.google.common.util.concurrent.AbstractService
addListener, awaitRunning, awaitRunning, awaitTerminated, awaitTerminated, doStart, doStop, failureCause, isRunning, notifyFailed, notifyStarted, notifyStopped, startAsync, state, stopAsync, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.yamcs.tctm.Link
disable, enable, getConfig, getDetailedStatus, getLinkStatus, getName, getParent, getSpec, isDisabled, setParent, setupSystemParameters
-
-
-
-
Field Detail
-
frameCount
protected int frameCount
-
multiplexer
protected MasterChannelFrameMultiplexer multiplexer
-
commandHistoryPublisher
protected CommandHistoryPublisher commandHistoryPublisher
-
cltuGenerator
protected CltuGenerator cltuGenerator
-
-
Method Detail
-
init
public void init(String yamcsInstance, String linkName, YConfiguration config)
Description copied from interface:LinkCalled at startup to initialize the link.The config corresponds to the map that is under the link definition in yamcs.instance.yaml.
- Specified by:
initin interfaceLink- Overrides:
initin classAbstractLinkconfig- - the configuration - cannot be null (but can be empty)
-
getDataInCount
public long getDataInCount()
- Specified by:
getDataInCountin interfaceLink
-
getDataOutCount
public long getDataOutCount()
- Specified by:
getDataOutCountin interfaceLink
-
resetCounters
public void resetCounters()
- Specified by:
resetCountersin interfaceLink
-
getSubLinks
public List<Link> getSubLinks()
- Specified by:
getSubLinksin interfaceAggregatedDataLink
-
setCommandHistoryPublisher
public void setCommandHistoryPublisher(CommandHistoryPublisher commandHistoryPublisher)
- Specified by:
setCommandHistoryPublisherin interfaceTcDataLink
-
sendTc
public void sendTc(PreparedCommand preparedCommand)
- Specified by:
sendTcin interfaceTcDataLink
-
ackBypassFrame
protected void ackBypassFrame(TcTransferFrame tf)
Ack the BD frames Note: the AD frames are acknowledged in the when the COP1 ack is received- Parameters:
tf-
-
failBypassFrame
protected void failBypassFrame(TcTransferFrame tf, String reason)
-
-