a component based software platform developed by EQUATOR
project and Equip4j
is a Java implementation of EQUIP. We made some components on Equip4j to handle our ubiquitous sensor node "Particle
With these components, you can easily create new sensor application by combining our components and other existing
components provided in Equip4j. Our Particle components consist as follows:
- ParticleFactory: It is a main component. It captures ClPackets from Particles (via XBridge) and creates ParticleInstances as its subcomponents that represent discovered particles.
- ParticleInstance: It is created by ParticleFactory and represents a particle in a network. It also shows some
typical sensing values (light, battery voltage, etc.), if the particle is configured to send them.
- ParticleDemultiplexer: It demultiplexes a ClPacket into ACL tuples. An ACL tuple consists of a TYPE, a LENGTH and multiple DATA fields and represents a some sort of sensing information in a Particle. Captured ClPackets are provided to this component by linking "AclPayload" properties in ParticleInstance.
- StringSplitter: It is a generic string splitter to split an inputted string into some tokens by specified delimiters. It is used to separate an ACL tuple provided by Particle Demultiplexer into a TYPE, a LENGTH and multiple DATA fields.
- StringFunction: It is a generic runtime processor to handle inputted characters as a "String" of Java. You can write an Java code to evaluate the inputted characters, such as DATA tokens of an ACL tuple derived from StringSplitter component.
- ClPacketSender: It can send a ClPacket from your PC with containing specified ACL tuples, such as HELLO packet to make Particles to return OLLEH packet.
Please try it and have fun!
Application 1: Finding Particles
- On the component browser, select ParticleFactory component in
"Capabilities" tab with left click, and then make a right click to
show a pulldown menu.
- Select "Create Request" in the pulldown menu and press left
- Created ParticleFactory automatically starts to listen a UDP
port (= 5555) to
receives ClPackest from Particles via XBridge.
- If a ClPacket from a Particle is arrived, a ParticleInstance is
created to represent the discovered Particle.
- In "Running
Component" tab, you can see the properties of existing component . For
instance, ParticleInstance has properties for Sender ID, Sequence
number of th ClPacket, Sender location ID, ACL Payload, etc.
Application 2: Make Low Battery Warning
- Configure a Particle to transmit a sensing value of the battery
voltage by using APSConfig tool.
- Create ParticleFactory as described in Example Application 1
confirm that a ParticleInstance is created which represents the
sending the battery voltage information.
- Create ParticleDemultiplexer component in "Capabilities" tab.
- Make a link from "aclpayload" property of the ParticleInstance
to "aclpayload" property of ParticleDemultiplexer as follows.
- At "Running Component" tab, select "aclpayload" property in the
ParticleInstance by left
- Then, make right click to show a pull down menu and select
"Link to..." in the menu by left click.
- A window illustrated below comes up to select the end point of
- In the window, select "aclpayload" property of
ParticleDemultiplexer and press
- Confirm that the value of "aclpayload" in PraticleInstance is
copied to "aclpayload" in ParticleDemultiplexer. In addition, the
demultiplexed ACL tuples are shown in each "acltupleN" properties (N =
0 to 9) in ParticleDemultiplexer.
- Create StringSplitter component in "Capabilities" tab.
- Find a property that has "SVC" from "acltupleN" in
ParticleDemultiplexer and make a link from it to "inputstring" property
in StringSplitter as described adobe.
- Confirm that ACL tuple of "SVC" is splitted into some tokens by
"tokenN" (N = 1 to 9) properties in StringSplitter.
In this example, the tokens consist of "SVC"(ACL type), "2" (data
length) and 2 digit value "5", "31" (data).
- Create "StringFunction".
- Make two links. One is from "token2" in StringSplitter to "in1"
in StringFunction. The other is from "token3" in StringSplitter to
"in2" in StringFunction.
- Input the following Java code to "StringFunction" window (it
hide in somewhere of your desktop). In this example, the sensing value
of "SVC" is represented by unsigned 2bytes value and "in1"(from
"token2") represents the upper byte and "in2" (from "token3")
represents the lower byte. This Java code calculate the actual sensing
of "SVC" and compare it with a threshold to
determine the battery is low or not. "600" is a sample of the
* 256 + Integer.parseInt(in2) < 600 ?
"Low Battery" : "Enough Battery"
- Create TextToSpeach component.
- Link "out" property in StringFunction to "text" property in
- Now, your PC speaks the status of the Particle's battery!
Application 3: Surveillance System
- Make a Particle to transmit the sensing value of the light
sensor by using APSConfig tool.
- Attach USB camera that can be used by JMF(Java Media
Framework) to your PC.
- Create PartilceFactory and find a ParticleInstance of the
- Create ParticleDemultiplexer and pass ACL payload to it from
ParticleInstace (Make a link between "aclpayload" properties in both
- Create StringSplitter and pass a ACL tuple of "SLI" (light
sensor) to it from
ParticleDemultiplexer (Make a link from a "acltupleN" property that
contains "SLI" string in ParticleDemultiplexer to "inputstring"
- Create StringFunction and pass #3 and #4 tokens to it from
StringSplitter (Make two link from "token3" and "token4" properties in
StringSplitter to "in1" and "in2" properties in StringSplitter,
- Input following Java code to "StringFunction" window. In this
example, the sensing value
of "SLI" is represented by unsigned 2bytes value and "in1"(from
"token3") represents the upper byte and "in2" (from "token4")
represents the lower byte. This Java code calculates the actual sensing
of "SLI" and compares it with a threshold to
determine whether it becomes blight or not. "1000" is a sample of the
|Integer.parseInt(in1) * 256 +
Integer.parseInt(in2) > 1000
? "1" : "0"
- Create Camera component.
- Make a link from "out" property in StringFunction to
"captureState" in Camera
- Now, your PC takes a picture by USB camera when it turns from
dark to blight. The pictures are stored at the URL indicated by "url"
in Camera component and you can see them by using a web