orc
Class Orc
java.lang.Object
orc.Orc
public class Orc
- extends java.lang.Object
Represents a connection to a uOrc board.
|
Constructor Summary |
Orc(java.net.InetAddress inetaddr)
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FAST_DIGIO_MODE_IN
public static final int FAST_DIGIO_MODE_IN
- See Also:
- Constant Field Values
FAST_DIGIO_MODE_OUT
public static final int FAST_DIGIO_MODE_OUT
- See Also:
- Constant Field Values
FAST_DIGIO_MODE_SERVO
public static final int FAST_DIGIO_MODE_SERVO
- See Also:
- Constant Field Values
FAST_DIGIO_MODE_SLOW_PWM
public static final int FAST_DIGIO_MODE_SLOW_PWM
- See Also:
- Constant Field Values
verbose
public boolean verbose
Orc
public Orc(java.net.InetAddress inetaddr)
throws java.io.IOException
- Throws:
java.io.IOException
main
public static void main(java.lang.String[] args)
getAddress
public java.net.InetAddress getAddress()
makeOrc
public static Orc makeOrc()
toHostUtime
public long toHostUtime(long uorcUtime)
getVersion
public java.lang.String getVersion()
makeOrc
public static Orc makeOrc(java.lang.String hostname)
addListener
public void addListener(OrcListener ol)
doCommand
public OrcResponse doCommand(int commandId,
byte[] payload)
doCommandEx
public OrcResponse doCommandEx(int commandId,
byte[] payload)
throws java.io.IOException
- try a transaction once
- Throws:
java.io.IOException
getStatus
public OrcStatus getStatus()
i2cTransaction
public byte[] i2cTransaction(int addr,
java.lang.Object... os)
- Perform an I2C transaction. The transaction consists of up to
two phases, a write followed by a read.
- Parameters:
addr - The I2C address, [0,127]writebuf - A buffer containing data to be written. If
null, then the write phase will be skipped.readlen - The number of bytes to read after the write
phase. If zero, the read phase will be skipped.
- Returns:
- The data from the I2C read phase, or null if readlen
was zero.
spiTransaction
public int[] spiTransaction(int slaveClk,
int spo,
int sph,
int nbits,
int[] writebuf)