|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.buglabs.bug.module.vonhippel.VonHippelModuleControl
public class VonHippelModuleControl
| Field Summary |
|---|
| Fields inherited from interface com.buglabs.bug.module.vonhippel.pub.IVonHippelModuleControl |
|---|
VH_ADC_W1_CH0, VH_ADC_W1_CH01, VH_ADC_W1_CH1, VH_ADC_W1_CH10, VH_ADC_W1_CH2, VH_ADC_W1_CH23, VH_ADC_W1_CH3, VH_ADC_W1_CH32, VH_ADC_W1_EN, VH_ADC_W2_EN, VH_ADC_W2_IM, VH_ADC_W2_SPD, VH_DAC_BCH, VH_DAC_CHA, VH_DAC_CHB, VH_DAC_PD100K, VH_DAC_PD1K, VH_DAC_PDF, VH_DAC_PU, VH_DAC_W1_ALL, VH_DAC_W1_ALLA, VH_DAC_W1_ALLB, VH_DAC_W1_ALLI, VH_DAC_W1_EC, VH_DAC_W1_LA, VH_DAC_W1_LB, VH_DAC_W1_RDA, VH_DAC_W1_RDB, VH_DAC_W1_UA, VH_DAC_W1_UALL, VH_DAC_W1_UB |
| Constructor Summary | |
|---|---|
VonHippelModuleControl(VonHippel vh,
int slotId)
|
|
| Method Summary | |
|---|---|
void |
clearGPIO(int pin)
Sets specified pin as low |
void |
clearIOX(int pin)
Sets specified IOX pin as high. |
protected void |
dispose()
Close input and output streams. |
boolean |
getAutoCTS()
|
boolean |
getAutoRTS()
|
java.lang.String |
getBaudrate()
|
int |
getBitsPerChar()
|
boolean |
getBlocking()
|
java.lang.String |
getParity()
|
int |
getRDACResistance()
Get RDAC resistance value from ioctl |
java.io.InputStream |
getRS232InputStream()
Gets the input stream associated with the RS232 port on Von Hippel module. |
java.io.OutputStream |
getRS232OutputStream()
Gets the output stream associated with the RS232 port on Von Hippel module. |
java.io.InputStream |
getSerialInputStream()
Gets the input stream associated with the RS232 port on Von Hippel module. |
java.io.OutputStream |
getSerialOutputStream()
Gets the output stream associated with the RS232 port on Von Hippel module. |
int |
getStatus()
Returns status of module. |
java.lang.String |
getStopBits()
|
boolean |
isInputStreamOpen()
|
boolean |
isOutputStreamOpen()
|
int |
LEDGreenOff()
Set module's Green LED off. |
int |
LEDGreenOn()
Set module's Green LED on. |
int |
LEDRedOff()
Set module's Red LED off. |
int |
LEDRedOn()
Set module's Red LED on. |
void |
makeGPIOIn(int pin)
Sets specified pin as an in pin. |
void |
makeGPIOOut(int pin)
Sets specified pin as an output pin. |
void |
makeIOXIn(int pin)
Sets specified IOX pin as an in pin |
void |
makeIOXOut(int pin)
Sets specified IOX pin as an out pin |
int |
readADC()
Read value after last conversion. |
int |
readDAC(int channel)
Read channel after last conversion. |
void |
setAutoCTS(boolean autoCTS)
|
void |
setAutoRTS(boolean autoRTS)
|
void |
setBaudrate(java.lang.String baudrate)
Set baud rate for serial port. |
void |
setBitsPerChar(int bitsPerChar)
|
void |
setBlocking(boolean blocking)
|
void |
setGPIO(int pin)
Sets specified pin as high |
void |
setIOX(int pin)
Sets specified IOX pin as high. |
int |
setLEDGreen(boolean state)
|
int |
setLEDRed(boolean state)
|
void |
setParity(java.lang.String parity)
|
void |
setRDACResistance(int resistance)
Set RDAC to adjust LDO voltage |
void |
setStopBits(java.lang.String stopBits)
|
void |
writeADC(int control)
|
void |
writeDAC(int digital)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public VonHippelModuleControl(VonHippel vh,
int slotId)
| Method Detail |
|---|
protected void dispose()
public int LEDGreenOff()
throws java.io.IOException
com.buglabs.bug.module.vonhippel.pub.IVonHippelModuleControl
LEDGreenOff in interface com.buglabs.bug.module.vonhippel.pub.IVonHippelModuleControljava.io.IOException
public int LEDGreenOn()
throws java.io.IOException
com.buglabs.bug.module.vonhippel.pub.IVonHippelModuleControl
LEDGreenOn in interface com.buglabs.bug.module.vonhippel.pub.IVonHippelModuleControljava.io.IOException
public int LEDRedOff()
throws java.io.IOException
com.buglabs.bug.module.vonhippel.pub.IVonHippelModuleControl
LEDRedOff in interface com.buglabs.bug.module.vonhippel.pub.IVonHippelModuleControljava.io.IOException
public int LEDRedOn()
throws java.io.IOException
com.buglabs.bug.module.vonhippel.pub.IVonHippelModuleControl
LEDRedOn in interface com.buglabs.bug.module.vonhippel.pub.IVonHippelModuleControljava.io.IOException
public void clearGPIO(int pin)
throws java.io.IOException
com.buglabs.bug.module.vonhippel.pub.IVonHippelModuleControl
clearGPIO in interface com.buglabs.bug.module.vonhippel.pub.IVonHippelModuleControlpin - to set as low
java.io.IOException
public void clearIOX(int pin)
throws java.io.IOException
com.buglabs.bug.module.vonhippel.pub.IVonHippelModuleControl
clearIOX in interface com.buglabs.bug.module.vonhippel.pub.IVonHippelModuleControljava.io.IOException
public void writeADC(int control)
throws java.io.IOException
writeADC in interface com.buglabs.bug.module.vonhippel.pub.IVonHippelModuleControlcontrol - the control word to be written to ADC.
Used to initiate ADC conversion and also configure
ADC device for ADC single-ended or differential, among
other things. see bmi_vh.h and bmi_vh.c in kernel.
java.io.IOException
public int readADC()
throws java.io.IOException
com.buglabs.bug.module.vonhippel.pub.IVonHippelModuleControl
readADC in interface com.buglabs.bug.module.vonhippel.pub.IVonHippelModuleControljava.io.IOException
public void writeDAC(int digital)
throws java.io.IOException
writeDAC in interface com.buglabs.bug.module.vonhippel.pub.IVonHippelModuleControldigital - the control word encoded digital
input to be encoded as analog out. See datasheet and
bmi_vh.h and bmi_vh.c in kernel.
java.io.IOException
public int readDAC(int channel)
throws java.io.IOException
com.buglabs.bug.module.vonhippel.pub.IVonHippelModuleControl
readDAC in interface com.buglabs.bug.module.vonhippel.pub.IVonHippelModuleControlchannel - should be either VH_DAC_W1_RDA for channel A
or VH_DAC_W1_RDB for channel B.
java.io.IOException
public int getRDACResistance()
throws java.io.IOException
com.buglabs.bug.module.vonhippel.pub.IVonHippelModuleControl
getRDACResistance in interface com.buglabs.bug.module.vonhippel.pub.IVonHippelModuleControljava.io.IOException
public int getStatus()
throws java.io.IOException
com.buglabs.bug.module.vonhippel.pub.IVonHippelModuleControl
getStatus in interface com.buglabs.bug.module.vonhippel.pub.IVonHippelModuleControljava.io.IOException
public void makeGPIOIn(int pin)
throws java.io.IOException
com.buglabs.bug.module.vonhippel.pub.IVonHippelModuleControl
makeGPIOIn in interface com.buglabs.bug.module.vonhippel.pub.IVonHippelModuleControlpin - to set as Out
java.io.IOException
public void makeGPIOOut(int pin)
throws java.io.IOException
com.buglabs.bug.module.vonhippel.pub.IVonHippelModuleControl
makeGPIOOut in interface com.buglabs.bug.module.vonhippel.pub.IVonHippelModuleControlpin - to set as Out
java.io.IOException
public void makeIOXIn(int pin)
throws java.io.IOException
com.buglabs.bug.module.vonhippel.pub.IVonHippelModuleControl
makeIOXIn in interface com.buglabs.bug.module.vonhippel.pub.IVonHippelModuleControljava.io.IOException
public void makeIOXOut(int pin)
throws java.io.IOException
com.buglabs.bug.module.vonhippel.pub.IVonHippelModuleControl
makeIOXOut in interface com.buglabs.bug.module.vonhippel.pub.IVonHippelModuleControljava.io.IOException
public void setGPIO(int pin)
throws java.io.IOException
com.buglabs.bug.module.vonhippel.pub.IVonHippelModuleControl
setGPIO in interface com.buglabs.bug.module.vonhippel.pub.IVonHippelModuleControlpin - to set as high
java.io.IOException
public void setIOX(int pin)
throws java.io.IOException
com.buglabs.bug.module.vonhippel.pub.IVonHippelModuleControl
setIOX in interface com.buglabs.bug.module.vonhippel.pub.IVonHippelModuleControljava.io.IOException
public void setRDACResistance(int resistance)
throws java.io.IOException
com.buglabs.bug.module.vonhippel.pub.IVonHippelModuleControl
setRDACResistance in interface com.buglabs.bug.module.vonhippel.pub.IVonHippelModuleControlresistance - value
java.io.IOException
public int setLEDGreen(boolean state)
throws java.io.IOException
setLEDGreen in interface com.buglabs.module.IModuleLEDControllerjava.io.IOException
public int setLEDRed(boolean state)
throws java.io.IOException
setLEDRed in interface com.buglabs.module.IModuleLEDControllerstate - on = true, off = false;
java.io.IOExceptionpublic java.io.InputStream getRS232InputStream()
com.buglabs.bug.module.vonhippel.pub.IVonHippelModuleControl
getRS232InputStream in interface com.buglabs.bug.module.vonhippel.pub.IVonHippelModuleControlpublic java.io.OutputStream getRS232OutputStream()
com.buglabs.bug.module.vonhippel.pub.IVonHippelModuleControl
getRS232OutputStream in interface com.buglabs.bug.module.vonhippel.pub.IVonHippelModuleControl
public java.io.InputStream getSerialInputStream()
throws java.io.IOException
com.buglabs.bug.module.vonhippel.pub.IVonHippelSerialPort
getSerialInputStream in interface com.buglabs.bug.module.vonhippel.pub.IVonHippelSerialPortjava.io.IOException
public java.io.OutputStream getSerialOutputStream()
throws java.io.IOException
com.buglabs.bug.module.vonhippel.pub.IVonHippelSerialPort
getSerialOutputStream in interface com.buglabs.bug.module.vonhippel.pub.IVonHippelSerialPortjava.io.IOExceptionpublic java.lang.String getBaudrate()
getBaudrate in interface com.buglabs.bug.module.vonhippel.pub.IVonHippelSerialPort
public void setBaudrate(java.lang.String baudrate)
throws java.io.IOException
com.buglabs.bug.module.vonhippel.pub.IVonHippelSerialPort
setBaudrate in interface com.buglabs.bug.module.vonhippel.pub.IVonHippelSerialPortjava.io.IOException - Is thrown if connection is already open.public int getBitsPerChar()
getBitsPerChar in interface com.buglabs.bug.module.vonhippel.pub.IVonHippelSerialPortpublic java.lang.String getStopBits()
getStopBits in interface com.buglabs.bug.module.vonhippel.pub.IVonHippelSerialPort
public void setStopBits(java.lang.String stopBits)
throws java.io.IOException
setStopBits in interface com.buglabs.bug.module.vonhippel.pub.IVonHippelSerialPortjava.io.IOException - Is thrown if connection is already open.public java.lang.String getParity()
getParity in interface com.buglabs.bug.module.vonhippel.pub.IVonHippelSerialPort
public void setParity(java.lang.String parity)
throws java.io.IOException
setParity in interface com.buglabs.bug.module.vonhippel.pub.IVonHippelSerialPortjava.io.IOException - Is thrown if connection is already open.public boolean getAutoCTS()
getAutoCTS in interface com.buglabs.bug.module.vonhippel.pub.IVonHippelSerialPort
public void setAutoCTS(boolean autoCTS)
throws java.io.IOException
setAutoCTS in interface com.buglabs.bug.module.vonhippel.pub.IVonHippelSerialPortjava.io.IOException - Is thrown if connection is already open.public boolean getAutoRTS()
getAutoRTS in interface com.buglabs.bug.module.vonhippel.pub.IVonHippelSerialPort
public void setAutoRTS(boolean autoRTS)
throws java.io.IOException
setAutoRTS in interface com.buglabs.bug.module.vonhippel.pub.IVonHippelSerialPortjava.io.IOExceptionpublic boolean getBlocking()
getBlocking in interface com.buglabs.bug.module.vonhippel.pub.IVonHippelSerialPort
public void setBlocking(boolean blocking)
throws java.io.IOException
setBlocking in interface com.buglabs.bug.module.vonhippel.pub.IVonHippelSerialPortjava.io.IOExceptionpublic boolean isInputStreamOpen()
isInputStreamOpen in interface com.buglabs.bug.module.vonhippel.pub.IVonHippelSerialPortpublic boolean isOutputStreamOpen()
isOutputStreamOpen in interface com.buglabs.bug.module.vonhippel.pub.IVonHippelSerialPort
public void setBitsPerChar(int bitsPerChar)
throws java.io.IOException
setBitsPerChar in interface com.buglabs.bug.module.vonhippel.pub.IVonHippelSerialPortjava.io.IOException - Is thrown if connection is already open.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||