Commented periodic resource related stuff for the sake of small code print and added minimal-net configuration in README.

This commit is contained in:
dogan yazar 2011-04-13 00:07:47 +02:00
parent 78f7a74689
commit 31a14c3d90
2 changed files with 19 additions and 5 deletions

View file

@ -291,6 +291,7 @@ PROCESS_THREAD(rest_manager_process, ev, data)
PROCESS_PAUSE();
/*Periodic resources are only available to COAP implementation*/
#if 0
#ifdef WITH_COAP
periodic_resource_t* periodic_resource = NULL;
for (periodic_resource = (periodic_resource_t*)list_head(restful_periodic_services); periodic_resource; periodic_resource = periodic_resource->next) {
@ -327,6 +328,6 @@ PROCESS_THREAD(rest_manager_process, ev, data)
}
}
#endif /*WITH_COAP*/
#endif
PROCESS_END();
}

View file

@ -10,7 +10,7 @@ Each resource has a handler function which is called by the REST layer to serve
(i.e. "helloworld" resource has a handler function named "helloworld_handler" which is called when a web service request is received for "helloworld" resource.)
To run REST examples in COOJA under Linux
To run REST examples in COOJA on Linux
--------------------------------------------
Accessing the server from outside:
@ -50,9 +50,10 @@ Client periodically accesses resources of server and prints the payload.
Note: If the generated binary is bigger than the MOTE code size, then you will get a "region text is full" error.
Right now, REST+HTTP example uses (Contiki + ContikiMAC + uIPv6 + RPL + HTTP Server + REST Layer) which does not fit in Tmote Sky memory.
To save same code space and make the example fit, you can define static routes rather than using RPL or use nullrdc rather than ContikiMAC.
If border router does not fit, then first try to update the Makefile of border router in <CONTIKI_HOME>/examples/ipv6/rpl-border-router by
setting WITH_WEBSERVER=0.
To run REST server on real nodes under Linux
To run REST server on real nodes (i.e. tmote sky)
--------------------------------------------
1. Program the nodes with the rest-server-example
@ -71,7 +72,19 @@ To run REST server on real nodes under Linux
5. Test the connectivity by pinging them.
ping6 <IPv6 Address of the MOTE>
6. Remaining parts are the same with the COOJA example. (i.e. if it is a COAP Server, it is available at <NODE_IP_ADDR>:61616)
6. Remaining parts are the same with the COOJA example. (i.e. if it is a COAP Server, it's available at <NODE_IP_ADDR>:61616)
To run REST server with minimal-net on Linux
--------------------------------------------
1. Compile with minimal-net setting.
make rest-server-example TARGET=minimal-net
2. Run the generated executable with sudo and note the IP address of the server which will be printed right after.
sudo ./rest-server-example.minimal-net
3. How to access and test the server is same with the other settings. (i.e. if it is a COAP Server,
it's available at <IP_ADDRESS_FROM_STEP_2>:61616 and if it's a HTTP Server it is available at <IP_ADDRESS_FROM_STEP_2>:8080)
To Do