37 lines
794 B
Java
37 lines
794 B
Java
/*
|
|
* Copyright (c) 2014-2017 Paul Scherrer Institute. All rights reserved.
|
|
*/
|
|
|
|
import ch.psi.pshell.ui.Plugin;
|
|
import ch.psi.utils.State;
|
|
|
|
/**
|
|
*
|
|
*/
|
|
public class ProsilicaShutdown implements Plugin {
|
|
|
|
//Overridable callbacks
|
|
@Override
|
|
public void onStart() {
|
|
}
|
|
|
|
@Override
|
|
public void onStop() {
|
|
}
|
|
|
|
@Override
|
|
public void onInitialize(int runCount) {
|
|
|
|
}
|
|
|
|
@Override
|
|
public void onStateChange(State state, State former) {
|
|
System.out.print(former + " -> ");
|
|
System.out.println(state);
|
|
if ((state==State.Initializing) && (former!=null) && (former.isInitialized())){
|
|
ch.psi.pshell.prosilica.Prosilica.shutdown();
|
|
getLogger().warning("Shutting down Prosilica");
|
|
}
|
|
}
|
|
}
|