Development
From REM
The section contains instructional information for application development on the REM core framework.
[edit]
Adding a new TinyOS message
- create the new tinyos message
- mkdir $TOSROOT/tools/java/net/tinyos/<tinyosAppName>
- cp Makefile into above directory and modify with the following changes
- PACKAGE = net.tinyos.<yourPackageName>
- APP = $(TOS)/../apps/<tinysoApplicationDirectory>
- MSGS = <tinyosApplicationDirectory>.java
- adjust MIG command for your application
- type "make" which will produce <tinyosApplicationDirectory>.java in the current directory
- open up Netbeans
- modify MessageProcessor.java
- add "import java.net.tinyos.<tinyosApplicationDirectory>.<tinyosApplicationDirectory>;"
- add "public static final int <yourNewMsgType> = <someNumber>;
- add new method to process your message (see processExampleMessage(...))
- adjust getFieldValues() method to accept a class of this new message type.
- modify MessageProcessor.java
- modify WSNConnector.java
- add "import java.net.tinyos.<tinyosApplicationDirectory>.<tinyosApplicationDirectory>;"
- register a new MoteIF listener in registerListeners() method
- "mote.registerListenser(new EnvXLPMsg(),this);"
- add filter to messageReceived(...) method
- modify WSNConnector.java
- make a new database template
- copy X_Msg.php file into server directory with other php core files
- chmod +x X_Msg.php
- add filter into autoSQL2.php to recognize and include X_Msg.php
