HomeServerConnector. _CommunicationObject
Methods
new _CommunicationObject()
Communication object (CO). May not be directly instanced. An instance of the class is created by the method HomeServerConnector._Connection#getCommunicationObject.
Example
var co = conn.getCommunicationObject("CO@1_1_1", function(err, value, isInit) {});
Methods
addValue(value, callback)
Adds the value.
Examples
Addition of '5' to the current value of the communication object.
co.addValue(5, function(err) {});
Subtraction of '5' ( = addition of '-5') from the current value of the communication object.
co.addValue(-5, function(err) {});
Parameters
Name | Type | Optional | Description |
---|---|---|---|
value |
Number |
|
the value to be added |
callback |
function() |
|
destroy()
Enables the object and cancels any existing subscription.
Example
co.destroy();
getKey() → String
Returns the key of the object.
Example
var object_key = co.getKey();
- Returns
-
String
getMeta(callback)
Retrieves the metadata.
Example
Retrieval of metadata.
co.getMeta(function(err, data) {});
Parameter
Name | Type | Optional | Description |
---|---|---|---|
callback |
function() |
|
getValue(callback)
Retrieves the current value.
Example
Querying the current value of the communication object.
co.getValue(function(err, value) {});
Parameter
Name | Type | Optional | Description |
---|---|---|---|
callback |
function() |
|
listNext(callback)
Jumps to the next value in the list.
Example
Setting the communication object to the next highest values specified in Expert in the field 'List'.
co.listNext(function(err) {});
Parameter
Name | Type | Optional | Description |
---|---|---|---|
callback |
function() |
|
listPrevious(callback)
Jumps to the previous value in the list.
Example
Setting the communication object to the next lowest values specified in Expert in the field 'List'.
co.listPrevious(function(err) {});
Parameter
Name | Type | Optional | Description |
---|---|---|---|
callback |
function() |
|
HomeServerConnector._CommunicationObject~listPreviousCallback |
offsetMinus(callback)
Reduces the value by the step size.
Example
The value of the communication object is reduced by the value specified in Expert in the field 'Step size'.
co.offsetMinus(function(err) {});
Parameter
Name | Type | Optional | Description |
---|---|---|---|
callback |
function() |
|
HomeServerConnector._CommunicationObject~offsetMinusCallback |
offsetPlus(callback)
Increases the value by the step size.
Example
The value of the communication object is increased by the value specified in Expert in the field 'Step size'.
co.offsetPlus(function(err) {});
Parameter
Name | Type | Optional | Description |
---|---|---|---|
callback |
function() |
|
setValue(value, callback)
Sets the value.
Examples
Setting a numerical value.
co.setValue(1.0, function(err) {});
Setting a string.
co.setValue("Text Text Text", function(err) {});
Parameters
Name | Type | Optional | Description |
---|---|---|---|
value |
(String or Number) |
|
Value to which the communication object is to be set. |
callback |
function() |
|
toggle(value, callback)
Switches between '0' and the value.
Example
Toggle between (fixed) '0' and '1'.
co.toggle(1, function(err) {});
Parameters
Name | Type | Optional | Description |
---|---|---|---|
value |
Number |
|
Value. Switching is between this value and '0'. |
callback |
function() |
|
Abstract types
addValueCallback(err)
Examples
Addition of '5' to the current value of the communication object
co.addValue(5, function(err) {});
Subtraction of '5' ( = addition of '-5') from the current value of the communication object.
co.addValue(-5, function(err) {});
Parameter
Name | Type | Optional | Description |
---|---|---|---|
err |
(Object or undefined) |
|
Error object |
getMetaCallback(err, data)
Example
Retrieval of metadata.
co.getMeta(function(err, data) {});
Parameters
Name | Type | Optional | Description |
---|---|---|---|
err |
(Object or undefined) |
|
Error object |
data |
Object |
|
Meta information Structure
Explanation
|
getValueCallback(err, value)
Example
Querying the current value of the communication object.
co.getValue(function(err, value) {});
Parameters
Name | Type | Optional | Description |
---|---|---|---|
err |
(Object or undefined) |
|
Error object |
value |
(String or Number) |
|
returned value of the communication object |
listNextCallback(err)
Example
Setting the communication object to the next highest values specified in Expert in the field 'List'.
co.listNext(function(err) {});
Parameter
Name | Type | Optional | Description |
---|---|---|---|
err |
(Object or undefined) |
|
Error object |
listPreviousCallback(err)
Example
Setting the communication object to the next lowest values specified in Expert in the field 'List'.
co.listPrevious(function(err) {});
Parameter
Name | Type | Optional | Description |
---|---|---|---|
err |
(Object or undefined) |
|
Error object |
offsetMinusCallback(err)
Example
The value of the communication object is reduced by the value specified in Expert in the field 'Step size'.
co.offsetMinus(function(err) {});
Parameter
Name | Type | Optional | Description |
---|---|---|---|
err |
(Object or undefined) |
|
Error object |
offsetPlusCallback(err)
Example
The value of the communication object is increased by the value specified in Expert in the field 'Step size'.
co.offsetPlus(function(err) {});
Parameter
Name | Type | Optional | Description |
---|---|---|---|
err |
(Object or undefined) |
|
Error object |
setValueCallback(err)
Examples
Setting a numerical value
co.setValue(1.0, function(err) {});
Setting a string.
co.setValue("Text Text Text", function(err) {});
Parameter
Name | Type | Optional | Description |
---|---|---|---|
err |
(Object or undefined) |
|
Error object |
toggleCallback(err)
Example
Toggle between (fixed) '0' and '1'
co.toggle(1, function(err) {});
Parameter
Name | Type | Optional | Description |
---|---|---|---|
err |
(Object or undefined) |
|
Error object |