Class CltuServiceProvider
- java.lang.Object
-
- org.yamcs.sle.provider.CltuServiceProvider
-
- All Implemented Interfaces:
SleService
public class CltuServiceProvider extends Object implements SleService
Implementation for the CCSDS RECOMMENDED STANDARD FOR SLE FCLTU SERVICE CCSDS 912.1-B-4 August 2016https://public.ccsds.org/Pubs/912x1b4.pdf
This class implements queueing for CLTUs and it relies on a
CltuUplinkerto uplink the CLTUs one by one.Due to the java 8 limitations the uplink of the timed CLTUs (those with a defined earliestTransmissionTime) is not very precise - with the current implementation it will be probably sent 1-2 milliseconds later than the time specified. If better precision is required, this has to be changed to send the CLTU a few milliseconds in advance together with the time and the
CltuUplinkershould take care of the exact transmission start.In any case the
CltuUplinkerhas to return the time when the CLTU has been eventually radiated.- Author:
- nm
-
-
Constructor Summary
Constructors Constructor Description CltuServiceProvider(CltuUplinker cltuUplinker)
-
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 server)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)voidsendStatusReport()voidunbind()Called by theSleProviderwhen the user sent an UNBIND request.
-
-
-
Constructor Detail
-
CltuServiceProvider
public CltuServiceProvider(CltuUplinker cltuUplinker)
-
-
Method Detail
-
init
public void init(SleProvider server)
Description copied from interface:SleServiceCalled at the beginning. to initialize the service.- Specified by:
initin interfaceSleService
-
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.- Specified by:
processDatain interfaceSleService- Throws:
IOException
-
processSleStopInvocation
protected void processSleStopInvocation(SleStopInvocation sleStopInvocation)
-
sendStatusReport
public void sendStatusReport()
- Specified by:
sendStatusReportin interfaceSleService
-
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.- Specified by:
abortin interfaceSleService
-
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.- Specified by:
unbindin interfaceSleService
-
getState
public State getState()
Description copied from interface:SleServiceReturns the service state.Should be one of
State.READYorState.ACTIVE- Specified by:
getStatein interfaceSleService- Returns:
- the service state.
-
-