public class CanFestivalJNI extends Object implements CanOpenInterface
| Constructor and Description |
|---|
CanFestivalJNI() |
| Modifier and Type | Method and Description |
|---|---|
void |
addReceivedPDO(int cobId)
Enables reception of the PDO identified by cob_id at the specified index.
|
void |
clearCallBack(int nodeId,
int rw)
to be used in case of sdoTimeout.
|
void |
clearReceivedPDOs()
Reset all RxPDOs previously added.
|
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)
Slave reset
|
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 aPDOTimeout)
set a timeout in milliseconds for PDO : after a sync, canfestival returns
DATA after this timeout.
|
void |
setSdoTimeout(long sdoTimeout) |
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 addReceivedPDO(int cobId)
addReceivedPDO in interface CanOpenInterfacecobId - public void clearReceivedPDOs()
clearReceivedPDOs in interface CanOpenInterface@Command
public void init(int master,
String baud,
String busName,
int nodeID)
CanOpenInterfaceinit in interface CanOpenInterfacemaster - 1baud - "125K" or 1MbusName - 0 or 1nodeID - the master nodeId : 8public void setEmergencyMessageListener(EmergencyMessageListener eml)
setEmergencyMessageListener in interface CanOpenInterfacepublic void setBootMessageListener(BootMessageListener bml)
setBootMessageListener in interface CanOpenInterface@Command public PDOData sync() throws org.lsst.ccs.drivers.commons.DriverException, org.lsst.ccs.drivers.commons.DriverTimeoutException, ConcurrentCallException
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 yet@Command public int scan()
CanOpenInterfacescan in interface CanOpenInterface@Command public String info(int nodeID) throws org.lsst.ccs.drivers.commons.DriverException
CanOpenInterfaceinfo in interface CanOpenInterfacenodeID - the node idorg.lsst.ccs.drivers.commons.DriverException@Command
public void wsdo(int nodeId,
int index,
int subindex,
int size,
long data)
throws org.lsst.ccs.drivers.commons.DriverException,
org.lsst.ccs.drivers.commons.DriverTimeoutException,
ConcurrentCallException
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 yet@Command
public long rsdo(int nodeId,
int index,
int subindex)
throws org.lsst.ccs.drivers.commons.DriverException,
org.lsst.ccs.drivers.commons.DriverTimeoutException,
ConcurrentCallException
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)
ssta in interface CanOpenInterfacenodeId - public void ssto(int nodeId)
ssto in interface CanOpenInterfacenodeId - public void reset(int nodeId)
reset in interface CanOpenInterfacenodeId - public void quit()
CanOpenInterfacequit in interface CanOpenInterfacepublic void init()
init in interface CanOpenInterfacepublic void start()
start in interface CanOpenInterfacepublic void stop()
stop in interface CanOpenInterfacepublic boolean isReady()
isReady in interface CanOpenInterfacepublic void setSdoTimeout(long sdoTimeout)
setSdoTimeout in interface CanOpenInterfacepublic void setPdoTimeout(long aPDOTimeout)
setPdoTimeout in interface CanOpenInterfaceaPDOTimeout - in milliseconds@Command
public void clearCallBack(int nodeId,
int rw)
nodeId - the node id to reset the callbacks for. 0 to reset the pdo
callback.rw - @Command public void setNMTStateOperational(int nodeId)
setNMTStateOperational in interface CanOpenInterfaceCopyright © 2019 LSST. All rights reserved.