ops.interface — Handles communication with the production system

This module contains the DeviceInterface class.

The DeviceInterface Class

class ops.interface.DeviceInterface

A class that is responsible for communicating with the FCI-7011 fiber coupler production system. Not yet implemented.

In order to test the application without access to an actual production system, SimulatedDeviceInterface, a drop-in replacement for this class which just simulates communication with a production system is provided.

Heating

DeviceInterface.heatingCurrent
The device’s heating current, in mA. Read-only. To change the heating current, use the startHeatingWithCurrent() method.
DeviceInterface.temperatureSensorVoltage
The system’s temperature sensor’s voltage, in V. Read-only. Not yet implemented.
DeviceInterface.startHeatingWithCurrent(current)
Sets the device’s heating current to current, in mA. Not yet implemented.

Heater Movement

DeviceInterface.heaterPosition

The position of the simulated device’s heater, as a fraction of the distance between rearmost position (0.0) and foremost position (1.0). Read-only. To move the heater to another position, use the startHeaterMovement() method.

Not yet implemented.

DeviceInterface.heaterTargetPosition

The position the heater is supposed to be at, as a fraction of the distance between rearmost position (0.0) and foremost position (1.0).

If heaterTargetPosition is not equal to heaterPosition, the heater is still moving to its target position.

Read-only. To change the heater’s target position, use the startHeaterMovement() method.

DeviceInterface.startHeaterMovement(targetPosition)

Moves the heater to the given position, expressed as a fraction of the distance between rearmost position (0.0) and foremost position (1.0).

This method is asynchronous. Moving the heater can take several seconds, but this method returns immediately.

To check which position the heater is currently moving to, use heaterTargetPosition; to get its actual position use heaterPosition.

Not yet implemented.

General Attributes

DeviceInterface.isSimulation
Indicates whether this class just simulates communication with a device. (It doesn’t.) Immutable.