ops.calibration.event — Contains calibration-related event classes

A set of simple classes that are used to encapsulate the data associated with the various events the ops.calibration package can send.

All classes in this module are immutable.

The CalibrationStarted Class

class ops.calibration.event.CalibrationStarted
Used to indicate that a calibration procedure has just been started.
CalibrationStarted.system
The ProductionSystem that is being calibrated.
CalibrationStarted.manager
The CalibrationManager that is responsible for the calibration procedure.

The CalibrationOver Class

class ops.calibration.event.CalibrationOver
Used to indicate that a calibration procedure has just ended.
CalibrationOver.system
The ProductionSystem that has been calibrated.
CalibrationOver.manager
The CalibrationManager that was responsible for the calibration procedure.
CalibrationOver.status
A status code that indicates why the calibration procedure has ended. One of ops.calibration.manager.STATUS_ABORTED, STATUS_SAFE_MODE_TRIGGERED, STATUS_INVALID_CURRENT, and STATUS_FINISHED.
CalibrationOver.unusedCurrents
A tuple of heating currents no measurements were taken for. If status is STATUS_FINISHED, the tuple will be empty.

The TemperatureRequested Class

class ops.calibration.event.TemperatureRequested
Used to indicate that the user needs to take a temperature measurement before the calibration procedure can continue.
TemperatureRequested.manager
The CalibrationManager that is responsible for the calibration procedure.
TemperatureRequested.system
The ProductionSystem that is being calibrated.
TemperatureRequested.callback
A function that can be called to report a temperature measurement, with the temperature (in °C) as argument. Calling this function after manager has sent a TemperatureRequestOver event will raise an ApplicationError.

The TemperatureRequestOver Class

class ops.calibration.event.TemperatureRequestOver
Used to indicate that a temperature measurement previously requested with a TemperatureRequested event is no longer required, either because it has already been supplied, or because the calibration procedure has ended.
TemperatureRequestOver.manager
The CalibrationManager that is responsible for the calibration procedure.
TemperatureRequestOver.system
The ProductionSystem that is being calibrated.

The CalibrationDataChanged Class

class ops.calibration.event.CalibrationDataChanged
Used to indicate that a CalibrationData object has changed. If a calibration data object that is not currently used by a production system is changed, no event is sent.
CalibrationDataChanged.system
The ProductionSystem the changed CalibrationData object belongs to.
CalibrationDataChanged.calibrationData
The changed CalibrationData object itself. If a calibration data object is replaced with another, this is set to the new object.