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

Public Member Functions

 PVCiPressureGauge (Integer address, ModbusConnector connection) throws IOException
 
Float getPressure () throws WrappedModbusException, ModbusException, IOException
 

Detailed Description

Contains an implementation of the PVCi IGC3 ion pressure gauge

The serial port parameters are hard-coded for now. More customization will come from a proper kernel, once that gets written.

Definition at line 22 of file PVCiPressureGauge.java.

Constructor & Destructor Documentation

devices.PVCiPressureGauge.PVCiPressureGauge ( Integer  address,
ModbusConnector  connection 
) throws IOException

Instantiate a pressure gauge, and check that it is alive.

Parameters
addressThe device address, numbered from 1 to 99. MODBUS requests are sent to the device with this address.
connectionThe connection manager to use.

Definition at line 74 of file PVCiPressureGauge.java.

75  {
76  this.address = address;
77  this.connection = connection;
78  log.debug(
79  "Created PVCi pressure gauge with address {} and conn {}",
80  address, connection);
81 
82  try {
83  this.checkUnitID();
84  } catch (Exception error){
85  throw new IOException(error);
86  }
87  }

Member Function Documentation

Float devices.PVCiPressureGauge.getPressure ( ) throws WrappedModbusException, ModbusException, IOException
Returns
The current pressure, in millibars.
Exceptions
WrappedModbusExceptionIf the getter to get the transaction for the request fails
ModbusExceptionIf the transaction to get the pressure cannot be executed
IOExceptionIf the result of the transaction to get pressure cannot be parsed

Implements devices.PressureGauge.

Definition at line 100 of file PVCiPressureGauge.java.

101  {
102  log.debug("Method to get pressure was called");
103 
104  ModbusRequest pressureRequest = getReadRegisterRequest(
105  gaugePressureAddress, gaugePressureWordsToRead
106  );
107  ModbusTransaction transaction = connection.getTransactionForRequest(
108  pressureRequest);
109  log.debug(
110  "PVCi Pressure gauge {} executing transaction {}",
111  this.toString(), transaction.toString());
112  transaction.execute();
113  ModbusMessage response = transaction.getResponse();
114  log.debug(
115  "Received response {} from transaction {}",
116  response.getHexMessage(), transaction.toString());
117 
118  return connection.parseFloatFromResponse(response);
119  }
ModbusTransaction getTransactionForRequest(ModbusRequest request)
Float parseFloatFromResponse(ModbusMessage response)

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