Subversion Repositories HomeAutomation

Rev

Details | Last modification | View Log | SVN | RSS feed

Rev Author Line No. Line
1607 runge 1
 
2
function CanService(type, name, id)
3
{
4
    this.Service(type, name, id);
5
 
6
    this.myIsOnline = false;
7
}
8
 
9
extend(CanService, Service);
10
 
11
CanService.prototype.myIsOnline = null;
12
 
13
CanService.prototype.canMessageHandler = function(canMessage)
14
{
15
}
16
 
17
CanService.prototype.setOnline = function()
18
{
19
    this.myIsOnline = true;
20
    log(this.myName + ":" + this.myId + "> Service went online\n");
21
    this.callEvent("online", null);
22
}
23
 
24
CanService.prototype.setOffline = function()
25
{
26
    this.myIsOnline = false;
27
    log(this.myName + ":" + this.myId + "> Service went offline\n");
28
    this.callEvent("offline", null);
29
}
30
 
31
CanService.prototype.isOnline = function()
32
{
33
    return this.myIsOnline;
34
}
35