Contiki 3.x
er-server.c
1 #include "er-server.h"
2 #include "rest-engine.h"
3 #include "contiki-net.h"
4 
5 /* declare the resources functions from the separate files */
6 extern resource_t res_date, res_sample, res_config, res_reboot, res_routes, res_uptime;
7 
8 void er_server_init(void) {
9 
10  /* Initialize the REST engine. */
12 
13  rest_activate_resource(&res_date, "date");
14  rest_activate_resource(&res_sample, "sample");
15  rest_activate_resource(&res_config, "config");
16  rest_activate_resource(&res_reboot, "reboot");
17  rest_activate_resource(&res_routes, "routes");
18  rest_activate_resource(&res_uptime, "uptime");
19 }
An abstraction layer for RESTful Web services (Erbium).
void rest_activate_resource(resource_t *resource, char *path)
Makes a resource available under the given URI path.
Definition: rest-engine.c:103
void rest_init_engine(void)
Initializes and starts the REST Engine process.
Definition: rest-engine.c:71