lewis.devices.linkam_t95.interfaces.stream_interface

Members

LinkamT95StreamInterface

Linkam T95 TCP stream interface.

class lewis.devices.linkam_t95.interfaces.stream_interface.LinkamT95StreamInterface[source]

Bases: StreamInterface

Linkam T95 TCP stream interface.

This is the interface of a simulated Linkam T95 device. The device listens on a configured host:port-combination, one option to connect to it is via telnet:

$ telnet host port

Once connected, it’s possible to send the specified commands, described in the dynamically generated documentation. Information about host, port and line terminators in the concrete device instance are also generated dynamically.

cool() bytes[source]

Models “Cool Command” functionality of device.

Returns:

Empty string.

get_status()[source]

Models “T Command” functionality of device.

Returns all available status information about the device as single byte array.

Returns:

Byte array consisting of 10 status bytes.

handle_error(request, error) None[source]

If command is not recognised print and error

Args:

request: requested string error: problem

heat() bytes[source]

Models “Heat Command” functionality of device.

Returns:

Empty string.

hold() bytes[source]

Models “Hold Command” functionality of device.

Device will hold current temperature until a heat or cool command is issued.

Returns:

Empty string.

pump_command(param) bytes[source]

Models “LNP Pump Commands” functionality of device.

Switches between automatic or manual pump mode, and adjusts speed when in manual mode.

Parameters:

param – ‘a0’ for auto, ‘m0’ for manual, [0-N] for speed.

Returns:

set_limit(param) bytes[source]

Models “Limit Command” functionality of device.

Sets the target temperate to be reached.

Parameters:

param – Target temperature in C, multiplied by 10, as a string. Can be negative.

Returns:

Empty string.

set_rate(param) bytes[source]

Models “Rate Command” functionality of device.

Sets the target rate of temperature change.

Parameters:

param – Rate of temperature change in C/min, multiplied by 100, as a string. Must be positive.

Returns:

Empty string.

start() bytes[source]

Models “Start Command” functionality of device.

Tells the T95 unit to start heating or cooling at the rate specified by setRate and to a limit set by setLimit.

Returns:

Empty string.

stop() bytes[source]

Models “Stop Command” functionality of device.

Tells the T95 unit to stop heating or cooling.

Returns:

Empty string.