Subversion Repositories HomeAutomation

Rev

Go to most recent revision | Details | Last modification | View Log | SVN | RSS feed

Rev Author Line No. Line
1603 runge 1
 
2
function Dimmer230(name)
3
{
4
	this.Module(name);
5
}
6
 
7
Extend(Dimmer230, Module);
8
 
9
Dimmer230.prototype.ReceiveMessage = function(id, command, variables)
10
{
11
	switch (command)
12
	{
13
		case "Netinfo":
14
		{
15
			break;
16
		}
17
	}
18
 
19
	this.Module.prototype.ReceiveMessage.call(this, id, command, variables);
20
}
21
 
22
Dimmer230.prototype.StartFade = function(id, channel, speed, direction)
23
{
24
	var variables = [
25
	{ "Channel"   : channel },
26
	{ "Speed"     : speed },
27
	{ "Direction" : direction } ];
28
 
29
	this.Module.prototype.SendMessage.call(this, id, "Start_Fade", variables);
30
}
31
 
32
Dimmer230.prototype.StopFade = function(id, channel)
33
{
34
	var variables = [
35
	{ "Channel"  : channel } ];
36
 
37
	this.Module.prototype.SendMessage.call(this, id, "Stop_Fade", variables);
38
}
39
 
40
Dimmer230.prototype.AbsoluteFade = function(id, channel, speed, end_value)
41
{
42
	var variables = [
43
	{ "Channel"  : channel },
44
	{ "Speed"    : speed },
45
	{ "EndValue" : end_value } ];
46
 
47
	this.Module.prototype.SendMessage.call(this, id, "Abs_Fade", variables);
48
}
49
 
50
Dimmer230.prototype.RelativeFade = function(id, channel, speed, direction, steps)
51
{
52
	var variables = [
53
	{ "Channel"   : channel },
54
	{ "Speed"     : speed },
55
	{ "Direction" : direction },
56
	{ "Steps"     : steps } ];
57
 
58
	this.Module.prototype.SendMessage.call(this, id, "Rel_Fade", variables);
59
}
60
 
61
Dimmer230.prototype.Demo = function(id, channel, speed, steps)
62
{
63
	var variables = [
64
	{ "Channel"   : channel },
65
	{ "Speed"     : speed },
66
	{ "Steps"     : steps } ];
67
 
68
	this.Module.prototype.SendMessage.call(this, id, "Demo", variables);
69
}