Subversion Repositories HomeAutomation

Rev

Rev 981 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

Rev 981 Rev 985
Line 43... Line 43...
43
{
43
{
44
    SyslogStream &slog = SyslogStream::getInstance();
44
    SyslogStream &slog = SyslogStream::getInstance();
45
 
45
 
46
    string filename = Settings::get("CanIdXMLFile");
46
    string filename = Settings::get("CanIdXMLFile");
47
 
47
 
-
 
48
    if (file_exists(filename))
-
 
49
    {
48
    xmlNode.load(filename.c_str());
50
        xmlNode.load(filename.c_str());
49
 
51
 
50
    slog << "Loading definitions from " + filename + ".\n";
52
        slog << "Loading definitions from " + filename + ".\n";
-
 
53
    }
-
 
54
    else
-
 
55
    {
-
 
56
        slog << "CanIdXMLFile is not defined in the config file, this will probably not work at all.\n";
-
 
57
    }
51
}
58
}
52
 
59
 
53
string CanIdTranslator::lookupClassName(int classId)
60
string CanIdTranslator::lookupClassName(int classId)
54
{
61
{
55
    XmlNode classesNode = xmlNode.findChild("classes");
62
    XmlNode classesNode = xmlNode.findChild("classes");