BakeoutController-Basic  0.1
A Controller for the Omicron vacuum chamber
Classes | Public Member Functions | List of all members
kernel.models.TDKLambdaPowerSupplyFactory Class Reference
Inheritance diagram for kernel.models.TDKLambdaPowerSupplyFactory:
Inheritance graph
[legend]
Collaboration diagram for kernel.models.TDKLambdaPowerSupplyFactory:
Collaboration graph
[legend]

Public Member Functions

Kernel getKernel ()
 
void setKernel (Kernel kernel)
 
void setPortName (String portName)
 
PowerSupply getPowerSupply () throws PortInUseException, IOException, UnsupportedCommOperationException, DeviceAlreadyCreatedException
 
void makePowerSupply () throws PortInUseException, IOException, UnsupportedCommOperationException, DeviceAlreadyCreatedException
 

Detailed Description

Implements a factory for making the power supply. An instance of the power supply cannot legally exist without an open port with which to communicate, and so this factory ensures that the power supply is made correctly.

Definition at line 25 of file models/TDKLambdaPowerSupplyFactory.java.

Member Function Documentation

Kernel kernel.models.TDKLambdaPowerSupplyFactory.getKernel ( )
Returns
The kernel

Implements kernel.controllers.TDKLambdaPowerSupplyFactory.

Definition at line 56 of file models/TDKLambdaPowerSupplyFactory.java.

56  {
57  return kernel;
58  }
PowerSupply kernel.models.TDKLambdaPowerSupplyFactory.getPowerSupply ( ) throws PortInUseException, IOException, UnsupportedCommOperationException, DeviceAlreadyCreatedException
Returns
A power supply
Exceptions
PortInUseExceptionIf the serial port used to create this device is occupied
IOExceptionIf the serial port can be acquired, but communication with the power supply cannot be established
UnsupportedCommOperationExceptionIf the serial port can be acquired, but cannot be configured for proper communication with the power supply.

Implements kernel.controllers.TDKLambdaPowerSupplyFactory.

Definition at line 78 of file models/TDKLambdaPowerSupplyFactory.java.

80  {
81 
82  DeviceContainer registry = kernel.getDeviceRegistryView();
83 
84  if (!registry.hasPowerSupply()){
86  }
87  PowerSupply supply = registry.getPowerSupply();
88  writeEntryForSupply(supply);
89 
90  return supply;
91  }
void kernel.models.TDKLambdaPowerSupplyFactory.makePowerSupply ( ) throws PortInUseException, IOException, UnsupportedCommOperationException, DeviceAlreadyCreatedException

Create an instance of the power supply and write it to the device registry.

Exceptions
PortInUseExceptionIf the serial port used to create this device is occupied
IOExceptionIf the serial port can be acquired, but communication with the power supply cannot be established
UnsupportedCommOperationExceptionIf the serial port can be acquired, but cannot be configured for proper communication with the power supply.

Implements kernel.controllers.TDKLambdaPowerSupplyFactory.

Definition at line 94 of file models/TDKLambdaPowerSupplyFactory.java.

95  {
96  assertPowerSupplyDoesNotExist();
97  writeEntryForNoPowerSupply();
98 
100  .getDeviceRegistryController();
101 
102  PowerSupply supply = createPowerSupplyInstance();
103 
104  registry.setPowerSupply(supply);
105  }
void kernel.models.TDKLambdaPowerSupplyFactory.setKernel ( Kernel  kernel)
Parameters
kernelThe kernel to which this factory will be attached

Implements kernel.controllers.TDKLambdaPowerSupplyFactory.

Definition at line 64 of file models/TDKLambdaPowerSupplyFactory.java.

64  {
65  this.kernel = kernel;
66  }
void kernel.models.TDKLambdaPowerSupplyFactory.setPortName ( String  portName)
Parameters
portNameThe name of the serial port that is to be used when

Implements kernel.controllers.TDKLambdaPowerSupplyFactory.

Definition at line 72 of file models/TDKLambdaPowerSupplyFactory.java.

72  {
73  this.portName = portName;
74  }

The documentation for this class was generated from the following file:
Git Repo