
public class CanOpenADC extends CanOpenDevice implements ADCInterface
| Modifier and Type | Field and Description |
|---|---|
static double |
adcVoltsPerBit
One bit read on the input of the ADC represents 0.3125 mV
|
protected int |
transmissionType
The transmission types for the analogue inputs are described in the
following: acyclic, synchronous: The transmission is initiated if a
SYNC-message has been received (PDO- transmission type 0) and data has
changed.
|
static double |
waterFreezeTemp |
booted, errorHistory, errorRegister, inError, initialized, name, nodeID, s, serialNB, tcpProxyalertSeparater| Constructor and Description |
|---|
CanOpenADC(int nodeID,
String serialNB,
int transmissionType)
Build a CanOpenADC with a CANopen node ID, a serial number and a transmission type.
|
| Modifier and Type | Method and Description |
|---|---|
void |
initializeAndCheckHardware()
This methods has to be overridden if there is some initialization to do
for the device.
|
int |
readAnalogInput(int inputNB)
Read the analog input whom number is given as a parameter
|
double |
readVoltage(int inputNB)
Read the voltage at the ADC input inputNB on the ADC and returns the
value in Volt
|
void |
updatePDO()
send a "sync" command to CANbus, process response and update pdoVal.
|
protected void |
updateWithPDO(int cob_id,
long pdoVal) |
protected String |
writeTransmissionTypeToDevice()
This methods writes the transmission type given by the configuration to
the device.
|
configAsHeartbeatConsumer, configAsHeartbeatProducer, createStatusDataPublishedByCanOpenDevice, displayErrorHistory, displayErrorRegister, getAlertService, getErrorHistory, getErrorRegister, getName, getNodeID, getSerialNB, getSubsystem, getTcpProxy, isBooted, isInError, isInitialized, onEmergencyMessage, publishData, readErrorHistory, readErrorRegister, readNumberOfErrors, readSDO, readStringSerialNumber, resetError, saveParameters, setBooted, toString, writeSDOclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcheckBooted, checkId, checkInitialized, createStatusDataPublishedByHardware, printState, raiseAlarmIfMissingonFault, onFaultResetclearAlarm, raiseAlarm, raiseAlarm, raiseAlarm, raiseAlarm, raiseAlarm, raiseAlarm, raiseWarning, raiseWarning, raiseWarning, raiseWarning, raiseWarningpublic static final double adcVoltsPerBit
public static final double waterFreezeTemp
@ConfigurationParameter protected int transmissionType
public CanOpenADC(int nodeID,
String serialNB,
int transmissionType)
nodeID - serialNB - transmissionType - @Command public int readAnalogInput(int inputNB)
readAnalogInput in interface ADCInterfaceinputNB - SDORequestExceptionHardwareNotDetectedExceptionShortResponseToSDORequestExceptionpublic double readVoltage(int inputNB)
readVoltage in interface ADCInterfaceinputNB - : integer from 1 to 8SDORequestExceptionHardwareNotDetectedExceptionShortResponseToSDORequestException@Command public void initializeAndCheckHardware()
CanOpenDeviceinitializeAndCheckHardware in interface PieceOfHardwareinitializeAndCheckHardware in class CanOpenDevice@Command protected String writeTransmissionTypeToDevice()
FcsHardwareExceptionprotected void updateWithPDO(int cob_id,
long pdoVal)
@Command(type=QUERY, description="send a sync command to CANbus, process response and update pdoVal.") public void updatePDO() throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionCopyright © 2017 LSST. All rights reserved.