public class CanOpenRMIClient extends Object implements CanOpenInterface
| Constructor and Description |
|---|
CanOpenRMIClient(String registryHostName,
String bindName) |
| Modifier and Type | Method and Description |
|---|---|
void |
addReceivedPDO(int cobId)
Configures the pdo with the given cob_id for reception on the master node.
|
void |
clearReceivedPDOs() |
String |
info(int nodeID)
Returns the information for the given nodeID.
|
void |
init() |
void |
init(int master,
String baud,
String busName,
int nodeID)
Initialization of the master node.
|
boolean |
isReady() |
void |
quit()
Shuts down the master node.
|
void |
reset(int nodeId) |
long |
rsdo(int nodeId,
int index,
int subindex)
Send a read sdo command.
|
int |
scan()
Sends a scan on the can bus.
|
void |
setBootMessageListener(BootMessageListener bml) |
void |
setEmergencyMessageListener(EmergencyMessageListener eml) |
void |
setNMTStateOperational(int nodeId) |
void |
setPdoTimeout(long to) |
void |
setSdoTimeout(long to) |
void |
ssta(int nodeId)
Slave start
|
void |
ssto(int nodeId)
Slave stop
|
void |
start() |
void |
stop() |
PDOData |
sync()
Sends a sync message on the canbus and synchronously waits for the received
pdo configured in the master to be received.
|
void |
wsdo(int nodeId,
int index,
int subindex,
int size,
long data)
Send a write sdo command.
|
public void init(int master,
String baud,
String busName,
int nodeID)
throws org.lsst.ccs.drivers.commons.DriverException
CanOpenInterfaceinit in interface CanOpenInterfacemaster - 1 for master, 0 for slave.baud - "125K","1M",...busName - the bus name (0 for can0, 1 for can1)nodeID - the nodeIDorg.lsst.ccs.drivers.commons.DriverExceptionpublic void addReceivedPDO(int cobId)
throws org.lsst.ccs.drivers.commons.DriverException
CanOpenInterfaceaddReceivedPDO in interface CanOpenInterfaceorg.lsst.ccs.drivers.commons.DriverExceptionpublic void clearReceivedPDOs()
throws org.lsst.ccs.drivers.commons.DriverException
clearReceivedPDOs in interface CanOpenInterfaceorg.lsst.ccs.drivers.commons.DriverExceptionpublic PDOData sync() throws org.lsst.ccs.drivers.commons.DriverException
CanOpenInterfacesync in interface CanOpenInterfaceorg.lsst.ccs.drivers.commons.DriverException - in case of a failure accessing the hardware, or if the hardware returns an errororg.lsst.ccs.drivers.commons.DriverTimeoutException - if the hardware doesn't respond within the specified timeoutConcurrentCallException - if a sync command is running and hasn't completed yetpublic int scan()
throws org.lsst.ccs.drivers.commons.DriverException
CanOpenInterfacescan in interface CanOpenInterfaceorg.lsst.ccs.drivers.commons.DriverExceptionpublic String info(int nodeID) throws org.lsst.ccs.drivers.commons.DriverException
CanOpenInterfaceinfo in interface CanOpenInterfacenodeID - the node idorg.lsst.ccs.drivers.commons.DriverExceptionpublic void wsdo(int nodeId,
int index,
int subindex,
int size,
long data)
throws org.lsst.ccs.drivers.commons.DriverException
CanOpenInterfacewsdo in interface CanOpenInterfaceorg.lsst.ccs.drivers.commons.DriverException - in case of a failure accessing the hardware, or if the hardware returns an errororg.lsst.ccs.drivers.commons.DriverTimeoutException - if the hardware doesn't respond within the specified timeoutConcurrentCallException - if a write sdo / read sdo command was sent on the same node and hasn't completed yetpublic long rsdo(int nodeId,
int index,
int subindex)
throws org.lsst.ccs.drivers.commons.DriverException
CanOpenInterfacersdo in interface CanOpenInterfaceorg.lsst.ccs.drivers.commons.DriverException - in case of a failure accessing the hardware, or if the hardware returns an errororg.lsst.ccs.drivers.commons.DriverTimeoutException - if the hardware doesn't respond within the specified timeoutConcurrentCallException - if a write sdo / read sdo command was sent on the same node and hasn't completed yetpublic void ssta(int nodeId)
throws org.lsst.ccs.drivers.commons.DriverException
CanOpenInterfacessta in interface CanOpenInterfaceorg.lsst.ccs.drivers.commons.DriverExceptionpublic void ssto(int nodeId)
throws org.lsst.ccs.drivers.commons.DriverException
CanOpenInterfacessto in interface CanOpenInterfaceorg.lsst.ccs.drivers.commons.DriverExceptionpublic void reset(int nodeId)
throws org.lsst.ccs.drivers.commons.DriverException
reset in interface CanOpenInterfaceorg.lsst.ccs.drivers.commons.DriverExceptionpublic void quit()
throws org.lsst.ccs.drivers.commons.DriverException
CanOpenInterfacequit in interface CanOpenInterfaceorg.lsst.ccs.drivers.commons.DriverExceptionpublic void init()
throws org.lsst.ccs.drivers.commons.DriverException
init in interface CanOpenInterfaceorg.lsst.ccs.drivers.commons.DriverExceptionpublic void start()
throws org.lsst.ccs.drivers.commons.DriverException
start in interface CanOpenInterfaceorg.lsst.ccs.drivers.commons.DriverExceptionpublic void stop()
throws org.lsst.ccs.drivers.commons.DriverException
stop in interface CanOpenInterfaceorg.lsst.ccs.drivers.commons.DriverExceptionpublic boolean isReady()
throws org.lsst.ccs.drivers.commons.DriverException
isReady in interface CanOpenInterfaceorg.lsst.ccs.drivers.commons.DriverExceptionpublic void setEmergencyMessageListener(EmergencyMessageListener eml) throws org.lsst.ccs.drivers.commons.DriverException
setEmergencyMessageListener in interface CanOpenInterfaceorg.lsst.ccs.drivers.commons.DriverExceptionpublic void setBootMessageListener(BootMessageListener bml) throws org.lsst.ccs.drivers.commons.DriverException
setBootMessageListener in interface CanOpenInterfaceorg.lsst.ccs.drivers.commons.DriverExceptionpublic void setSdoTimeout(long to)
throws org.lsst.ccs.drivers.commons.DriverException
setSdoTimeout in interface CanOpenInterfaceorg.lsst.ccs.drivers.commons.DriverExceptionpublic void setPdoTimeout(long to)
throws org.lsst.ccs.drivers.commons.DriverException
setPdoTimeout in interface CanOpenInterfaceorg.lsst.ccs.drivers.commons.DriverExceptionpublic void setNMTStateOperational(int nodeId)
throws org.lsst.ccs.drivers.commons.DriverException
setNMTStateOperational in interface CanOpenInterfaceorg.lsst.ccs.drivers.commons.DriverExceptionCopyright © 2022 LSST. All rights reserved.