All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.yamcs.sle.api.AbstractSleApi Maven / Gradle / Ivy

Go to download

Data links for connecting Yamcs to SLE (Space Link Extension) providers such as Ground Stations

There is a newer version: 1.6.0
Show newest version
package org.yamcs.sle.api;

import com.google.protobuf.Descriptors.MethodDescriptor;
import com.google.protobuf.Descriptors.ServiceDescriptor;
import com.google.protobuf.Empty;
import com.google.protobuf.Message;
import org.yamcs.api.Api;
import org.yamcs.api.Observer;

// @javax.annotation.processing.Generated(value = "org.yamcs.protoc.ServiceGenerator", date = "2021-02-17T21:24:14.127Z")
@SuppressWarnings("unchecked")
public abstract class AbstractSleApi implements Api {

    /**
     * 
     *  Request Offline Data
     * 
*/ public abstract void requestOfflineData(T ctx, RequestOfflineDataRequest request, Observer observer); @Override public final ServiceDescriptor getDescriptorForType() { return SleProto.getDescriptor().getServices().get(0); } @Override public final Message getRequestPrototype(MethodDescriptor method) { if (method.getService() != getDescriptorForType()) { throw new IllegalArgumentException("Method not contained by this service."); } switch (method.getIndex()) { case 0: return RequestOfflineDataRequest.getDefaultInstance(); default: throw new IllegalStateException(); } } @Override public final Message getResponsePrototype(MethodDescriptor method) { if (method.getService() != getDescriptorForType()) { throw new IllegalArgumentException("Method not contained by this service."); } switch (method.getIndex()) { case 0: return Empty.getDefaultInstance(); default: throw new IllegalStateException(); } } @Override public final void callMethod(MethodDescriptor method, T ctx, Message request, Observer future) { if (method.getService() != getDescriptorForType()) { throw new IllegalArgumentException("Method not contained by this service."); } switch (method.getIndex()) { case 0: requestOfflineData(ctx, (RequestOfflineDataRequest) request, (Observer)(Object) future); return; default: throw new IllegalStateException(); } } @Override public final Observer callMethod(MethodDescriptor method, T ctx, Observer future) { if (method.getService() != getDescriptorForType()) { throw new IllegalArgumentException("Method not contained by this service."); } switch (method.getIndex()) { default: throw new IllegalStateException(); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy