org.yamcs.api.ConsoleEventProducer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of yamcs-api Show documentation
Show all versions of yamcs-api Show documentation
Used by external clients to communicate with Yamcs
package org.yamcs.api;
import org.yamcs.protobuf.Yamcs.Event;
import org.yamcs.utils.TimeEncoding;
/**
* prints all the events to the console (to be used by unit tests)
*
* @author nm
*
*/
public class ConsoleEventProducer extends AbstractEventProducer {
public ConsoleEventProducer() {
this.logAllMessages = false;
}
@Override
public void sendEvent(Event event) {
System.out.println(event);
}
@Override
public void close() {
}
@Override
public long getMissionTime() {
return TimeEncoding.getWallclockTime();
}
}