Package org.yamcs.tctm.ccsds
Class AbstractTmFrameLink
java.lang.Object
com.google.common.util.concurrent.AbstractService
org.yamcs.tctm.AbstractLink
org.yamcs.tctm.ccsds.AbstractTmFrameLink
- All Implemented Interfaces:
com.google.common.util.concurrent.Service
,SystemParametersProducer
,AggregatedDataLink
,Link
,LinkActionProvider
- Direct Known Subclasses:
UdpTmFrameLink
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.yamcs.tctm.Link
Link.Status
Nested classes/interfaces inherited from interface com.google.common.util.concurrent.Service
com.google.common.util.concurrent.Service.Listener, com.google.common.util.concurrent.Service.State
-
Field Summary
Modifier and TypeFieldDescriptionprotected long
protected MasterChannelFrameHandler
protected AtomicLong
protected RawFrameDecoder
protected AtomicLong
Fields inherited from class org.yamcs.tctm.AbstractLink
config, dataInCount, dataOutCount, disabled, eventProducer, LINK_NAMESPACE, linkName, log, timeService, yamcsInstance
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns a default linkSpec
.protected void
handleFrame
(Instant ert, byte[] data, int offset, int length) sends a frame to the multiplexer, after decoding and derandomizing it (if necessary)void
init
(String instance, String name, YConfiguration config) Called at startup to initialize the link.void
Methods inherited from class org.yamcs.tctm.AbstractLink
addAction, collectSystemParameters, connectionStatus, dataIn, dataOut, disable, doDisable, doEnable, enable, getAction, getActions, getConfig, getCurrentTime, getDataInCount, getDataOutCount, getDetailedStatus, getEventLoop, getLinkStatus, getName, getParent, getSystemParameters, getYamcsInstance, isDisabled, isRunningAndEnabled, setParent, setupSystemParameters
Methods inherited from class com.google.common.util.concurrent.AbstractService
addListener, awaitRunning, awaitRunning, awaitRunning, awaitTerminated, awaitTerminated, awaitTerminated, doCancelStart, 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, getDataInCount, getDataOutCount, getDetailedStatus, getExtraInfo, getLinkStatus, getName, getParent, getSpec, isDisabled, isEffectivelyDisabled, setParent, setupSystemParameters
Methods inherited from interface org.yamcs.parameter.SystemParametersProducer
getFrequency
-
Field Details
-
subLinks
-
frameHandler
-
validFrameCount
-
invalidFrameCount
-
errFrameCount
protected long errFrameCount -
rawFrameDecoder
-
-
Constructor Details
-
AbstractTmFrameLink
public AbstractTmFrameLink()
-
-
Method Details
-
getDefaultSpec
Description copied from interface:Link
Returns a default linkSpec
. This can be used in an implementation of {Link.getSpec()
. Eventually (after a few years), it is expected to migrate this logic directly into {LinkLink.getSpec()
, rather than returning null from there. But we want to give sufficient time for links everywhere to start defining their arguments.- Specified by:
getDefaultSpec
in interfaceLink
-
init
Description copied from interface:Link
Called at startup to initialize the link.The config corresponds to the map that is under the link definition in yamcs.instance.yaml.
- Specified by:
init
in interfaceLink
- Overrides:
init
in classAbstractLink
config
- - the configuration - cannot be null (but can be empty)- Throws:
ConfigurationException
-
handleFrame
sends a frame to the multiplexer, after decoding and derandomizing it (if necessary)- Parameters:
ert
- - earth reception timedata
- - buffer containing frame dataoffset
- - offset in the buffer where the frame data startslength
- - length of the frame data
-
getSubLinks
- Specified by:
getSubLinks
in interfaceAggregatedDataLink
-
resetCounters
public void resetCounters()- Specified by:
resetCounters
in interfaceLink
- Overrides:
resetCounters
in classAbstractLink
-