Skip to content

Commit 52f264c

Browse files
committed
(bluefox) docu
1 parent 23d11e5 commit 52f264c

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

lib/adapter.js

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ function Adapter(options) {
7070
if (process.argv[a] === 'info' || process.argv[a] === 'debug' || process.argv[a] === 'error' || process.argv[a] === 'warn') {
7171
config.log.level = process.argv[a];
7272
} else if (process.argv[a] === '--silent') {
73-
config.install = true;
73+
config.isInstall = true;
7474
process.argv[a] = '--install';
7575
} else if (process.argv[a] === '--install') {
7676
config.isInstall = true;
@@ -3195,9 +3195,9 @@ function Adapter(options) {
31953195
* });
31963196
* </code></pre>
31973197
*
3198-
* @alias getForeignStates
3198+
* @alias getStates
31993199
* @memberof Adapter
3200-
* @param {string} pattern string in form 'adapter.0.*' or like this
3200+
* @param {string} pattern string in form 'adapter.0.*' or like this. It can be array of IDs too.
32013201
* @param {object} options optional argument to describe the user context
32023202
* @param {function} callback return result function (err, states) {}, where states is an object like {"ID1": {"val": 1, "ack": true}, "ID2": {"val": 2, "ack": false}, ...}
32033203
*/
@@ -3210,6 +3210,24 @@ function Adapter(options) {
32103210
that.getForeignStates(pattern, options, callback);
32113211
};
32123212

3213+
/**
3214+
* Read all states of all adapters (and system states), that pass the pattern
3215+
*
3216+
* Allows to read all states of current adapter according to pattern. To read all states of current adapter use:
3217+
* <pre><code>
3218+
* adapter.getStates('*', function (err, states) {
3219+
* for (var id in states) {
3220+
* adapter.log.debug('"' + id + '" = "' + states[id].val);
3221+
* }
3222+
* });
3223+
* </code></pre>
3224+
*
3225+
* @alias getForeignStates
3226+
* @memberof Adapter
3227+
* @param {string} pattern string in form 'adapter.0.*' or like this. It can be array of IDs too.
3228+
* @param {object} options optional argument to describe the user context
3229+
* @param {function} callback return result function (err, states) {}, where states is an object like {"ID1": {"val": 1, "ack": true}, "ID2": {"val": 2, "ack": false}, ...}
3230+
*/
32133231
that.getForeignStates = function getForeignStates(pattern, options, callback) {
32143232
if (typeof options === 'function') {
32153233
callback = options;

0 commit comments

Comments
 (0)