1 #ifndef AVR_DEVICESETTINGS_H
2 #define AVR_DEVICESETTINGS_H
11 class ParseException
: public util::Exception
{
13 ParseException() : Exception("Parse Exception") {}
14 ParseException(const char * msg
) : Exception(msg
) {}
15 ParseException(const std::string
& msg
) : Exception(msg
) {}
22 * The Settings class allows reading Hardware settings
23 * from the xml file without exposing the xml related
26 class HardwareSettings
{
28 HardwareSettings(XmlHandle
& doc
, _xmlNode
*node
);
31 int intAttribute(const char *name
, int base
= 10) const;
32 int intAttributeDef(const char *name
, int def
= 0, int base
= 10) const;
33 std::string
strAttribute(const char *name
) const;
36 bool getBinding(std::string
& name
, std::string
& binding
);
45 * This class allows reading device settings from xml files
47 class DeviceSettings
{
49 static void listAll();
50 static void load(Device
*dev
, const char *devicename
);
53 static void parseMemory(Device
*dev
, _xmlNode
*memory
);
54 static void parseRegisters(Device
*dev
, _xmlNode
*registers
);
55 static void parseInterrupts(Device
*dev
, _xmlNode
*interrupts
);
56 static void parseHardware(Device
*dev
, XmlHandle
& doc
, _xmlNode
*hardware
);
60 #endif /*AVR_DEVICESETTINGS_H*/