public class CanOpenDevice extends org.lsst.ccs.framework.Module implements PieceOfHardware
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
booted |
protected BridgeToHardware |
bridge |
protected boolean |
initialized |
protected String |
nodeID |
protected String |
serialNB |
protected CanOpenProxy |
tcpProxy |
| Constructor and Description |
|---|
CanOpenDevice(String aName,
int aTickMillis,
String nodeID,
String serialNB) |
| Modifier and Type | Method and Description |
|---|---|
String |
displayErrorHistory() |
String |
displayErrorRegister() |
String[] |
getErrorHistoryNames()
For the GUI or to display at the console : return a list of String with
the error code and the error name.
|
String |
getNodeID() |
String |
getSerialNB() |
String |
initializeAndCheckHardware()
This methods has to be overridden if there is some initialization to do
for the device.
|
void |
initModule() |
boolean |
isBooted() |
boolean |
isInitialized() |
String[] |
readErrorHistory()
The error history holds errors that have occurred on the device and have
been signalled via the emergency object.
|
String |
readErrorRegister()
At index 1001 there deviceErrorFile an error register for the device.
|
int |
readNumberOfErrors()
Extract from the Maxon Motor firmware specification : Contains the number
of actual errors that are recorded in the array starting at subindex 1.
|
String |
readSDO(String index,
String subindex) |
Object |
saveParameters()
This method saves the parameters in the controller memory.
|
void |
setBooted(boolean booted) |
String |
toString() |
String |
writeSDO(String index,
String subindex,
String length,
String newValue) |
getComponentTree, getEnvironment, getModule, getName, getNObserverThreads, getObservables, getSubsystem, getTickMillis, init, listens, postStart, processUpdate, sendSignal, sendSignalWithTimeLimit, setEnvironment, setName, setNObserverThreads, setObservables, setTickMillis, shutdownNow, signal, startTicking, tick, updateaddObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChangedclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetNamechange, getCheckedValueFromConfiguration, getChildren, getComponentByName, getFullPath, getParent, getParentObject, injectResources, listChildren, notifyChange, notifyChangeWithoutPreliminaryChecks, setBulkParameter, start, submitChange, submitChanges, validateBulkChangeprotected CanOpenProxy tcpProxy
protected BridgeToHardware bridge
protected final String serialNB
protected final String nodeID
protected boolean booted
protected boolean initialized
public void setBooted(boolean booted)
setBooted in interface PieceOfHardware@Command(type=QUERY,
level=1,
description="Returns this CANopen device\'s serial number.")
public String getSerialNB()
getSerialNB in interface PieceOfHardware@Command(type=QUERY,
level=1,
description="Returns this CANopen device\'s node ID.")
public String getNodeID()
getNodeID in interface PieceOfHardware@Command(type=QUERY,
level=1,
description="Returns true if this CANopen node is booted.")
public boolean isBooted()
isBooted in interface PieceOfHardwarepublic boolean isInitialized()
isInitialized in interface PieceOfHardwarepublic void initModule()
initModule in class org.lsst.ccs.framework.Modulepublic String initializeAndCheckHardware() throws FcsHardwareException
initializeAndCheckHardware in interface PieceOfHardwareFcsHardwareException@Command(type=ACTION,
level=3,
description="Write on the Can Open Device with a command wsdo.")
public String writeSDO(String index,
String subindex,
String length,
String newValue)
throws SDORequestException,
FcsHardwareException
@Command(type=QUERY,
level=3,
description="Reads the Can Open Device with a command rsdo.")
public String readSDO(String index,
String subindex)
throws SDORequestException,
ShortResponseToSDORequestException,
FcsHardwareException
@Command(type=QUERY,
level=3,
description="Reads Error Register on the controller - in hexa (index 1001).")
public String readErrorRegister()
throws SDORequestException,
ShortResponseToSDORequestException,
FcsHardwareException
SDORequestExceptionShortResponseToSDORequestExceptionFcsHardwareException@Command(type=QUERY,
level=3,
description="Display Error Register on the controller (index 1001).")
public String displayErrorRegister()
throws SDORequestException,
ShortResponseToSDORequestException,
FcsHardwareException
public String[] readErrorHistory() throws SDORequestException, ShortResponseToSDORequestException, FcsHardwareException
SDORequestExceptionShortResponseToSDORequestExceptionFcsHardwareException@Command(type=QUERY,
level=1,
description="Display Error Register on the controller (index 1001).")
public String displayErrorHistory()
throws SDORequestException,
ShortResponseToSDORequestException,
FcsHardwareException
@Command(type=QUERY,
level=1,
description="Read and returns the number of errors registred in the Error History.")
public int readNumberOfErrors()
throws SDORequestException,
ShortResponseToSDORequestException,
FcsHardwareException
SDORequestExceptionShortResponseToSDORequestExceptionFcsHardwareExceptionpublic String[] getErrorHistoryNames() throws SDORequestException, ShortResponseToSDORequestException, FcsHardwareException
SDORequestExceptionShortResponseToSDORequestExceptionFcsHardwareException@Command(type=ACTION,
level=3,
description="This method saves the parameters in the controller memory.")
public Object saveParameters()
throws SDORequestException,
FcsHardwareException
SDORequestExceptionFcsHardwareExceptionCopyright © 2016 LSST. All rights reserved.