public interface INode
Node which is parent of Things. You can group your Things with specified Nodes to easily control
them. Every Node in device must have an unique id.Thing,
ThingManager,
IotIgniteManager| Modifier and Type | Method and Description |
|---|---|
Thing |
createThing(android.hardware.Sensor androidSensor,
ThingListener listener)
Create
Thing object which is an Android Sensor. |
Thing |
createThing(java.lang.String thingID,
ThingType thingType,
ThingCategory thingCategory,
boolean isActuator,
ThingListener listener,
java.lang.String uniqueID)
|
android.content.Context |
getContext()
Get
Context of Node. |
java.util.List<Thing> |
getEveryThing()
Get list of registered
Things in IotIgnite. |
java.lang.String |
getNodeID()
Get id of
Node. |
NodeListener |
getNodeListener()
Return node's listener object.
|
java.lang.String |
getNodeName()
Get human readable
Node name. |
java.lang.String |
getPackageName()
Package name of
Node object. |
Thing |
getThingByID(java.lang.String thingID)
|
java.util.List<Thing> |
getThingByName(java.lang.String name)
Get list of registered
Things with same name in IotIgnite. |
java.lang.String |
getUniqueID()
Get unique id of
Node. |
boolean |
isConnected()
Get connection status of
Node. |
boolean |
isRegistered()
Check a
Thing object registered on IotIgnite or not. |
boolean |
register()
Register
Node to IotIgnite. |
void |
setConnected(boolean connected,
java.lang.String description)
Set connection status of
Node. |
void |
setContext(android.content.Context context)
Set
Context of Node. |
void |
setNodeID(java.lang.String nodeID)
Set an id to
Node. |
void |
setNodeListener(NodeListener listener)
Sets
NodeListener for callbacks. |
void |
setNodeName(java.lang.String nodeName)
Set human readable name to
Node. |
void |
setUniqueID(java.lang.String uniqueID)
Set an uniqueID to
Node. |
boolean |
unregister()
Unregister
Node from IotIgnite. |
java.lang.String getNodeName()
Node name.Node.void setNodeName(java.lang.String nodeName)
Node.nodeName - : Name of Node.java.lang.String getUniqueID()
Node.Node.void setUniqueID(java.lang.String uniqueID)
Node. ID must be UNIQUE.uniqueID - unique of the Nodevoid setNodeID(java.lang.String nodeID)
Node. ID must be UNIQUE.nodeID - id of the Nodeboolean isConnected()
Node.Node.void setConnected(boolean connected,
java.lang.String description)
Node.connected - : Status of connection.description - : Description about connection state.java.lang.String getPackageName()
Node object.Stringandroid.content.Context getContext()
Context of Node.void setContext(android.content.Context context)
Context of Node.context - Context of the Applicationboolean register()
true or false success state.boolean unregister()
Node from IotIgnite. Application can only unregister its own Nodes.
Nodes registered by different application are not accessable.true or false success state.IotIgniteManager,
ThingThing createThing(java.lang.String thingID, ThingType thingType, ThingCategory thingCategory, boolean isActuator, ThingListener listener, java.lang.String uniqueID)
Thing object and assigns to Node. To create Thing object the application must be
authorized in IotIgnite platform. After that it can create Node and Node assigned Thing
objects. thingID must follow the rules which are defined with the Regex below:
^[a-zA-Z0-9]+([ ]?[a-zA-Z0-9-.:@]+)*$thingID - Set Thing's ID. Every node must has unique thingId.thingType - thingType type of the ThingthingCategory - Could be ThingCategory.BUILTIN or ThingCategory.EXTERNALisActuator - Actuator state of Thing objectlistener - ThingListener object.uniqueID - uniqueID of ThingThing : The created Thing object.ThingManager,
Thing,
ThingType,
ThingListener,
ThingCategoryThing createThing(android.hardware.Sensor androidSensor, ThingListener listener)
Thing object which is an Android Sensor. It wraps Android Sensor to Thing object.
Creating Thing objects from builtin Android Sensor has fewer parameters than generic Thing
object. It only needs Android Sensor and ThingListener. Other parameters such as thingID,
thingType, vendor has already provided in Sensor.
Sensors can not act as an actuator so by default this parameter is false. Application cannot change it.
androidSensor - Sensor of the Androidlistener - ThingListener object.Thing : Thing object.ThingManager,
Thing,
Sensor,
ThingListenerjava.util.List<Thing> getEveryThing()
Things in IotIgnite. If no such a Thing is registered, Node returns
empty list.List<Thing>: List of Thing's registered on IotIgnite.Thing getThingByID(java.lang.String thingID)
Thing object by thingID in registered Node. If no such Thing is registered thingID returns
null object.thingID - : Unique thingID of object.Thing : Returns null if no such a thing in that id.java.util.List<Thing> getThingByName(java.lang.String name)
Things with same name in IotIgnite. If no such Thing is
registered, Node returns empty list.name - Name of the ThingList<Thing>: List of Things with same thingNames registered on
IotIgnite.boolean isRegistered()
Thing object registered on IotIgnite or not.true or false : Thing registration state on IotIgnite.void setNodeListener(NodeListener listener)
NodeListener for callbacks.listener - : NodeListener object.NodeListenerNodeListener getNodeListener()
NodeListener