public class CanOpenTTC580 extends CanOpenDevice implements TTC580Interface
| Modifier and Type | Field and Description |
|---|---|
protected int |
cobid1 |
protected int |
cobid2 |
static String |
FILTERPRESENCE |
static String |
LOCKSENSOR |
protected long |
pdo1
PDO1 represents sensors value for socket at STANDBY.
|
protected long |
pdo2
PDO2 represents the same data than PDO1 but for another socket, not at standby.
|
protected Map<String,SensorPluggedOnTTC580> |
sensorsMap
map of sensors attached to this device.
|
static String |
SLAVE_MODULE_SENSOR |
static String |
XMINUS |
static String |
XPLUS |
booted, errorHistory, errorRegister, inError, initialized, name, nodeID, serialNB, subs, tcpProxyalertSeparater| Constructor and Description |
|---|
CanOpenTTC580(int nodeID,
String serialNB) |
| Modifier and Type | Method and Description |
|---|---|
StatusDataPublishedByHYTTC580 |
createStatusDataPublishedByHYTTC580()
Creates an object to be published on the STATUS bus by an hyttc580 device.
|
void |
doInitializePDOs()
Do nothing if this device doesn't send PDOs except log for debug purpose.
|
int |
getCobid1() |
int |
getCobid2() |
int |
getFilterPresenceXm(long pdo)
return filter presence sensor for clampXminus
|
int |
getFilterPresenceXp(long pdo)
return filter presence sensor value for clampXplus.
|
int |
getLockXm(long pdo)
return lock sensor for clampXminus
|
int |
getLockXp(long pdo)
return lock sensor for clampXplus
|
long |
getPdo1() |
long |
getPdo2() |
int |
getSlaveModuleStatus(long pdo)
return slave module status.
|
short |
getSocketId(long pdo)
return socketId from PDO value
socket identification are the first 3 bits (reading from left to right).
|
void |
init() |
String |
printSensorsValues()
for tests
|
void |
publishData()
Publish Data on status bus for trending data base and GUIs.
|
void |
setPdo1(long pdoVal) |
void |
setPdo2(long pdo2) |
String |
toString() |
void |
updateFromPDO(org.lsst.ccs.drivers.canopenjni.PDOData pdo)
process PDOData to retrieve data from this device.
|
void |
updateSensorsFromPDO()
juste for tests and debug
|
protected void |
updateSocketSensors(short socketID,
long pdoValue)
update
|
configAsHeartbeatConsumer, configAsHeartbeatProducer, createStatusDataPublishedByCanOpenDevice, displayErrorHistory, displayErrorRegister, getAlertService, getErrorHistory, getErrorRegister, getName, getNodeID, getSerialNB, getSubsystem, getTcpProxy, initializeAndCheckHardware, isBooted, isInError, isInitialized, onEmergencyMessage, printSerialNumber, readErrorHistory, readErrorRegister, readNumberOfErrors, readSDO, resetError, saveParameters, setBooted, writeSDOclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcheckBooted, checkId, checkInitialized, createStatusDataPublishedByHardware, getName, getNodeID, getSerialNB, initializeAndCheckHardware, initializePDOs, isBooted, isInitialized, printState, raiseAlarmIfMissing, setBootedonEmergencyMessage, onFault, onFaultResetclearAlarm, getAlertService, getSubsystem, raiseAlarm, raiseAlarm, raiseAlarm, raiseAlarm, raiseWarning, raiseWarningpublic static final String LOCKSENSOR
public static final String FILTERPRESENCE
public static final String SLAVE_MODULE_SENSOR
public static final String XMINUS
public static final String XPLUS
protected int cobid1
protected int cobid2
@LookupField(strategy=TREE) protected Map<String,SensorPluggedOnTTC580> sensorsMap
protected long pdo1
protected long pdo2
public CanOpenTTC580(int nodeID,
String serialNB)
public int getCobid1()
public int getCobid2()
public void init()
init in interface org.lsst.ccs.framework.HasLifecycle@Command(type=QUERY,
description="return PDO1 value")
public long getPdo1()
getPdo1 in interface TTC580Interfacepublic void setPdo1(long pdoVal)
pdoVal - @Command(type=QUERY,
description="return PDO2 value")
public long getPdo2()
getPdo2 in interface TTC580Interfacepublic void setPdo2(long pdo2)
public void doInitializePDOs()
throws org.lsst.ccs.drivers.commons.DriverException
CanOpenDevicedoInitializePDOs in interface PieceOfHardwaredoInitializePDOs in class CanOpenDeviceorg.lsst.ccs.drivers.commons.DriverException@Command(type=QUERY,
level=3,
description="For DEBUG purpose. Send a sync command to CANbus, process response and update pdo1, pdo2 and sensors values")
public void updateSensorsFromPDO()
throws org.lsst.ccs.drivers.commons.DriverException
updateSensorsFromPDO in interface TTC580Interfaceorg.lsst.ccs.drivers.commons.DriverExceptionpublic void updateFromPDO(org.lsst.ccs.drivers.canopenjni.PDOData pdo)
throws org.lsst.ccs.drivers.commons.DriverException
updateFromPDO in interface PieceOfHardwareupdateFromPDO in class CanOpenDevicepdo - org.lsst.ccs.drivers.commons.DriverExceptionprotected void updateSocketSensors(short socketID,
long pdoValue)
socketID - pdoValue - @Command(type=QUERY,
description="return socketId from PDO value")
public short getSocketId(long pdo)
getSocketId in interface TTC580Interfacepdo - @Command(type=QUERY,
description="return lock sensor for clampXminus")
public int getLockXm(long pdo)
pdo - @Command(type=QUERY,
description="return filter presence sensor for clampXminus")
public int getFilterPresenceXm(long pdo)
pdo - @Command(type=QUERY,
description="return lock sensor for clampXplus")
public int getLockXp(long pdo)
pdo - @Command(type=QUERY,
description="return filter presence sensor for clampXplus")
public int getFilterPresenceXp(long pdo)
pdo - @Command(type=QUERY,
description="return Slave Module status")
public int getSlaveModuleStatus(long pdo)
pdo - @Command(type=QUERY) public String toString()
toString in class CanOpenDevice@Command(type=QUERY) public String printSensorsValues()
public StatusDataPublishedByHYTTC580 createStatusDataPublishedByHYTTC580()
@Command(type=QUERY,
level=0,
description="Publish data for hyttc580 device on the status bus.")
public void publishData()
publishData in interface PieceOfHardwarepublishData in class CanOpenDeviceCopyright © 2018 LSST. All rights reserved.