|
||||||||||
| 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.CompactIOModule
org.lsst.ccs.subsystems.fcs.drivers.CanOpenDIO
public class CanOpenDIO
This is the driver class for the Digital-Input-Output we use in the FCS: CAN-CBX-DIO8. A CAN-CBX-DIO8 has 8 inputs or outputs. At the initialization, it has to be configured to say which are the inputs and which are the ouputs. The outputs for the standby or standback motors of the autochanger are on this device. The sensors to know if a latch on the autochanger is closed or open are also connected to a CAN-CBX-DIO8.
| 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.subsystems.fcs.CompactIOModule |
|---|
hexaValue |
| Fields inherited from class org.lsst.ccs.framework.Module |
|---|
environment, log, name, nObserverThreads, registry, tickMillis |
| Constructor Summary | |
|---|---|
CanOpenDIO()
|
|
CanOpenDIO(String nodeID,
String serial)
|
|
| Method Summary | |
|---|---|
boolean |
checkMask()
This methods checks if the mask of the device is the good one. |
String |
getNodeID()
|
String |
getSerialNB()
|
String |
initializeHardware()
This methods write some configuration data on the hardware CPU. |
void |
initModule()
|
boolean |
isInitalized()
|
boolean |
isNodeIdBootedAndOK()
|
String |
readNewHexaValue()
returns the value in hexa of all the sensors connected on the inputs channels of the device. |
int |
readNewValue()
This method reads the current value in decimal measured by the hardware or compute a random value for the simulated sensor, and returns this current value. |
void |
setNodeID(String nodeID)
|
void |
setSerialNB(String serialNB)
|
String |
toString()
|
String |
writeDigitalOutput(int outputNB,
int value)
Write a value to the output of the DAC |
String |
writeMask()
This methods initialize the CAN-CBX-DIO8 with the mask (value 3) to configure the 2 first channels of the device to be output channel. |
| Methods inherited from class org.lsst.ccs.subsystems.fcs.CompactIOModule |
|---|
BinaryToHex, getHexaValue, getValue, HexToBinary, updateValue |
| 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, wait, wait, wait |
| Methods inherited from interface org.lsst.ccs.subsystems.fcs.common.PieceOfHardware |
|---|
getName |
| Constructor Detail |
|---|
public CanOpenDIO()
public CanOpenDIO(String nodeID,
String serial)
| Method Detail |
|---|
public void initModule()
initModule in class CompactIOModulepublic String getSerialNB()
getSerialNB in interface PieceOfHardwarepublic String getNodeID()
getNodeID in interface PieceOfHardwarepublic void setSerialNB(String serialNB)
serialNB - the serialNB to setpublic void setNodeID(String nodeID)
nodeID - the nodeID to setpublic boolean isInitalized()
isInitalized in interface PieceOfHardwarepublic boolean isNodeIdBootedAndOK()
isNodeIdBootedAndOK in interface PieceOfHardware
public String writeDigitalOutput(int outputNB,
int value)
throws SDORequestError,
HardwareNotDetectedException
outputNB - in 1..8value - given in decimal format
TODO chnage this : it's not so simple !
SDORequestError
HardwareNotDetectedExceptionpublic String readNewHexaValue()
readNewHexaValue in class CompactIOModule
public String writeMask()
throws SDORequestError
SDORequestError
public boolean checkMask()
throws SDORequestError
SDORequestErrorpublic int readNewValue()
Sensor
readNewValue in interface Sensor
public String initializeHardware()
throws Exception
PieceOfHardware
initializeHardware in interface PieceOfHardwareExceptionpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||