1.3.0 • Published 7 years ago

sensorlab-commands v1.3.0

Weekly downloads
3
License
MPL-2.0
Repository
github
Last release
7 years ago

sensorlab-nexus

SensorLab2 commands module

Brief

This node module builds a set of commands to control a SensorLab observer given its REST API port and host.

Installation

sensorlab-commands is available via NPM:

    npm install sensorlab-commands --save

Usage

Using callbacks

    var commands;
    
    commands = require('sensorlab-commands')('observer-X.local', 5555, false);
    function onSuccess(status){
        console.log('status: ', status);
    }
    function onError(error, response, body){
        console.log('error: ', error, ' response: ', response, ' body: ', body);
    }
    commands.node.status(onSuccess, onError);

Using Q promises

    var commands,
        promise;
        
    commands = require('sensorlab-commands')('observer-X.local', 5555, true);
    
    promise = commands.node.status();
    promise.then( function(status){ console.log('status: ', status) });
    

License & Copyrights

Mozilla Public License Version 2.0 (MPL-2.0). Copyright 2016 Orange

1.3.0

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago