|
|||||||||
| 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
IVonHippelModuleControl
LEDGreenOff in interface IVonHippelModuleControljava.io.IOException
public int LEDGreenOn()
throws java.io.IOException
IVonHippelModuleControl
LEDGreenOn in interface IVonHippelModuleControljava.io.IOException
public int LEDRedOff()
throws java.io.IOException
IVonHippelModuleControl
LEDRedOff in interface IVonHippelModuleControljava.io.IOException
public int LEDRedOn()
throws java.io.IOException
IVonHippelModuleControl
LEDRedOn in interface IVonHippelModuleControljava.io.IOException
public void clearGPIO(int pin)
throws java.io.IOException
IVonHippelModuleControl
clearGPIO in interface IVonHippelModuleControlpin - to set as low
java.io.IOException
public void clearIOX(int pin)
throws java.io.IOException
IVonHippelModuleControl
clearIOX in interface IVonHippelModuleControljava.io.IOException
public void writeADC(int control)
throws java.io.IOException
writeADC in interface 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
IVonHippelModuleControl
readADC in interface IVonHippelModuleControljava.io.IOException
public void writeDAC(int digital)
throws java.io.IOException
writeDAC in interface 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
IVonHippelModuleControl
readDAC in interface 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
IVonHippelModuleControl
getRDACResistance in interface IVonHippelModuleControljava.io.IOException
public int getStatus()
throws java.io.IOException
IVonHippelModuleControl
getStatus in interface IVonHippelModuleControljava.io.IOException
public void makeGPIOIn(int pin)
throws java.io.IOException
IVonHippelModuleControl
makeGPIOIn in interface IVonHippelModuleControlpin - to set as Out
java.io.IOException
public void makeGPIOOut(int pin)
throws java.io.IOException
IVonHippelModuleControl
makeGPIOOut in interface IVonHippelModuleControlpin - to set as Out
java.io.IOException
public void makeIOXIn(int pin)
throws java.io.IOException
IVonHippelModuleControl
makeIOXIn in interface IVonHippelModuleControljava.io.IOException
public void makeIOXOut(int pin)
throws java.io.IOException
IVonHippelModuleControl
makeIOXOut in interface IVonHippelModuleControljava.io.IOException
public void setGPIO(int pin)
throws java.io.IOException
IVonHippelModuleControl
setGPIO in interface IVonHippelModuleControlpin - to set as high
java.io.IOException
public void setIOX(int pin)
throws java.io.IOException
IVonHippelModuleControl
setIOX in interface IVonHippelModuleControljava.io.IOException
public void setRDACResistance(int resistance)
throws java.io.IOException
IVonHippelModuleControl
setRDACResistance in interface IVonHippelModuleControlresistance - value
java.io.IOException
public int setLEDGreen(boolean state)
throws java.io.IOException
setLEDGreen in interface IModuleLEDControllerjava.io.IOException
public int setLEDRed(boolean state)
throws java.io.IOException
setLEDRed in interface IModuleLEDControllerstate - on = true, off = false;
java.io.IOExceptionpublic java.io.InputStream getRS232InputStream()
IVonHippelModuleControl
getRS232InputStream in interface IVonHippelModuleControlpublic java.io.OutputStream getRS232OutputStream()
IVonHippelModuleControl
getRS232OutputStream in interface IVonHippelModuleControl
public java.io.InputStream getSerialInputStream()
throws java.io.IOException
IVonHippelSerialPort
getSerialInputStream in interface IVonHippelSerialPortjava.io.IOException
public java.io.OutputStream getSerialOutputStream()
throws java.io.IOException
IVonHippelSerialPort
getSerialOutputStream in interface IVonHippelSerialPortjava.io.IOExceptionpublic java.lang.String getBaudrate()
getBaudrate in interface IVonHippelSerialPort
public void setBaudrate(java.lang.String baudrate)
throws java.io.IOException
IVonHippelSerialPort
setBaudrate in interface IVonHippelSerialPortjava.io.IOException - Is thrown if connection is already open.public int getBitsPerChar()
getBitsPerChar in interface IVonHippelSerialPortpublic java.lang.String getStopBits()
getStopBits in interface IVonHippelSerialPort
public void setStopBits(java.lang.String stopBits)
throws java.io.IOException
setStopBits in interface IVonHippelSerialPortjava.io.IOException - Is thrown if connection is already open.public java.lang.String getParity()
getParity in interface IVonHippelSerialPort
public void setParity(java.lang.String parity)
throws java.io.IOException
setParity in interface IVonHippelSerialPortjava.io.IOException - Is thrown if connection is already open.public boolean getAutoCTS()
getAutoCTS in interface IVonHippelSerialPort
public void setAutoCTS(boolean autoCTS)
throws java.io.IOException
setAutoCTS in interface IVonHippelSerialPortjava.io.IOException - Is thrown if connection is already open.public boolean getAutoRTS()
getAutoRTS in interface IVonHippelSerialPort
public void setAutoRTS(boolean autoRTS)
throws java.io.IOException
setAutoRTS in interface IVonHippelSerialPortjava.io.IOExceptionpublic boolean getBlocking()
getBlocking in interface IVonHippelSerialPort
public void setBlocking(boolean blocking)
throws java.io.IOException
setBlocking in interface IVonHippelSerialPortjava.io.IOExceptionpublic boolean isInputStreamOpen()
isInputStreamOpen in interface IVonHippelSerialPortpublic boolean isOutputStreamOpen()
isOutputStreamOpen in interface IVonHippelSerialPort
public void setBitsPerChar(int bitsPerChar)
throws java.io.IOException
setBitsPerChar in interface 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 | ||||||||