|
||||||||
| 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.DacOutputDevice
public class DacOutputDevice
Interface to the servo motor module BM7006. The BM7006 can be used to output up to 8 analog signals.
| Field Summary | |
|---|---|
static int |
BSDAC_P1
Port value for pin 1 |
static int |
BSDAC_P2
Port value for pin 2 |
static int |
BSDAC_P3
Port value for pin 3 |
static int |
BSDAC_P4
Port value for pin 4 |
static int |
BSDAC_P5
Port value for pin 5 |
static int |
BSDAC_P6
Port value for pin 6 |
static int |
OUTPUTCOUNT
The number of outputs that can be controlled |
static int |
PROXY_ID
|
static java.lang.String |
PROXY_TITLE
|
static int[] |
SUPPORTS
|
| Constructor Summary | |
|---|---|
DacOutputDevice(Master master,
int deviceId)
Creates a 'software' analog output device proxy with a given id. |
|
| Method Summary | |
|---|---|
int |
getCurrentOutput(int port)
Returns the current set value of a specific output. |
void |
getCurrentOutputs(int[] outputArray)
Fills an array with the current set output values. |
int |
getPendingOutput(int port)
Returns the value of a specific output, which is currently underway to the device |
void |
getPendingOutputs(int[] outputs)
Fills an array with output values which are currently underway to the device |
boolean |
getRequestSetOutputsDone()
Checks if the output set request is finished |
long |
getTimeOutUs()
Returns the current set time out delay. |
void |
requestGetOutputs()
Sends a request to retrieve the current set output values |
void |
requestSetOutput(int port,
int output)
Requests the dac output device to set one of its outputs to a new value |
void |
requestSetOutputs(int relevantOutputs,
int[] outputs)
Requests the analog output device to set its outputs to new values |
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[] SUPPORTS
public static final int PROXY_ID
public static final int OUTPUTCOUNT
public static final int BSDAC_P1
public static final int BSDAC_P2
public static final int BSDAC_P3
public static final int BSDAC_P4
public static final int BSDAC_P5
public static final int BSDAC_P6
| Constructor Detail |
|---|
public DacOutputDevice(Master master,
int deviceId)
master - deviceId - | Method Detail |
|---|
public void requestSetOutputs(int relevantOutputs,
int[] outputs)
relevantOutputs - a bit mask indicating which outputs to updateoutputs - a pointer to an array of uint8_t values with enough space for all outputs. @see OUTPUTCOUNT
Only those outputs for which a bit in the bit mask is set will be sent to the device.
Note that each output is a value between 0 and 255.
public void requestSetOutput(int port,
int output)
port - one of the port pin values. @see bsDacOutput_p1output - an uint8_t representing the new value of the output.
Note that each output is value between 0 and 255.public void requestGetOutputs()
public void getPendingOutputs(int[] outputs)
outputs - a pointer to an array of uint8_t outputs with enough space for all outputs. @see OUTPUTCOUNTpublic int getPendingOutput(int port)
port - one of the port pin values. @see bsDacOutput_p1
public boolean getRequestSetOutputsDone()
public int getCurrentOutput(int port)
port - one of the port pin values. @see bsDacOutput_p1
public void getCurrentOutputs(int[] outputArray)
outputArray - a pointer to an array of uint8_t values with enough space for all outputs. @see OUTPUTCOUNTpublic long getTimeOutUs()
public void setTimeOutUs(int timeOutUs)
timeOutUs - the value in microseconds which is the maximum duraion between a request and its answer.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||