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

org.yamcs.api.ConsoleEventProducer Maven / Gradle / Ivy

There is a newer version: 5.10.1
Show newest version
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();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy