1. Introduction

The Telescope Control System (Tcs) at the Hobby-Eberly Telescope (Het) consists of a approximately ten control system programs and associated subsystems. There is a built-in messaging interface to allow communications between systems. Control systems act as servers and can also be clients of the other control systems. About half the control systems within Tcs manage hardware associated with pointing and operating the telescope. The Tcs software is written in C++. In order to allow easy program development and scripting capabilities a set of python interfaces have been developed. This documentation describes the Python interface and the application programming interface (API) for the Tcs.

The Python interface to the Tcs Control System at Het consists of the Tcs Python modules and the Hetlib package. Hetlib provides wrappers around some of the routines in the Tcs Python modules as well as scripts to assist in the operation of the telescope system. These packages and modules are available to other software developers and provide an easy interface to the Tcs Control Systems.

Note that the Tcs Python modules will be migated to the pytcs package at some future date which will be soon I hope.

1.1. Definition of Terms

1.1.1. Control System

A Control System is a standalone program. It may receive Handler requests (basically commands) from clients and it may emit events that other programs can receive. The control systems with in the Tcs are the tracker_server, tcs_server, pasServer, pfipserver, legacyServer, tcsGui, apcServer, tcs_monitor, tcs_log_relay, and tcsnamed.

1.1.2. Subsystem

A subsystem is the name for a part of a Control System. For example, the legacyServer controls the dome and shutter as well as collecting the weather information. The dome, shutter, and weather are all subsystems of the legacy Control System.

1.1.3. Route

A route is a URL (Uniform Resource Locator) that is used by clients to talk to the Control System. Requests to a Control System are sent to the route URL. The URL is of the form aaa://xxx.xxx.xxx.xxx:nnnnn where aaa is the protocol (e.g. tcp or udp), xxx.xxx.xxx.xxx is an IP address, and nnnnn is a port number. For example, the route to the tcs_server is tcp://192.168.66.31:30300. All Control System within Tcs use the TCP protocol. Routes are available from the tcsnamed server.

1.1.4. Event-route

An event route is a URL that is used by a Control System to emit Events. Clients and other Control System may listen to these Events to obtain state or activity information about the Control System. The Event-route’s port number is normally one higher than the Control System Route port. For example, the tcs_server route is on port 30300 and its event-route is on port 30301. Event-routes are available from the tcsnamed server.

1.1.5. Handler

A handler is a function within a Control System that may be called by a client. A handler is called through the Route to the Control System. When the handler completes a return value is sent to the client. Some handlers return immediately even though the action may take longer and the client will have to look at Events from the Control System in order to see when the action might be complete.

1.1.6. Events

Events are emitting by a Control System via a broadcast on the Event-route URL. Clients may subscribe to events from some or all Control System. Clients are not able to pick which events from a particular Control System they subscribe to. Client must filter events on their end and provide any call back required to handle the event.