Package org.yamcs.sle.provider
Class RafServiceProvider
- java.lang.Object
-
- org.yamcs.sle.provider.RacfServiceProvider
-
- org.yamcs.sle.provider.RafServiceProvider
-
- All Implemented Interfaces:
SleService
public class RafServiceProvider extends RacfServiceProvider
-
-
Constructor Summary
Constructors Constructor Description RafServiceProvider(FrameDownlinker frameDownlinker)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidabort()Called by theSleProviderwhen the connection has been abruptly terminated.StategetState()Returns the service state.voidinit(SleProvider provider)Called at the beginning.voidprocessData(com.beanit.jasn1.ber.BerTag berTag, InputStream is)Called each time a message is received from the peer (SLE user) which cannot be processed by theSleProvider.protected voidprocessSleStopInvocation(SleStopInvocation sleStopInvocation)voidsendFrame(CcsdsTime ert, Constants.FrameQuality frameQuality, int dataLinkContinuity, byte[] data, int dataOffset, int dataLength)Called by theFrameDownlinkerto send a new frame.voidsendStatusReport()voidunbind()Called by theSleProviderwhen the user sent an UNBIND request.
-
-
-
Constructor Detail
-
RafServiceProvider
public RafServiceProvider(FrameDownlinker frameDownlinker)
-
-
Method Detail
-
init
public void init(SleProvider provider)
Description copied from interface:SleServiceCalled at the beginning. to initialize the service.
-
processData
public void processData(com.beanit.jasn1.ber.BerTag berTag, InputStream is) throws IOExceptionDescription copied from interface:SleServiceCalled each time a message is received from the peer (SLE user) which cannot be processed by theSleProvider.The messages are not necessary valid. The service can always call the
SleProvider.peerAbort()operation on the provider if it thinks the SLE user went awry.- Throws:
IOException
-
processSleStopInvocation
protected void processSleStopInvocation(SleStopInvocation sleStopInvocation)
-
sendStatusReport
public void sendStatusReport()
-
sendFrame
public void sendFrame(CcsdsTime ert, Constants.FrameQuality frameQuality, int dataLinkContinuity, byte[] data, int dataOffset, int dataLength)
Called by theFrameDownlinkerto send a new frame.- Specified by:
sendFramein classRacfServiceProvider- Parameters:
ert-frameQuality-dataLinkContinuity- from CCSDS spec:- a value of ‘–1’ shall indicate that this is the first frame after the start of production; a value of ‘0’ shall indicate that this frame is the direct successor to the last frame acquired from the space link by RAF production;
any non-zero positive value shall indicate that this frame is not the direct successor to the
last frame acquired from the space link:
a non-zero positive value further indicates an estimate of the number of frames that were missed
since the last frame acquired before this frame; -
-
- a value of ‘1’ may be used if no better estimate is available.
data - frame datadataOffset - where in the data the buffer the frame startsdataLength - the length of the frame data-
getState
public State getState()
Description copied from interface:SleServiceReturns the service state.Should be one of
State.READYorState.ACTIVE- Returns:
- the service state.
-
abort
public void abort()
Description copied from interface:SleServiceCalled by theSleProviderwhen the connection has been abruptly terminated. The Service has to do necessary cleanup operation.
-
unbind
public void unbind()
Description copied from interface:SleServiceCalled by theSleProviderwhen the user sent an UNBIND request. The provider will verify that the service is in theState.READYwhen calling this method.