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 |
addReceivedPDO(int bus,
int cobId) |
void |
clearCallBack(int nodeId,
int rw)
to be used in case of sdoTimeout.
|
void |
clearCallBack(int bus,
int nodeId,
int rw) |
void |
clearReceivedPDOs()
Reset all RxPDOs previously added.
|
void |
clearReceivedPDOs(int bus) |
static int |
getBus(String busName) |
String |
info(int nodeID)
Deprecated.
|
void |
init() |
void |
init(int master,
String baud,
String busName,
int nodeID)
Initialization of the master node.
|
void |
init(int master,
String baud,
String busName,
int bus,
int nodeID) |
boolean |
isReady() |
void |
quit()
Shuts down the master node.
|
void |
quit(int bus) |
void |
reset(int nodeId)
Slave reset
|
void |
reset(int bus,
int nodeId) |
long |
rsdo(int nodeId,
int index,
int subindex)
Send a read sdo command.
|
int |
scan()
Sends a scan on the can bus.
|
int |
scan(int bus) |
void |
setBootMessageListener(BootMessageListener bml) |
void |
setEmergencyMessageListener(EmergencyMessageListener eml) |
void |
setNMTStateOperational(int nodeId) |
void |
setNMTStateOperational(int bus,
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 |
ssta(int bus,
int nodeId) |
void |
ssto(int nodeId)
Slave stop
|
void |
ssto(int bus,
int nodeId) |
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 addReceivedPDO(int bus,
int cobId)
public void clearReceivedPDOs()
clearReceivedPDOs in interface CanOpenInterfacepublic void clearReceivedPDOs(int bus)
public static int getBus(String busName)
@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 CanOpenInterfacepublic int scan(int bus)
@Command @Deprecated 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 ssta(int bus,
int nodeId)
public void ssto(int nodeId)
ssto in interface CanOpenInterfacenodeId - public void ssto(int bus,
int nodeId)
public void reset(int nodeId)
reset in interface CanOpenInterfacenodeId - public void reset(int bus,
int nodeId)
public void quit()
CanOpenInterfacequit in interface CanOpenInterfacepublic void quit(int bus)
public 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 - public void clearCallBack(int bus,
int nodeId,
int rw)
@Command public void setNMTStateOperational(int nodeId)
setNMTStateOperational in interface CanOpenInterfacepublic void setNMTStateOperational(int bus,
int nodeId)
Copyright © 2020 LSST. All rights reserved.