crime:sunspot
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
crime:sunspot [2011/04/24 11:09] – wamerijc | crime:sunspot [2011/06/02 12:51] (current) – wamerijc | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== | + | ====== |
CRIME has been ported for wireless sensor networks. | CRIME has been ported for wireless sensor networks. | ||
In this project we have used sunspots, small nodes equipped with sensors and wireless communication. | In this project we have used sunspots, small nodes equipped with sensors and wireless communication. | ||
Every node sends events over the network which can be received by one or more nodes within communication range. Writing applications which are driven by external events is significantly different from writing traditional sequential programs or algorithms. When applications are driven by external events, the control flow of these applications is also driven by these events which can trigger at any order and at any moment in time. | Every node sends events over the network which can be received by one or more nodes within communication range. Writing applications which are driven by external events is significantly different from writing traditional sequential programs or algorithms. When applications are driven by external events, the control flow of these applications is also driven by these events which can trigger at any order and at any moment in time. | ||
- | In this project we have used CRIME in order to deal with the complexity of composing and deriving meaningful information from a continuos | + | In this project we have used CRIME in order to deal with the complexity of composing and deriving meaningful information from a continuous |
< | < | ||
This project is still under development, | This project is still under development, | ||
</ | </ | ||
+ | |||
===== Repository ===== | ===== Repository ===== | ||
- | The repository for Event CRIME is located at: | + | The repository for CrimeSPOT |
https:// | https:// | ||
Line 18: | Line 19: | ||
Configure the built path by selecting the src folder to be included in the built path. Next add all the jars located in the lib folder the project. | Configure the built path by selecting the src folder to be included in the built path. Next add all the jars located in the lib folder the project. | ||
+ | |||
Line 31: | Line 33: | ||
=== LooCI === | === LooCI === | ||
As CRIME makes use of the Looci firmware you will have to configure your sunspot runtime in order to include Looci in the sunspot vm. Instructions on how to do this can be found [[http:// | As CRIME makes use of the Looci firmware you will have to configure your sunspot runtime in order to include Looci in the sunspot vm. Instructions on how to do this can be found [[http:// | ||
+ | < | ||
+ | Tutorial notes: | ||
+ | 1) Edit ~/ | ||
+ | |||
+ | 2) before " | ||
+ | 1. Start Basestation | ||
+ | 2. Start Shared Basestation | ||
+ | |||
+ | 3) Before "ant host-run", | ||
+ | main.class=be.kuleuven.cs.distrinet.wsn.looci.demo.Demo | ||
+ | </ | ||
=== CrimeSPOT === | === CrimeSPOT === | ||
Line 44: | Line 57: | ||
4. Add the CrimeSPOT jar to the SunSPOT libs by editing the spot.library.addin.jars property in ~/ | 4. Add the CrimeSPOT jar to the SunSPOT libs by editing the spot.library.addin.jars property in ~/ | ||
- | spot.library.addin.jars=${sunspot.lib}/ | + | spot.library.addin.jars=${sunspot.lib}/ |
5. Rebuild & reflash the SunSPOT library in / | 5. Rebuild & reflash the SunSPOT library in / | ||
Line 58: | Line 71: | ||
A CrimeSPOT component can now be deployed over the air using LooCI' | A CrimeSPOT component can now be deployed over the air using LooCI' | ||
- | Executing the following commands in the gateway suffices: | + | Executing the following commands in the gateway suffices |
# deploy / | # deploy / | ||
+ | > ID | ||
+ | # activate ID XXXX.XXXX.XXXX.XXXX | ||
+ | |||
+ | As can be observed, unlike for LooCI components, it's not required to manually add wirings for CrimeSPOT components. The CrimeSPOT runtime automatically adds toAll& | ||
+ | |||
+ | - the internal CrimeSPOT event types, | ||
+ | |||
+ | - all event types for which an // | ||
+ | |||
+ | For debugging purposes, the runtime on a SunSPOT can be monitored by connecting the SunSPOT via USB and executing: | ||
+ | $ ant echo | ||
< | < | ||
Line 67: | Line 91: | ||
+ | ====== Creating a CrimeSPOT Component ====== | ||
+ | ===== Netbeans ===== | ||
+ | Individual CrimeSPOT components can be created in Netbeans. | ||
+ | |||
+ | Steps: | ||
+ | |||
+ | 1. Create a New Project: Sun SPOT Application | ||
+ | |||
+ | 2. Extend the abstract CrimeComponent class and give an implementation for: | ||
+ | |||
+ | o execute(): invoked when the component is activated; expressions can be installed via processExpression(String) or registerRule(String, | ||
+ | |||
+ | o all methods invoked from within the interaction rules (cfr. is-operator) && invoke(String, | ||
+ | |||
+ | 3. Compile the component: | ||
+ | |||
+ | $ ant jar-app | ||
+ | |||
+ | ===== Macro-CrimeSPOT ===== | ||
+ | ==== The network-level dialect ==== | ||
+ | A CrimeSPOT WSN application can be created from the network-level perspective in the Macro-CrimeSPOT dialect. | ||
+ | |||
+ | Examples can be found on https:// | ||
+ | |||
+ | ==== The precompiler ==== | ||
+ | The precompiler for compiling Macro-CrimeSPOT code to node-level component jars can be obtained via SVN: | ||
+ | |||
+ | 1. Checkout the Eclipse project from https:// | ||
+ | |||
+ | 2. Use edu.vub.crimespot.precompiler.Main to compile a source file | ||
+ | 3. The resulting components can be found in Macro_CRIMESpot/ |
crime/sunspot.1303636144.txt.gz · Last modified: 2011/04/24 14:33 (external edit)