|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.bluemelon.bluesense.Master
public class Master
The master class forms the gateway between the BlueSense network and the Java application.
| Constructor Summary | |
|---|---|
Master()
Constructs a Master with id 0 (default). |
|
Master(int id)
Constructs a Master a given id. |
|
| Method Summary | |
|---|---|
void |
addIPAddress(java.lang.String ip,
java.lang.String usrName,
java.lang.String password)
Connects to a BlueSense internet master via internet |
void |
aSyncYield(int intervalUs)
Takes care of data transmission/reception from the BlueSense network. |
void |
autoYield(int duration,
int interval)
Calls yield every interval us for a total of duration us. |
void |
clearDeviceTable()
Clears the device table. |
void |
clearMessages()
Clears last errors |
void |
close()
Closes the master. |
Device |
detectDevice(int id,
int timeOut)
Try to detect a device with a given identifier. |
int |
detectDevices(int count,
int timeOut)
Detects a number of devices |
void |
dispose()
Used by PApplet (Processing) to shut things down. |
Device |
getDeviceById(int id)
Returns the device with the given id. |
Device |
getFirstDevice()
Gets the first found device from the table. |
java.lang.String |
getLastMessage(int index)
Get last error messages |
int |
getListedDeviceCount()
Return the total number of found devices in the table. |
int |
getMessageCount()
Returns the number of occurred messages |
Device |
getNextDevice(Device dev)
Gets the next device from the table. |
long |
getTimeUs()
|
void |
requestDeviceTable()
Checks if there are new devices. |
void |
setEventMethod(java.lang.Object data,
java.lang.reflect.Method evtMethod)
Supply a method that will be called when certain events take place. |
void |
start(int intervalMs)
Starts communication process. |
void |
startTimeDebug()
|
void |
stop()
Stops communication process. |
void |
yield()
Takes care of data transmission/reception from the BlueSense network. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Master()
public Master(int id)
id - Not used at the moment, supply 0.| Method Detail |
|---|
public void setEventMethod(java.lang.Object data,
java.lang.reflect.Method evtMethod)
data - object instance on which the method will be called.evtMethod - the method.public void close()
public void start(int intervalMs)
intervalMs - master.yield is called every intervalMs miliseconds.public void stop()
public void dispose()
public void requestDeviceTable()
public void yield()
public void autoYield(int duration,
int interval)
duration - duration of the callinterval - yield is called every interval us.public void aSyncYield(int intervalUs)
public void clearDeviceTable()
public Device getFirstDevice()
public Device getNextDevice(Device dev)
dev - the current device
public int getListedDeviceCount()
public Device getDeviceById(int id)
id - the id of the device
public Device detectDevice(int id,
int timeOut)
id - The identifier of the device to detect.timeOut - The maximum amount of time which detection can take.
public int detectDevices(int count,
int timeOut)
count - The number of devices to detect.timeOut - The maximum amount of time which detection can take.
public void startTimeDebug()
public long getTimeUs()
public int getMessageCount()
public java.lang.String getLastMessage(int index)
index - the index of the error message
public void addIPAddress(java.lang.String ip,
java.lang.String usrName,
java.lang.String password)
ip - ip address of the internet masterusrName - usernamepassword - passwordpublic void clearMessages()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||