[Tinyos-2-commits] CVS: tinyos-2.x/apps/tests/TestPrintf Makefile,
1.3, 1.4 TestPrintfC.nc, 1.5, 1.6
Kevin Klues
klueska at users.sourceforge.net
Sun Aug 19 23:08:31 PDT 2007
- Previous message: [Tinyos-2-commits] CVS: tinyos-2.x/doc/pdf tep114.pdf, NONE,
1.1 tep129.pdf, NONE, 1.1 tep125.pdf, NONE, 1.1 tep109.pdf,
NONE, 1.1 tep123.pdf, NONE, 1.1 tep110.pdf, NONE, 1.1 tep1.pdf,
NONE, 1.1 porting.pdf, NONE, 1.1 tep102.pdf, NONE,
1.1 tep122.pdf, NONE, 1.1 tep121.pdf, NONE, 1.1 tep112.pdf,
NONE, 1.1 tep103.pdf, NONE, 1.1 tep130.pdf, NONE,
1.1 tep111.pdf, NONE, 1.1 tep108.pdf, NONE, 1.1 tep128.pdf,
NONE, 1.1 tep115.pdf, NONE, 1.1 tep126.pdf, NONE,
1.1 tep120.pdf, NONE, 1.1 tep113.pdf, NONE, 1.1 tep106.pdf,
NONE, 1.1 tep2.pdf, NONE, 1.1 tep107.pdf, NONE, 1.1 tep116.pdf,
NONE, 1.1 tep105.pdf, NONE, 1.1 tep127.pdf, NONE,
1.1 tep101.pdf, NONE, 1.1 tep117.pdf, NONE, 1.1 tep118.pdf,
NONE, 1.1 tep119.pdf, NONE, 1.1 tep3.pdf, NONE,
1.1 overview.pdf, NONE, 1.1 tep124.pdf, NONE, 1.1
- Next message: [Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/printf PrintfC.nc, 1.6,
1.7 PrintfP.nc, 1.7, 1.8
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/tinyos/tinyos-2.x/apps/tests/TestPrintf
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv18158/apps/tests/TestPrintf
Modified Files:
Makefile TestPrintfC.nc
Log Message:
Small changes to the application to make it line up with the newly created tutorial on using printf
Index: Makefile
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/apps/tests/TestPrintf/Makefile,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Makefile 20 Apr 2007 01:13:44 -0000 1.3
--- Makefile 20 Aug 2007 06:08:29 -0000 1.4
***************
*** 8,13 ****
PrintfMsg.java: $(TOSDIR)/lib/printf/printf.h
! mig java -target=$(PLATFORM) $(CFLAGS) -java-classname=PrintfMsg $(TOSDIR)/lib/printf/printf.h printf_msg -o $@
include $(MAKERULES)
-
--- 8,14 ----
PrintfMsg.java: $(TOSDIR)/lib/printf/printf.h
! mig java -target=$(PLATFORM) $(CFLAGS) \
! -java-classname=PrintfMsg \
! $(TOSDIR)/lib/printf/printf.h printf_msg -o $@
include $(MAKERULES)
Index: TestPrintfC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/apps/tests/TestPrintf/TestPrintfC.nc,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** TestPrintfC.nc 20 Apr 2007 00:41:40 -0000 1.5
--- TestPrintfC.nc 20 Aug 2007 06:08:29 -0000 1.6
***************
*** 35,38 ****
--- 35,39 ----
*/
+ #include "printf.h"
module TestPrintfC {
uses {
***************
*** 45,51 ****
implementation {
! #define NUM_TIMES_TO_PRINT 100
uint16_t counter=0;
! uint32_t dummyVar = 345678;
event void Boot.booted() {
--- 46,54 ----
implementation {
! #define NUM_TIMES_TO_PRINT 5
uint16_t counter=0;
! uint8_t dummyVar1 = 123;
! uint16_t dummyVar2 = 12345;
! uint32_t dummyVar3 = 1234567890;
event void Boot.booted() {
***************
*** 54,61 ****
event void PrintfControl.startDone(error_t error) {
! printf("Hi my name is Kevin Klues and I am writing to you from my telos mote\n");
! printf("Here is a uint8: %hd\n", 123);
! printf("Here is a uint16: %d\n", 12345);
! printf("Here is a uint32: %ld\n", 1234567890);
call PrintfFlush.flush();
}
--- 57,64 ----
event void PrintfControl.startDone(error_t error) {
! printf("Hi I am writing to you from my TinyOS application!!\n");
! printf("Here is a uint8: %u\n", dummyVar1);
! printf("Here is a uint16: %u\n", dummyVar2);
! printf("Here is a uint32: %ld\n", dummyVar3);
call PrintfFlush.flush();
}
***************
*** 63,66 ****
--- 66,70 ----
event void PrintfControl.stopDone(error_t error) {
counter = 0;
+ call Leds.led2Toggle();
printf("This should not be printed...");
call PrintfFlush.flush();
***************
*** 74,79 ****
else if(counter == NUM_TIMES_TO_PRINT) {
printf("This is a really short string...\n");
! printf("I am generating this string to have just less than 250 characters since that is the limit of the size I put on my maximum buffer when I instantiated the PrintfC component.\n");
! printf("Only part of this line should get printed because by writing this sentence, I go over my character limit that the internal Printf buffer can hold. If I were to flush before trying to write this, or increase my buffer size when I instantiate my PrintfC component to 1000, we would see this line too\n");
call PrintfFlush.flush();
}
--- 78,83 ----
else if(counter == NUM_TIMES_TO_PRINT) {
printf("This is a really short string...\n");
! printf("I am generating this string to have just less than 250\ncharacters since that is the limit of the size I put on my\nmaximum buffer when I instantiated the PrintfC component.\n");
! printf("Only part of this line should get printed because by writing\nthis sentence, I go over my character limit that the internal Printf buffer can hold.\n");
call PrintfFlush.flush();
}
- Previous message: [Tinyos-2-commits] CVS: tinyos-2.x/doc/pdf tep114.pdf, NONE,
1.1 tep129.pdf, NONE, 1.1 tep125.pdf, NONE, 1.1 tep109.pdf,
NONE, 1.1 tep123.pdf, NONE, 1.1 tep110.pdf, NONE, 1.1 tep1.pdf,
NONE, 1.1 porting.pdf, NONE, 1.1 tep102.pdf, NONE,
1.1 tep122.pdf, NONE, 1.1 tep121.pdf, NONE, 1.1 tep112.pdf,
NONE, 1.1 tep103.pdf, NONE, 1.1 tep130.pdf, NONE,
1.1 tep111.pdf, NONE, 1.1 tep108.pdf, NONE, 1.1 tep128.pdf,
NONE, 1.1 tep115.pdf, NONE, 1.1 tep126.pdf, NONE,
1.1 tep120.pdf, NONE, 1.1 tep113.pdf, NONE, 1.1 tep106.pdf,
NONE, 1.1 tep2.pdf, NONE, 1.1 tep107.pdf, NONE, 1.1 tep116.pdf,
NONE, 1.1 tep105.pdf, NONE, 1.1 tep127.pdf, NONE,
1.1 tep101.pdf, NONE, 1.1 tep117.pdf, NONE, 1.1 tep118.pdf,
NONE, 1.1 tep119.pdf, NONE, 1.1 tep3.pdf, NONE,
1.1 overview.pdf, NONE, 1.1 tep124.pdf, NONE, 1.1
- Next message: [Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/printf PrintfC.nc, 1.6,
1.7 PrintfP.nc, 1.7, 1.8
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Tinyos-2-commits
mailing list