org.lsst.ccs.subsystems.fcs.drivers
Class BridgeToCanOpenHardware

java.lang.Object
  extended by java.util.Observable
      extended by org.lsst.ccs.framework.Module
          extended by org.lsst.ccs.subsystems.fcs.drivers.BridgeToCanOpenHardware
All Implemented Interfaces:
Serializable, Observer, org.lsst.ccs.framework.Configurable, BridgeToHardware

public class BridgeToCanOpenHardware
extends org.lsst.ccs.framework.Module
implements BridgeToHardware

This class set gathers the description of the real hardware and the tools (methods) to give access to this hardware. A new piece of hardware has to be added as a new field of this class, and the initModule method has to be modified too.

Author:
virieux
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.lsst.ccs.framework.Module
org.lsst.ccs.framework.Module.ValueUpdate
 
Nested classes/interfaces inherited from interface org.lsst.ccs.framework.Configurable
org.lsst.ccs.framework.Configurable.Environment
 
Field Summary
 
Fields inherited from class org.lsst.ccs.framework.Module
environment, log, name, nObserverThreads, registry, tickMillis
 
Constructor Summary
BridgeToCanOpenHardware()
           
 
Method Summary
 CanOpenADC getAi814()
           
 CanOpenDAC getAo412()
           
 CanOpenClampActuatorModule getClampActuatorXminus()
           
 CanOpenClampActuatorModule getClampActuatorXplus()
           
 CanOpenDIO getDio8n1()
           
 CanOpenDIO getDio8n2()
           
 CanOpenProxy getTcpProxy()
           
 void initModule()
           
 boolean isCWrapperConnected()
          This method returns true if the C-Wrapper is connected to the tcp proxy.
 boolean isHardwareReady()
          returns true if the hardware is booted, identified and initialized.
 Object sendCanOpen(String command)
          For engineering mode, this method can be used to send Can Open commands to the Wrapper.
 void setAi814(CanOpenADC ai814)
           
 void setAo412(CanOpenDAC ao412)
           
 void setClampActuatorXminus(CanOpenClampActuatorModule actuator)
           
 void setClampActuatorXplus(CanOpenClampActuatorModule actuator)
           
 void setDio8n1(CanOpenDIO dio8n1)
           
 void setDio8n2(CanOpenDIO dio8n2)
           
 void setTcpProxy(CanOpenProxy tcpProxy)
           
 void shutdown()
           
 
Methods inherited from class org.lsst.ccs.framework.Module
change, checkHardware, dropConfigurationContext, getCheckedValueFromConfiguration, getChildren, getContext, getModule, getName, getNObserverThreads, getObservables, getSubsystem, getTickMillis, init, listens, newConfigurationContext, notifyChange, notifyChangeWithoutPreliminaryChecks, processUpdate, publishData, publishData, publishData, publishData, register, register, sendToReply, sendToStatus, setBeanName, setContext, setEnvironment, setName, setNObserverThreads, setObservables, setStateModularSubsystem, setStateModularSubsystem, setTickMillis, shutdownCommand, shutdownNow, start, startTicking, tick, update
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BridgeToCanOpenHardware

public BridgeToCanOpenHardware()
Method Detail

getTcpProxy

public CanOpenProxy getTcpProxy()

setTcpProxy

public void setTcpProxy(CanOpenProxy tcpProxy)

getAi814

public CanOpenADC getAi814()

setAi814

public void setAi814(CanOpenADC ai814)

getAo412

public CanOpenDAC getAo412()

setAo412

public void setAo412(CanOpenDAC ao412)

getDio8n1

public CanOpenDIO getDio8n1()

setDio8n1

public void setDio8n1(CanOpenDIO dio8n1)

getDio8n2

public CanOpenDIO getDio8n2()

setDio8n2

public void setDio8n2(CanOpenDIO dio8n2)

getClampActuatorXplus

public CanOpenClampActuatorModule getClampActuatorXplus()
Returns:
the actuator

setClampActuatorXplus

public void setClampActuatorXplus(CanOpenClampActuatorModule actuator)
Parameters:
actuator - the actuator to set

getClampActuatorXminus

public CanOpenClampActuatorModule getClampActuatorXminus()
Returns:
the actuator

setClampActuatorXminus

public void setClampActuatorXminus(CanOpenClampActuatorModule actuator)
Parameters:
actuator - the actuator to set

isCWrapperConnected

public boolean isCWrapperConnected()
This method returns true if the C-Wrapper is connected to the tcp proxy. The C-Wrapper has to send the tcpProxy clientName as a keyword before any communication can begin. So if the C-Wrapper doesn't send the good keyword or if it doesn't connect to the tcp proxy, this method returns false.

Specified by:
isCWrapperConnected in interface BridgeToHardware

isHardwareReady

public boolean isHardwareReady()
returns true if the hardware is booted, identified and initialized.

Specified by:
isHardwareReady in interface BridgeToHardware

initModule

public void initModule()
Overrides:
initModule in class org.lsst.ccs.framework.Module

shutdown

public void shutdown()

sendCanOpen

public Object sendCanOpen(String command)
                   throws InterruptedException,
                          TimeoutException
For engineering mode, this method can be used to send Can Open commands to the Wrapper.

Parameters:
command - A Can Open command that the Wrapper should understand.
Returns:
the response from the Wrapper
Throws:
InterruptedException
TimeoutException


Copyright © 2013 LSST. All Rights Reserved.