BakeoutController-Basic  0.1
A Controller for the Omicron vacuum chamber
ApplicationConfiguration.java
1 package main;
2 
4 import kernel.Kernel;
5 import kernel.KernelFactory;
10 import org.springframework.context.annotation.*;
12 
16 @Configuration
17 @Import(UserInterfaceConfiguration.class)
18 @Lazy
20 
24  private static final String applicationName = "BakeoutController";
25 
29  public static String getApplicationName(){
30  return applicationName;
31  }
32 
37  @Bean
39  return new JavaCommsAPIWrapper();
40  }
41 
45  @Bean
46  public static PortDriver portDriver(){
47  return new RXTXPortDriver(
49  );
50  }
51 
56  @Bean
57  @Scope("singleton")
58  public static Kernel kernel(){
59  KernelFactory kernelFactory = new ApplicationKernelFactory();
60  kernelFactory.setPortDriver(portDriver());
61 
62  assert kernelFactory.canKernelBeStarted();
63 
64  return kernelFactory.getKernelInstance();
65  }
66 }
static PortIdentifierGetter portWrapper()
Boolean canKernelBeStarted()
void setPortDriver(PortDriver newPortDriver)
Kernel getKernelInstance()
Git Repo