|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.Observable
org.lsst.ccs.framework.Module
org.lsst.ccs.subsystems.fcs.testbench.APCTestBenchMainModule
public class APCTestBenchMainModule
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.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.lsst.ccs.framework.Module |
|---|
org.lsst.ccs.framework.Module.ValueUpdate |
| Field Summary |
|---|
| Fields inherited from class org.lsst.ccs.framework.Module |
|---|
configMethods, log, name, nObserverThreads, registry, tickMillis |
| Constructor Summary | |
|---|---|
APCTestBenchMainModule()
|
|
| Method Summary | |
|---|---|
CanOpenADC |
getAdc()
|
CanOpenDAC |
getDac()
|
String |
getMyClientName()
|
int |
getNodeNB()
|
int |
getReturnValue(String responseLine,
int inputNB)
Returns the value read on the socket for the input of the ADC given as an argument. |
CanOpenProxy |
getTcpProxy()
|
void |
initModule()
|
boolean |
isHardwareConnected()
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. |
String |
readADC()
Read the value of the first channel of the ADC. |
double |
readTemperature()
Read the temperature : in the test bench, a thermometer is plugged on the input number 1 of the ADC. |
Object |
sendCanOpen(String command)
For engineering mode, this method can be used to send Can Open commands to the Wrapper. |
void |
setAdc(CanOpenADC adc)
|
void |
setDac(CanOpenDAC dac)
|
void |
setTcpProxy(CanOpenProxy myTcpProxy)
|
void |
shutdown()
|
void |
turnOffLED()
|
void |
turnOnLED()
|
| Methods inherited from class org.lsst.ccs.framework.Module |
|---|
change, checkHardware, dropConfigurationContext, getCheckedValueFromConfiguration, getContext, getModule, getName, getNObserverThreads, getObservables, getSubsystem, getTickMillis, init, listens, newConfigurationContext, notifyChange, notifyChangeWithoutPreliminaryChecks, processUpdate, publishData, publishData, publishData, publishData, register, register, sendToReply, sendToStatus, setBeanName, setContext, 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 |
|---|
public APCTestBenchMainModule()
| Method Detail |
|---|
public CanOpenProxy getTcpProxy()
public void setTcpProxy(CanOpenProxy myTcpProxy)
myTcpProxy - the myTcpProxy to setpublic int getNodeNB()
public String getMyClientName()
public boolean isHardwareConnected()
public CanOpenADC getAdc()
public void setAdc(CanOpenADC adc)
adc - the adc to setpublic CanOpenDAC getDac()
public void setDac(CanOpenDAC dac)
dac - the dac to setpublic boolean isHardwareReady()
public void initModule()
initModule in class org.lsst.ccs.framework.Modulepublic void shutdown()
public Object sendCanOpen(String command)
throws InterruptedException,
TimeoutException
command - A Can Open command that the Wrapper should understand.
InterruptedException
TimeoutException
public int getReturnValue(String responseLine,
int inputNB)
throws ReadingADCError
responseLine - A string read on the socket.inputNB - The numero if the input on the ADC. (1<=inputNB<=8)
ReadingADCError
public double readTemperature()
throws SDORequestError,
HardwareNotDetectedException
ReadingADCError
SDORequestError
HardwareNotDetectedException
public String readADC()
throws SDORequestError,
TimeoutException
ReadingADCError
SDORequestError
TimeoutException
public void turnOnLED()
throws InterruptedException,
SDORequestError,
HardwareNotDetectedException
InterruptedException
SDORequestError
HardwareNotDetectedException
public void turnOffLED()
throws InterruptedException,
SDORequestError
InterruptedException
SDORequestError
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||