|
||||||||
| 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.RelayOutputDevice
public class RelayOutputDevice
| Field Summary | |
|---|---|
static int |
OUTPUTCOUNT
|
static int |
PROXY_ID
|
static java.lang.String |
PROXY_TITLE
|
static int |
RELAYOUTPUT_P_1
Port pin value for pin 1 |
static int |
RELAYOUTPUT_P_2
Port pin value for pin 2 |
static int |
RELAYOUTPUT_P_3
Port pin value for pin 3 |
static int[] |
SUPPORTS
|
| Constructor Summary | |
|---|---|
RelayOutputDevice(Master master,
int deviceId)
Creates a bluesense device with id 'deviceid' |
|
| Method Summary | |
|---|---|
boolean |
getCurrentOutput(int port)
returns output state of a pin |
int |
getCurrentOutputs()
Returns the current output states (in a multiplexed value) |
boolean |
getPendingOutput(int port)
Returns the 'tobe set' state of an output |
int |
getPendingOutputs()
Returns a bitmask containing which outputs are be set after the request finishes |
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 states |
void |
requestSetOutput(int port,
boolean state)
Sends a request to set a single output to a new state |
void |
requestSetOutputs(int mask,
int states)
Sends a request to update the output states of the device. |
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 OUTPUTCOUNT
public static final int RELAYOUTPUT_P_1
public static final int RELAYOUTPUT_P_2
public static final int RELAYOUTPUT_P_3
| Constructor Detail |
|---|
public RelayOutputDevice(Master master,
int deviceId)
deviceId - the new device has getFound() set to false until
the device has been physically detected!| Method Detail |
|---|
public void requestGetOutputs()
public boolean getCurrentOutput(int port)
port - port pin value. @see bsRelayOutput_pA_1public int getCurrentOutputs()
public void requestSetOutput(int port,
boolean state)
port - port pin value. @see bsRelayOutput_p_1state - the new state of the output. 1 activates, 0 disables.public boolean getRequestSetOutputsDone()
public long getTimeOutUs()
public void setTimeOutUs(int timeOutUs)
timeOutUs - the value in microseconds which is the maximum duraion between a request and its answer.
public void requestSetOutputs(int mask,
int states)
mask - a bit mask indicating which outputs to updatestates - an uint16_t bit mask containing the new output states.
Only those outputs will be updated for which a bit is set in the relevantBits parameterpublic int getPendingOutputs()
public boolean getPendingOutput(int port)
port - port pin value. @see bsRelayOutput_pA_1
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||