Developers guide

28
public void sendToOthers(JASMessage message) { ... }
public void sendToClient(JASMessage message, String clientName) { ... }
JASMessages can contain any serializable Java Object. Telemetry information is typically
sent as a Java Map object within a JASMessage.
3.4.2.2 Command execution
In many ways the command execution environment of the JAS is similar to that of an operating
system. Any object implementing the Command interface can be executed by a Process within a
ProcessSpace. Process objects can execute(), abort(), and signal(Object arg). Each
ProcessSpace is assigned a ProcessManager. The ProcessManager interface is designed to be
implemented by the JAS Application, it is responsible for deciding whether an operation on a
Command is allowed. For example, the APT implements a PriorityExclusiveManager to ensure
that only one authorised user can execute commands and thus have control.
To facilitate remote command execution, a ProcessSpace is bound to a Channel, by a
ServerTransport object. This allows other JASClients joined to this Channel to send the
JASServer commands via a ClientProcessSpace.
3.4.3 SP interface
The Serial Protocol (SP), also developed by Keith Bannister and discussed in [ 52 ] is essentially a
socket based method of communication provided to allow any tool to interface to the APT-JAS
System. Most of the APT command line tools use the SP interface to communicate with the JAS
server. This is shown in Figure 3-1.
3.5 APT server
The APT Server is an application interfacing the hardware to the JAS to enable distributed
control. These hardware abstractions are used to construct APTCommands and send telemetry
data to JAS Clients.
apt.roof provides control of the sliding roof via the JCAN interface.
apt.ptcs is a DRAMA client to the PTCS system discussed in 3.2.
apt.park provides routines to park the telescope in common positions. i.e Zenith, Roof
Movement etc
apt.masterswitch uses the SNMP protocol to control the Masterswitch (discussed in
detail in Chapter 4).
apt.image Allows control of the CCD through the APT System framework (3.5.1)
3.5.1 APTSystem framework
The apt.system package was designed to interface several systems to the JAS, not under Java
control
i
, to enable remote control and distribution of data. It is essentially a wrapper of the
aptGetProperties and aptSetProperties scripts which abstract the implementation of these
i
Such as 2.3m weather, UPS, Network and PC status information.