Thursday, July 2, 2009

Multiline Regular Expressions

There are a lot of text editors that offer regular expression search and replace, but rare are those that support multiline regular expressions. In my case I need to find all the function headers with starting body bracket.
"int a(int b, int c)

should be changed with
"int a(int b, int c)
printf("Entered function a");"

Text editor that supports such thing is called "EditPad Pro". Besides multiline regular expression support, it also have coloring system for your regular expression, so u can debug your regex easier.

To be edited with regular expressions that solved my problem

Thursday, June 18, 2009

Same useful links while learning TinyOS

Changing parameters in TinyOS via Makefile

Changing the Radio channel
- Radio channel numbers have range between 11 to 26
- Add the following line in the Makefile before the Makerules
CC2420_CHANNEL=x where x = [11 26]
Changing the Radio Transmit power
- Transmit power valid levels are 1 to 31 with power 1 equals to -25dBm and 31 equals to max (0dBm)
- add the following line in the Makefile before the Makerules
CFlags = -DCC2420_DEF_RFPower= x where x = [1 31]

Changing the Active message group ID
Add DEFAULT_LOCAL_GROUP = X to the makefile where X = [0×10 0×50]