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

java.lang.Object
  extended by java.util.Observable
      extended by org.lsst.ccs.framework.Module
          extended by org.lsst.ccs.subsystems.fcs.drivers.CanOpenDevice
All Implemented Interfaces:
Serializable, Observer, org.lsst.ccs.framework.Configurable, PieceOfHardware
Direct Known Subclasses:
CanOpenADC, CanOpenDAC

public class CanOpenDevice
extends org.lsst.ccs.framework.Module
implements PieceOfHardware

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
CanOpenDevice()
           
CanOpenDevice(String serialNB, String nodeID)
           
 
Method Summary
 String getNodeID()
           
 String getSerialNB()
           
 String initializeHardware()
          This methods has to be overridden if there is some initialization to do for the device.
 void initModule()
           
 boolean isInitalized()
           
 boolean isNodeIdBootedAndOK()
           
 String readSDO(String index, String subindex)
           
 void setNodeID(String nodeID)
           
 void setSerialNB(String serialNB)
           
 String toString()
           
 String writeSDO(String index, String subindex, String length, String newValue)
           
 
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

CanOpenDevice

public CanOpenDevice()

CanOpenDevice

public CanOpenDevice(String serialNB,
                     String nodeID)
Method Detail

getSerialNB

public String getSerialNB()
Specified by:
getSerialNB in interface PieceOfHardware

getNodeID

public String getNodeID()
Specified by:
getNodeID in interface PieceOfHardware

setNodeID

public void setNodeID(String nodeID)

setSerialNB

public void setSerialNB(String serialNB)

isNodeIdBootedAndOK

public boolean isNodeIdBootedAndOK()
Specified by:
isNodeIdBootedAndOK in interface PieceOfHardware
Returns:
true If this piece of hardware is booted and the nodeID on the hardware is the same than the one in the Configuration DB.

isInitalized

public boolean isInitalized()
Specified by:
isInitalized in interface PieceOfHardware
Returns:
true if the hardware has been initialized with success, false otherwise.

initModule

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

initializeHardware

public String initializeHardware()
                          throws Exception
This methods has to be overridden if there is some initialization to do for the device.

Specified by:
initializeHardware in interface PieceOfHardware
Returns:
a message
Throws:
Exception

writeSDO

public String writeSDO(String index,
                       String subindex,
                       String length,
                       String newValue)
                throws SDORequestError
Throws:
SDORequestError

readSDO

public String readSDO(String index,
                      String subindex)
               throws SDORequestError
Throws:
SDORequestError

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013 LSST. All Rights Reserved.