Developer Guide

The mtmount CSC is implemented using ts_salobj.

The CSC controls the main telescope mount using a TCP/IP connection to a low-level controller provided by Tekniker. It also reads telemetry from another TCP/IP connection using a background process (to avoid being overloaded).

See Interface with the Telescope Mount Assembly for information about the low-level controller.

API

The primary classes are:

lsst.ts.mtmount Package

Functions

command_mtmount()

Run MTMount Commander.

run_mtmount()

Run the MTMount CSC.

run_mtmount_ccw_only()

Run the MTMountCcwOnly CSC.

run_mtmount_telemetry_client()

Run MTMount telemetry client.

run_tma_telemetry_config_parser()

Generate MTMount_Telemetry.xml from the TMA's telemetry config file.

truncate_value(value, min_value, max_value, ...)

Truncate a value, if necessary.

wrap_parameter_doc(text)

Wrap a parameter description appropriately for a doc string.

Classes

CommandCode(value[, names, module, ...])

Command codes for Command.command_code.

CommandFutures(command)

asyncio futures to track the progress of a low-level controller command.

CommandSupersededException(command)

CscErrorCode(value[, names, module, ...])

EnabledState(value[, names, module, ...])

Status of enabling/disabling subsystems.

MTMountCcwOnlyCsc([config_dir, ...])

MTMount CSC commanding only the CCW.

MTMountCommander(enable)

MTMountCsc([config_dir, initial_state, ...])

MTMount CSC

ReplyId(value[, names, module, qualname, ...])

Reply codes for messages read from the low-level controller.

Source(value[, names, module, qualname, ...])

Values for the source field of a message and the AskForCommand command.

TMATelemetryConfigParser(tma_config_path)

Create MTMount_Telemetry.xml from the TMA telemetry config file.

TelemetryClient(host[, port, connection_timeout])

Read telemetry data from the TMA and publish as SAL messages.

TelemetryTopicHandler(topic, field_dict[, ...])

Coroutine functor that takes a telemetry message from the low-level controller and outputs the associated SAL telemetry message.

TelemetryTopicId(value[, names, module, ...])

Enum of sal_topic_name: topic_id where:

ThermalMode(value[, names, module, ...])

Thermal control mode for azimuth, elevation, and cabinet0101.

Class Inheritance Diagram

Inheritance diagram of lsst.ts.mtmount.enums.CommandCode, lsst.ts.mtmount.command_futures.CommandFutures, lsst.ts.mtmount.exceptions.CommandSupersededException, lsst.ts.mtmount.enums.CscErrorCode, lsst.ts.mtmount.enums.EnabledState, lsst.ts.mtmount.mtmount_ccw_only_csc.MTMountCcwOnlyCsc, lsst.ts.mtmount.mtmount_commander.MTMountCommander, lsst.ts.mtmount.mtmount_csc.MTMountCsc, lsst.ts.mtmount.enums.ReplyId, lsst.ts.mtmount.enums.Source, lsst.ts.mtmount.tma_telemetry_config_parser.TMATelemetryConfigParser, lsst.ts.mtmount.telemetry_client.TelemetryClient, lsst.ts.mtmount.telemetry_client.TelemetryTopicHandler, lsst.ts.mtmount.telemetry_map.TelemetryTopicId, lsst.ts.mtmount.enums.ThermalMode

Build and Test

This is a pure python package. There is nothing to build except the documentation.

make_idl_files.py MTMount
setup -r .
pytest -v  # to run tests
package-docs clean; package-docs build  # to build the documentation

Interface with the Telescope Mount Assembly

Contributing

lsst.ts.mtmount is developed at https://github.com/lsst-ts/ts_mtmount. Bug reports and feature requests use Jira with labels=ts_mtmount.