org.lsst.ccs.subsystems.fcs.testbench
Class APCTestBenchMainModule
java.lang.Object
java.util.Observable
org.lsst.ccs.framework.Module
org.lsst.ccs.subsystems.fcs.testbench.APCTestBenchMainModule
- All Implemented Interfaces:
- Serializable, Observer, org.lsst.ccs.framework.Configurable
public class APCTestBenchMainModule
- extends org.lsst.ccs.framework.Module
This is the main module for the control software of the APC test bench.
When the TestBenchMainModule starts, it starts a a TCP-IP server.
the can open wrapper software will connect.
Then the TestBenchProxy and the Wrapper will communicate over this TCP connection
with a protocol to be define.
In a first version :
1- The TCP server is started and waits for a client connection,
2- When the client connects, it sends first a key word "TestBench".
3- When the server receives the key word "TestBench", it's ready to boot the hardware
and receive commands.
- Author:
- virieux
- See Also:
- Serialized Form
| 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 |
| Fields inherited from class org.lsst.ccs.framework.Module |
environment, log, name, nObserverThreads, registry, tickMillis |
| 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, update |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
temperature
public double temperature
APCTestBenchMainModule
public APCTestBenchMainModule()
getBridge
public BridgeToHardware getBridge()
setBridge
public void setBridge(BridgeToHardware bridge)
getThermometer
public Thermometer getThermometer()
setThermometer
public void setThermometer(Thermometer thermometer)
getLed
public CanOpenLED getLed()
setLed
public void setLed(CanOpenLED led)
getFakeLed
public CanOpenLED getFakeLed()
setFakeLed
public void setFakeLed(CanOpenLED fakeLed)
getFakeSensor
public Thermometer getFakeSensor()
setFakeSensor
public void setFakeSensor(Thermometer fakeSensor)
getReturnValue
public int getReturnValue(String responseLine,
int inputNB)
throws ReadingADCError
- Returns the value read on the socket for the input of the ADC given as an argument.
- Parameters:
responseLine - A string read on the socket.inputNB - The numero if the input on the ADC. (1<=inputNB<=8)
- Returns:
- the value (int) given
- Throws:
ReadingADCError
readTemperature
public double readTemperature()
throws HardwareError
- Throws:
HardwareError
readTemperatureFromPDO
public double readTemperatureFromPDO()
throws HardwareError,
org.lsst.ccs.bus.BadCommandException
- Throws:
HardwareError
org.lsst.ccs.bus.BadCommandException
turnOnLED
public String turnOnLED()
throws SDORequestError,
HardwareNotDetectedException
- Throws:
SDORequestError
HardwareNotDetectedException
turnOffLED
public String turnOffLED()
throws SDORequestError,
HardwareNotDetectedException
- Throws:
SDORequestError
HardwareNotDetectedException
turnOnFakeLED
public String turnOnFakeLED()
throws SDORequestError,
HardwareNotDetectedException
- Throws:
SDORequestError
HardwareNotDetectedException
turnOffFakeLED
public String turnOffFakeLED()
throws SDORequestError,
HardwareNotDetectedException
- Throws:
SDORequestError
HardwareNotDetectedException
readFakeSensor
public double readFakeSensor()
throws HardwareError,
org.lsst.ccs.bus.BadCommandException
- Throws:
HardwareError
org.lsst.ccs.bus.BadCommandException
initModule
public void initModule()
- Overrides:
initModule in class org.lsst.ccs.framework.Module
tick
public void tick()
- Overrides:
tick in class org.lsst.ccs.framework.Module
Copyright © 2013 LSST. All Rights Reserved.