Package org.yamcs.ygw
Class YgwNodeLink
java.lang.Object
com.google.common.util.concurrent.AbstractService
org.yamcs.tctm.AbstractLink
org.yamcs.tctm.AbstractTcTmParamLink
org.yamcs.ygw.YgwNodeLink
- All Implemented Interfaces:
com.google.common.util.concurrent.Service,SystemParametersProducer,AggregatedDataLink,Link,LinkActionProvider,ParameterDataLink,TcDataLink,TmPacketDataLink
Corresponds to a Node in the Yamcs Gateway or to a sub-link (in the gateway each node can have zero or more
sub-links)
Each sub-link has an id and the node itself functions as a link with id 0
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.yamcs.tctm.Link
Link.StatusNested 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
Fields inherited from class org.yamcs.tctm.AbstractTcTmParamLink
cmdPostProcessor, commandHistoryPublisher, packetCount, packetPreprocessor, parameterCount, parameterSink, updateSimulationTimeFields inherited from class org.yamcs.tctm.AbstractLink
config, dataInCount, dataOutCount, disabled, eventProducer, LINK_NAMESPACE, linkName, log, timeService, yamcsInstance -
Constructor Summary
ConstructorsConstructorDescriptionYgwNodeLink(YgwLink ygwLink, org.yamcs.ygw.protobuf.Ygw.Node node, AggregatedDataLink parent, boolean replay) Builds an object corresponding to a gateway node.YgwNodeLink(YgwLink ygwLink, YgwNodeLink parent, org.yamcs.ygw.protobuf.Ygw.Link link, boolean replay) Builds an object corresponding to a gateway sub-link. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSublink(int linkId, YgwNodeLink nodeSublink) protected Link.Statusprotected voiddoStart()protected voiddoStop()getSublink(int linkId) voidinit(String instance, String name, YConfiguration config) booleanbooleanbooleanvoidprocessCommandAck(int linkId, org.yamcs.ygw.protobuf.Ygw.CommandAck cmdAck) voidprocessLinkStatus(int linkId, org.yamcs.ygw.protobuf.Ygw.LinkStatus lstatus) voidprocessParameters(int linkId, String group, int seqNum, List<ParameterValue> pvList) voidprocessTmFrame(int linkId, io.netty.buffer.ByteBuf buf) voidprocessTmPacket(int linkId, io.netty.buffer.ByteBuf buf) booleanbooleansendCommand(PreparedCommand pc, Integer ygwCmdId) send a commandsendTcFrame(byte[] data) Methods inherited from class org.yamcs.tctm.AbstractTcTmParamLink
ackCommand, failedCommand, getDefaultSpec, initTc, initTm, postprocess, processPacket, setCommandHistoryPublisher, setParameterSink, setTmSinkMethods inherited from class org.yamcs.tctm.AbstractLink
addAction, collectSystemParameters, dataIn, dataOut, disable, doDisable, doEnable, enable, getAction, getActions, getConfig, getCurrentTime, getDataInCount, getDataOutCount, getDetailedStatus, getEventLoop, getLinkStatus, getName, getSystemParameters, getYamcsInstance, isDisabled, isRunningAndEnabled, resetCounters, setParent, setupSystemParametersMethods inherited from class com.google.common.util.concurrent.AbstractService
addListener, awaitRunning, awaitRunning, awaitRunning, awaitTerminated, awaitTerminated, awaitTerminated, doCancelStart, failureCause, isRunning, notifyFailed, notifyStarted, notifyStopped, startAsync, state, stopAsync, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.yamcs.tctm.Link
disable, enable, getConfig, getDataInCount, getDataOutCount, getDefaultSpec, getDetailedStatus, getExtraInfo, getLinkStatus, getName, getSpec, isDisabled, isEffectivelyDisabled, resetCounters, setParent, setupSystemParametersMethods inherited from interface org.yamcs.parameter.SystemParametersProducer
getFrequencyMethods inherited from interface org.yamcs.tctm.TcDataLink
isCommandingAvailable
-
Constructor Details
-
YgwNodeLink
public YgwNodeLink(YgwLink ygwLink, org.yamcs.ygw.protobuf.Ygw.Node node, AggregatedDataLink parent, boolean replay) Builds an object corresponding to a gateway node. -
YgwNodeLink
public YgwNodeLink(YgwLink ygwLink, YgwNodeLink parent, org.yamcs.ygw.protobuf.Ygw.Link link, boolean replay) Builds an object corresponding to a gateway sub-link.If replayLink is not null, this is used for replays
-
-
Method Details
-
init
- Specified by:
initin interfaceLink- Overrides:
initin classAbstractTcTmParamLink
-
connectionStatus
- Specified by:
connectionStatusin classAbstractLink
-
doStart
protected void doStart()- Specified by:
doStartin classcom.google.common.util.concurrent.AbstractService
-
doStop
protected void doStop()- Specified by:
doStopin classcom.google.common.util.concurrent.AbstractService
-
processParameters
-
processTmPacket
public void processTmPacket(int linkId, io.netty.buffer.ByteBuf buf) -
processTmFrame
public void processTmFrame(int linkId, io.netty.buffer.ByteBuf buf) -
getSublink
-
processLinkStatus
public void processLinkStatus(int linkId, org.yamcs.ygw.protobuf.Ygw.LinkStatus lstatus) -
sendCommand
- Specified by:
sendCommandin interfaceTcDataLink
-
sendCommand
send a commandrelativeName is set for the commands registered from the gateway
-
sendTcFrame
-
processCommandAck
public void processCommandAck(int linkId, org.yamcs.ygw.protobuf.Ygw.CommandAck cmdAck) -
getParent
- Specified by:
getParentin interfaceLink- Overrides:
getParentin classAbstractLink
-
isTmPacketDataLinkImplemented
public boolean isTmPacketDataLinkImplemented()- Specified by:
isTmPacketDataLinkImplementedin interfaceTmPacketDataLink
-
isTcDataLinkImplemented
public boolean isTcDataLinkImplemented()- Specified by:
isTcDataLinkImplementedin interfaceTcDataLink
-
isParameterDataLinkImplemented
public boolean isParameterDataLinkImplemented()- Specified by:
isParameterDataLinkImplementedin interfaceParameterDataLink
-
addSublink
-
getSubLinks
- Specified by:
getSubLinksin interfaceAggregatedDataLink
-
getTmStreamName
- Specified by:
getTmStreamNamein interfaceTmPacketDataLink
-
getPpStreamName
- Specified by:
getPpStreamNamein interfaceParameterDataLink
-