|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.bluemelon.bluesense.Device
org.bluemelon.bluesense.AdcInputDevice
public class AdcInputDevice
Interface to the analog input device BM7003. The BM7003 can be used to convert analogue signals into digital values. The module contains six inputs for different analogue signals. Via software you can configure the resolution of the AD coversion from 1 to 10 bits. The sample rate canbe adjusted in steps of 1 ms to a maximum of 1000 samples per second.
| Field Summary | |
|---|---|
static int |
ADCINPUT_P1
Port pin value for pin 1 |
static int |
ADCINPUT_P2
Port pin value for pin 2 |
static int |
ADCINPUT_P3
Port pin value for pin 3 |
static int |
ADCINPUT_P4
Port pin value for pin 4 |
static int |
ADCINPUT_P5
Port pin value for pin 5 |
static int |
ADCINPUT_P6
Port pin value for pin 6 |
static int |
INPUT_COUNT
|
static int |
MAX_RESOLUTION
|
static int |
MAX_VREF
|
static int |
PROXY_ID
|
static java.lang.String |
PROXY_TITLE
|
static int[] |
SUPPORTS
|
| Constructor Summary | |
|---|---|
AdcInputDevice(Master master,
int deviceId)
Creates a 'software' adcinput device with a given id. |
|
| Method Summary | |
|---|---|
boolean |
configPending()
Checks if a configuration is being currently being set or being retrieved |
int |
getChangedInputsMask()
|
int |
getCurrentResolution()
Obtain the last retrieved resolution settings. |
int |
getCurrentSampleDelay()
Obtain the last retrieved sample delay settings. |
int |
getCurrentVoltageReference()
Obtain the last retrieved voltage reference settings. |
int |
getLastSampledInput(int port)
Gets the analog input value of a certain port. |
boolean |
getRequestGetConfigDone()
Checks if the configuration request is finished |
boolean |
getRequestSetConfigDone()
Checks if the configuration set request is finished |
long |
getSampleCount()
|
long |
getTimeOutUs()
Returns the current set time out delay. |
void |
requestGetConfiguration()
Request to obtain the configuration settings from a adcInput Device. |
void |
requestSetConfiguration(int voltageReference,
int sampleDelay,
int resolution)
Request the adcInput device to set a new reference voltage, sample delay and resolution |
void |
requestSetResolution(int resolution)
Requests the adcInput device to set a new sample resolution |
void |
requestSetSampleDelay(int sampleDelay)
Requests the adcInput device to set a new sample delay |
void |
requestSetVoltageReference(int voltageReference)
Requests the adcInput device to set a new reference voltage |
void |
setTimeOutUs(int timeOutUs)
Sets the time out value which is used to check if a request was acknowledged in the set time. |
| Methods inherited from class org.bluemelon.bluesense.Device |
|---|
addDeviceEventListener, detect, getFirmwareVersion, getId, getType, getTypeName, isAccessible, removeDeviceEventListener |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String PROXY_TITLE
public static final int PROXY_ID
public static final int[] SUPPORTS
public static final int INPUT_COUNT
public static final int MAX_VREF
public static final int MAX_RESOLUTION
public static final int ADCINPUT_P1
public static final int ADCINPUT_P2
public static final int ADCINPUT_P3
public static final int ADCINPUT_P4
public static final int ADCINPUT_P5
public static final int ADCINPUT_P6
| Constructor Detail |
|---|
public AdcInputDevice(Master master,
int deviceId)
master - deviceId - | Method Detail |
|---|
public int getLastSampledInput(int port)
port - pin port value. @see bsAdcInput_p1
public long getSampleCount()
public int getCurrentResolution()
public int getCurrentSampleDelay()
public int getCurrentVoltageReference()
public boolean configPending()
public boolean getRequestGetConfigDone()
public boolean getRequestSetConfigDone()
public void requestGetConfiguration()
public void requestSetConfiguration(int voltageReference,
int sampleDelay,
int resolution)
voltageReference - the new reference voltage in mv, should lie between 1000 and ADC_MAX_VREF. @see ADC_MAX_VREFsampleDelay - sets the delay in ms (0-65535) between samples.resolution - the sample resolution in bits, should lie between 1 and BLUESENSE_ADCIN_MAX_RESOLUTION. @see BLUESENSE_ADCIN_MAX_RESOLUTIONpublic void requestSetResolution(int resolution)
resolution - the sample resolution in bits, should lie between 1 and BLUESENSE_ADCIN_MAX_RESOLUTION. @see BLUESENSE_ADCIN_MAX_RESOLUTIONpublic void requestSetSampleDelay(int sampleDelay)
sampleDelay - sets the delay in ms (0-65535) between samples.public void requestSetVoltageReference(int voltageReference)
voltageReference - the new reference voltage in mv, should lie between 1000 and ADC_MAX_VREF. @see ADC_MAX_VREFpublic long getTimeOutUs()
public void setTimeOutUs(int timeOutUs)
timeOutUs - the value in microseconds which is the maximum duraion between a request and its answer.public int getChangedInputsMask()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||