This is the developer page for the SENSEI C++ Gateway implementation. Code: [https://ncit-cluster.grid.pub.ro/trac/Sensei-WP5/browser/gateway /gateway] in the SVN. Specification: [https://ncit-cluster.grid.pub.ro/trac/Sensei-WP5/browser/docs/WSAN_Specification_v0.2.doc WSAN Island Specification v0.2] == What is the gateway == The SENSEI Gateway is a resource proxy entity, which exposes resources from 6LoWPAN WSAN Islands, and resources about the gateway itself, as SENSEI Resources via HTTP. The Gateway is meant to be scalable and lightweight for use on embedded access Linux point platforms, while at the same time extensible through a Plug-in design. == Requirements == * Linux * g++, make * [http://www.alhem.net/Sockets/ Sockets C++ library] (Also included in lib/Sockets-2.3.7; make; make install) * IPv6 support (for local UDP/IPv6 communications) * libxml2 (not yet in use) * openssl, openssl-dev (not in use yet) == Project Organization == * [https://ncit-cluster.grid.pub.ro/trac/Sensei-WP5/browser/gateway/bin /bin] sensei-gateway executable * [https://ncit-cluster.grid.pub.ro/trac/Sensei-WP5/browser/gateway/src /src] Gateway Core and Plug-in code * [https://ncit-cluster.grid.pub.ro/trac/Sensei-WP5/browser/gateway/xml /xml] Location of resource descriptions used by the gateway * [https://ncit-cluster.grid.pub.ro/trac/Sensei-WP5/browser/gateway/lib /lib] Sockets++ library * [https://ncit-cluster.grid.pub.ro/trac/Sensei-WP5/browser/gateway/config /config] Configuration files (unused) * [https://ncit-cluster.grid.pub.ro/trac/Sensei-WP5/browser/gateway/log /log] Log files (unused) == How to build it == The top-level Makefile will build everything with the following, which places the executable in ./bin. Note that the executable must be run from the root of the project as shown below. {{{ make ./bin/sensei-executable }}} To clean everything do {{{ make clean }}} To build the Sockets++ library {{{ cd ./lib/Sockets-2.3.6 make sudo make install }}} == How to use it == See the [wiki:GatewayUser Gateway User Guide]. == Features == The following features are currently part of the Gateway development version as of r517. === Current === * Gateway: HTTP server with configurable port * Gateway: RAI support (GET, POST, PUT, DELETE on registered URLs) * Gateway: Resource directory RPI publication support * Sensei Plugin: BinaryWS v0.8 * Sensei Plugin: eRPI support of Document-Link file:// type * Sensei Plugin: file:// resource descriptions read from /xml and DOCTYPE ENTITY block added * Sensei Plugin: Automatic node and resource management (unlimited number) * Sensei Plugin: Built-in statistics (/stats) and resource description (/rd) resources === Planned === * Gateway: Support for TLS * Gateway: Support for Sensei AAA * Gateway: Logging to a file * Gateway: RD RPI delete, update and refresh support * Sensei Plugin: Caching support for resources. * Sensei Plugin: Support for eRPI Document-Link URLs containing http:// in addition to file:// * Sensei Plugin: BinaryWS retransmission support * Sensei Plugin: libEXI integration * Management Plugin * Code Update Plugin == Plug-in design and how to make a new plug-in == The gateway uses a modular plug-in design based on the Plugin class and managed by the PluginHandler class. Each Plugin uses the Sockets++ Thread class to automatically run as an independent thread. To create a new Plugin simply copy the /src/plugin-skeleton directory to your own /src/plugin-xxx directory and add includes to the /src Makefile.