org.yamcs.sle.SlePlugin Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of yamcs-sle Show documentation
Show all versions of yamcs-sle Show documentation
Data links for connecting Yamcs to SLE (Space Link Extension) providers such as Ground Stations
package org.yamcs.sle;
import java.io.IOException;
import java.io.InputStream;
import org.yamcs.Plugin;
import org.yamcs.PluginException;
import org.yamcs.YConfiguration;
import org.yamcs.YamcsServer;
import org.yamcs.http.HttpServer;
public class SlePlugin implements Plugin {
@Override
public void onLoad(YConfiguration config) throws PluginException {
HttpServer httpServer = YamcsServer.getServer().getGlobalServices(HttpServer.class).get(0);
try (InputStream in = getClass().getResourceAsStream("/yamcs-sle.protobin")) {
httpServer.getProtobufRegistry().importDefinitions(in);
} catch (IOException e) {
throw new PluginException(e);
}
httpServer.addApi(new SleApi());
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy