The DoDWAN Network API (DoDWAN NAPI) has been added to DoDWAN so that DoDWAN can be be used by an external piece of software, via a network protocol such as TCP or WebSocket. When using WebSocket for example, this offers the possibility to control DoDWAN from a web browser.
The external application acts then as a client of DoDWAN which can plays the role of a network server thanks its NAPI plugin.
In order to develop the client-side of your application, you should implement a client of the NAPI protocol. To ease this task, a few libraries are available.
Install this plugin like any other DoDWAN plugin: unzip the plugin ZIP archive
in the $DODWAN_HOME/plugins
directory.
This plugin does nothing by itself. You should install another plugin (e.g. the Dodwan Websocket Network API plugin) to actually benefit from a usable network API.
When launching DoDWAN, you should put in the shell variable dodwan_plugins
the short name of the Dodwan Network API plugin, followed by the actual network
Network API plugin name.
For example, the following command starts DoDWAN with the Websocket Network API plugin (dodwan-napi-ws), and its dependency, the Network API plugin (dodwan-napi):
dodwan_plugins=dodwan-napi,dodwan-napi-ws dodwan.sh start
A dedicated library is available for each implementation of the NAPI protocol.
The Java library is available as a Maven dependency from the CASA repository:
<!-- https://casa-irisa.univ-ubs.fr/download/maven2 -->
<dependency>
<groupId>casa.util</groupId>
<artifactId>napi-tcp-client</artifactId>
<version>1.0</version>
</dependency>
The Javascript library is available as a compressed tarball: casa-napi-ws-client-1.0.0.tgz.
You may use it by adding a dependency in your package.json file:
dependencies": {
"@casa/napi-ws-client": "http://casa-irisa.univ-ubs.fr/download/nodejs/casa-napi-ws-client-1.0.0.tgz"
}