public class CanCBXAI814 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 |
cobid1 |
protected int |
cobid2 |
int[] |
inputs |
protected int |
transmissionType
The transmission types for CAN-CBX-AI814 are described in doc
CAN-CBX-AI814_Manual.pdf § 8.6.2
- 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, dataProviderDictionaryService, errorHistory, errorRegister, inError, initialized, lastErrorCode, lastErrorName, name, nodeID, serialNB, subs, tcpProxyalertSeparator| Constructor and Description |
|---|
CanCBXAI814(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 |
doInitializePDOs()
Do nothing if this device doesn't send PDOs except log for debug purpose.
|
long |
getInput(int i)
return input value read on ADC at channel 1
|
int[] |
getInputs() |
void |
initializeAndCheckHardware()
This methods has to be overridden if there is some initialization to do for
the device.
|
void |
postStart()
lifecycle commands
|
String |
printInputs() |
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
|
String |
toString() |
void |
updateFromPDO(org.lsst.ccs.drivers.canopenjni.PDOData pdo)
process PDOData to extract the values this device has sent.
|
build, configAsHeartbeatConsumer, configAsHeartbeatProducer, createStatusDataPublishedByCanOpenDevice, displayError, displayErrorHistory, displayErrorRegister, getAlertService, getErrorHistory, getErrorHistoryNB, getErrorRegister, getLastErrorCode, getLastErrorName, getName, getNodeID, getSerialNB, getSubsystem, getTcpProxy, isBooted, isInError, isInitialized, onEmergencyMessage, printSerialNumber, publishData, readErrorRegister, readNumberOfErrors, readSDO, resetError, saveParameters, setBooted, updateDeviceInfo, updateErrorHistory, writeSDO, writeTransmissionTypeToDeviceclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcheckBooted, checkId, checkInitialized, createStatusDataPublishedByHardware, getName, getNodeID, getSerialNB, initializePDOs, isBooted, isInitialized, printState, publishData, raiseAlarmIfMissing, raiseWarningIfMissing, setBooted, updateDeviceInfoonEmergencyMessage, onFault, onFaultResetclearAlarm, getAlertSeparator, getAlertService, getSubsystem, raiseAlarm, raiseAlarm, raiseAlarm, raiseAlarm, raiseAlarmOnlyIfNew, raiseAlertOnlyEveryTenMinutes, raiseAlertOnlyEveryTenMinutes, raiseAlertOnlyIfNew, raiseWarning, raiseWarning, raiseWarningOnlyEveryTenMinutes, raiseWarningOnlyIfNewpublic static final double adcVoltsPerBit
public static final double waterFreezeTemp
@ConfigurationParameter(description="UNDEFINED",
units="unitless")
protected volatile int transmissionType
public int[] inputs
protected int cobid1
protected int cobid2
public CanCBXAI814(int nodeID,
String serialNB,
int transmissionType)
nodeID - serialNB - transmissionType - public long getInput(int i)
ADCInterfacegetInput in interface ADCInterfacepublic int[] getInputs()
public void doInitializePDOs()
throws org.lsst.ccs.drivers.commons.DriverException
CanOpenDevicedoInitializePDOs in interface PieceOfHardwaredoInitializePDOs in class CanOpenDeviceorg.lsst.ccs.drivers.commons.DriverExceptionpublic void initializeAndCheckHardware()
CanOpenDeviceinitializeAndCheckHardware in interface PieceOfHardwareinitializeAndCheckHardware in class CanOpenDevicepublic int readAnalogInput(int inputNB)
readAnalogInput in interface ADCInterfaceinputNB - SDORequestExceptionHardwareNotDetectedExceptionpublic double readVoltage(int inputNB)
readVoltage in interface ADCInterfaceinputNB - : integer from 1 to 8SDORequestExceptionHardwareNotDetectedExceptionpublic void updateFromPDO(org.lsst.ccs.drivers.canopenjni.PDOData pdo)
updateFromPDO in interface PieceOfHardwareupdateFromPDO in class CanOpenDevicepdo - @Command(type=QUERY,
level=1,
description="print input values. For test and debug.")
public String printInputs()
@Command(type=QUERY,
level=1,
description="Return the string representation of CanCBXAI814.",
alias="print_cobid")
public String toString()
toString in class CanOpenDevicepublic void postStart()
postStart in interface org.lsst.ccs.framework.HasLifecycleCopyright © 2021 LSST. All rights reserved.