Subversion Repositories HomeAutomation

Rev

Rev 1604 | Rev 1610 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

Rev 1604 Rev 1609
Line 21... Line 21...
21
 
21
 
22
function Module_OnChange(full_id, available)
22
function Module_OnChange(full_id, available)
23
{
23
{
24
    var parts = full_id.split(":", 2);
24
    var parts = full_id.split(":", 2);
25
   
25
   
26
    if (legacy)
26
    if (global_legacy)
27
    {
27
    {
28
        legacyOnState(full_id, parts[1], parts[0], available);
28
        legacyOnState(full_id, parts[1], parts[0], available);
29
        return;
29
        return;
30
    }
30
    }
31
   
31
   
Line 52... Line 52...
52
   
52
   
53
    variables.length = number_of_variables;
53
    variables.length = number_of_variables;
54
   
54
   
55
    var parts = full_id.split(":", 2);
55
    var parts = full_id.split(":", 2);
56
   
56
   
57
    if (legacy)
57
    if (global_legacy)
58
    {
58
    {
59
        legacyOnMessage(full_id, parts[1], parts[0], command, variables);
59
        legacyOnMessage(full_id, parts[1], parts[0], command, variables);
60
        return;
60
        return;
61
    }
61
    }
62
   
62
   
Line 122... Line 122...
122
    }
122
    }
123
}
123
}
124
 
124
 
125
Module.prototype.ReceiveMessage = function(id, command, variables)
125
Module.prototype.ReceiveMessage = function(id, command, variables)
126
{
126
{
127
    Log("received " + command);
127
    //Log("received " + command);
128
}
128
}
129
 
129
 
130
Module.prototype.GetAvailableIds = function()
130
Module.prototype.GetAvailableIds = function()
131
{
131
{
132
    var ids = new Array();
132
    var ids = new Array();
Line 157... Line 157...
157
    if (this.IsAvailable(id))
157
    if (this.IsAvailable(id))
158
    {
158
    {
159
        SendModuleMessage(this.name_ + ":" + id, command, variables);
159
        SendModuleMessage(this.name_ + ":" + id, command, variables);
160
    }
160
    }
161
}
161
}
-
 
162
 
-
 
163
 
-
 
164
// Console Commands
-
 
165
 
-
 
166
function modulelist()
-
 
167
{
-
 
168
    var result = "";
-
 
169
   
-
 
170
    for (var name in modules)
-
 
171
    {
-
 
172
        result += name + ":  " + modules[name].GetAvailableIds().toString() + "\n";
-
 
173
    }
-
 
174
   
-
 
175
    return result;
-
 
176
}
-
 
177
 
-
 
178
RegisterConsoleCommand("modulelist");
-
 
179