stella.net.tpl
Interface PilarDriver

All Superinterfaces:
Driver, ParameterDepending, TelescopeDriver
All Known Implementing Classes:
AbstractPilarDriver, OpenPilarSocket, OpenPilarSocket.PilarTest, Pilar3Socket, Pilar3Socket.PilarTest

public interface PilarDriver
extends TelescopeDriver, ParameterDepending

This interface describes a translation layer from TelescopeCommands to TCS commands. It defines all necessarry methods that allow the TelescopeMaster to communicate to the telescope. The interface definitions are closely bound to the SCS command structure and support only a subset of available TCS structures. All methods return true if successful.


Method Summary
 boolean commenceClear()
          Clears all errors the telescope.
 boolean commenceSetCovers(boolean close)
          Sets the position of the mirror covers.
 boolean commenceUsePort(int portnumber)
          Uses the specified port, i.e.
 Collection<TsiError> getErrors()
          Gets the current errors at the telescope.
 Object getValue(String name)
          Synchroniously return a value of a variable.
 void rebuild()
          Rebuild the error data base like on a restart.
 boolean setValue(String name, String to)
          Synchroniously return a value of a variable.
 boolean waitForValue(String variable, String value, String notvalue, long timeout)
          Waits for a parameter to achieve a certain value.
 
Methods inherited from interface stella.telescope.TelescopeDriver
commenceAbort, commenceAbsoluteOffset, commenceAbsoluteOffset, commenceDerotator, commenceDerotatorOffset, commenceFocus, commenceFocusOffset, commenceGuiding, commenceInit, commenceMove, commenceMove, commenceMoveAzAlt, commencePark, commenceRelativeOffset, commenceRelativeOffset, commenceTracking
 
Methods inherited from interface io.Driver
close, getDriverName, isOpen, open
 
Methods inherited from interface stella.ParameterDepending
registerParameter
 

Method Detail

getValue

Object getValue(String name)
                throws IOException,
                       TsiTimeoutException
Synchroniously return a value of a variable. Return type is object, but might be cast from calling methods to appropriate types.

Throws:
IOException
TsiTimeoutException

setValue

boolean setValue(String name,
                 String to)
                 throws IOException,
                        TsiTimeoutException
Synchroniously return a value of a variable. Return type is object, but might be cast from calling methods to appropriate types.

Throws:
IOException
TsiTimeoutException

waitForValue

boolean waitForValue(String variable,
                     String value,
                     String notvalue,
                     long timeout)
                     throws TsiTimeoutException,
                            IOException
Waits for a parameter to achieve a certain value. Blocks until either the true or the false value is achieved. If non of this conditions happen within the time-out, an exception is thrown.

Parameters:
variable - TSI parameter to query.
value - True value if given.
notvalue - False value if given.
timeout - Maximum block time in ms.
Throws:
TsiTimeoutException
IOException

rebuild

void rebuild()
             throws IOException,
                    TsiTimeoutException
Rebuild the error data base like on a restart.

Throws:
IOException
TsiTimeoutException

getErrors

Collection<TsiError> getErrors()
                               throws IOException,
                                      TsiTimeoutException
Gets the current errors at the telescope.

Throws:
IOException
TsiTimeoutException

commenceSetCovers

boolean commenceSetCovers(boolean close)
                          throws IOException,
                                 TsiTimeoutException
Sets the position of the mirror covers.

Parameters:
close - true for closeing, false for opening.
Throws:
IOException
TsiTimeoutException

commenceClear

boolean commenceClear()
                      throws IOException,
                             TsiTimeoutException
Clears all errors the telescope.

Throws:
IOException
TsiTimeoutException

commenceUsePort

boolean commenceUsePort(int portnumber)
                        throws IOException,
                               TsiTimeoutException
Uses the specified port, i.e. the Nashmith focus.

Parameters:
portnumber - Implementation specific configuration index.
Throws:
IOException
TsiTimeoutException