|
||||||||
| 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.RouterDevice
public class RouterDevice
Interface to the wireless router device BM7502. BlueSense routers acts as a portal between the PC and the BlueSense network. Some BlueSense routers are wireless. You can use the get and set channel methods to set the communcation channel BlueSense routers have a serial port which can be used for standard rs232 communication. Use the supplied metohods to set serial connection options.
| Field Summary | |
|---|---|
static int |
MAX_CHANNEL
|
static int |
PROXY_ID
|
static java.lang.String |
PROXY_TITLE
|
static int[] |
SUPPORTS
|
| Constructor Summary | |
|---|---|
RouterDevice(Master master,
int deviceId)
Creates a 'software' adcinput device with a given id. |
|
| Method Summary | |
|---|---|
int |
bsRouterDevice_getSerialWriteBufferPendingData()
|
int |
bsRouterDevice_writeSerialData(int[] data)
Writes serial data into the writebuffer which will be copied to the serial extension board. |
boolean |
configPending()
Checks if a configuration is being currently being set or being retrieved |
int |
getCurrentChannel()
Obtain the last retrieved wireless channel settings. |
int |
getCurrentSerialBaudRate()
|
int |
getCurrentSerialDataBits()
|
int |
getCurrentSerialParity()
|
int |
getCurrentSerialStopBits()
|
boolean |
getRequestGetConfigDone()
Checks if the configuration request is finished |
boolean |
getRequestSetConfigDone()
Checks if the configuration set request is finished |
boolean |
getSerialReceiveAsciiMode()
Returns the serial receive mode. |
long |
getTimeOutUs()
Returns the current set time out delay. |
int |
popReceivedSerialData(int[] receiveArray)
Retrieves received buffered data from the serial extension board. |
void |
requestGetConfiguration()
Request to obtain the configuration settings from a adcInput Device. |
void |
requestSetChannel(int channel)
Request the router device to set a new wireless channel |
void |
requestSetSerialConfiguration(int baudrate,
int stopbits,
int parity,
int databits)
Sets the configuration parameters for the serial extension board. |
void |
setSerialBufferSizes(int receiveSize,
int writeSize)
Sets buffer sizes to be used for receiving and writing data from/to the serial extension board |
void |
setSerialReceiveAsciiMode(boolean asciiMode)
Set serial receive mode. |
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 MAX_CHANNEL
| Constructor Detail |
|---|
public RouterDevice(Master master,
int deviceId)
master - deviceId - | Method Detail |
|---|
public int getCurrentChannel()
public boolean configPending()
public boolean getRequestGetConfigDone()
public boolean getRequestSetConfigDone()
public void requestGetConfiguration()
public void requestSetChannel(int channel)
channel - the new channel, should lie between 0 and BLUESENSE_WRTR_MAX_CHANNEL. @see BLUESENSE_WRTR_MAX_CHANNEL
public void requestSetSerialConfiguration(int baudrate,
int stopbits,
int parity,
int databits)
baudrate - the speed of serial communication default is 38400stopbits - number of stopbits, choose 2 or 1parity - parity bits: 4 = even, 3 = odd, 2 = mark, 1 = space, 0 = nonedatabits - number of databits: 5,6,7 or 8public int getCurrentSerialBaudRate()
public int getCurrentSerialDataBits()
public int getCurrentSerialStopBits()
public int getCurrentSerialParity()
public void setSerialBufferSizes(int receiveSize,
int writeSize)
public int popReceivedSerialData(int[] receiveArray)
receiveArray - an array which will be filled with the received data
public int bsRouterDevice_writeSerialData(int[] data)
data - an array of data bytes (values between 0-255).
public int bsRouterDevice_getSerialWriteBufferPendingData()
public void setSerialReceiveAsciiMode(boolean asciiMode)
asciiMode - true to set line oriented mode, false for no interpretation.public boolean getSerialReceiveAsciiMode()
public 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 | |||||||