public class XBeeHelper extends VertxHelperBase implements com.digi.xbee.api.listeners.IDataReceiveListener
VertxHelperBase.AccessorVerticle
HelperBase.DATA_TYPE
Modifier and Type | Field and Description |
---|---|
(package private) com.digi.xbee.api.XBeeDevice |
_device
The device.
|
_verticle, _vertx
_actor, _currentObj
Constructor and Description |
---|
XBeeHelper(java.lang.Object actor,
jdk.nashorn.api.scripting.ScriptObjectMirror helping,
java.lang.String portName,
java.util.Map<java.lang.String,java.lang.Object> options)
Create an XBee device.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the port, if it is open.
|
void |
dataReceived(com.digi.xbee.api.models.XBeeMessage message) |
void |
send(java.lang.Object data)
Send data over the radio.
|
static java.lang.String[] |
supportedReceiveTypes()
Return an array of the types supported by the current host for
receiveType arguments.
|
static java.lang.String[] |
supportedSendTypes()
Return an array of the types supported by the current host for
sendType arguments.
|
_issueOrDeferResponse, _processPendingJob, _setBusy, closeVertx, getHelper, getImageTypes, reset, submit, undeploy
_appendNumericToBuffer, _appendToBuffer, _error, _error, _error, _error, _extractFromBuffer, _issueResponse, _removeDuplicates, _sizeOfType, _toJavaBytes, _toJSArray, getHelping
public XBeeHelper(java.lang.Object actor, jdk.nashorn.api.scripting.ScriptObjectMirror helping, java.lang.String portName, java.util.Map<java.lang.String,java.lang.Object> options) throws com.digi.xbee.api.exceptions.XBeeException
actor
- The actor that this is helping.helping
- The object that this is helping (XBee).portName
- The name of the port to open.options
- Serial port options.com.digi.xbee.api.exceptions.XBeeException
- If there is no such port, if the port
is in use, if there are too many listeners or if we can't get
an input or output stream for the port.public void close()
public void dataReceived(com.digi.xbee.api.models.XBeeMessage message)
dataReceived
in interface com.digi.xbee.api.listeners.IDataReceiveListener
public void send(java.lang.Object data)
data
- The data to send.public static java.lang.String[] supportedReceiveTypes()
public static java.lang.String[] supportedSendTypes()