search for: upsconfigur

Displaying 2 results from an estimated 2 matches for "upsconfigur".

Did you mean: unconfigur
2012 Dec 04
1
libnutconf: specific C++ accessors technique proposition
...hat it's nice to use and consistent with NutConfiguration, UpsmonConfiguration and UpsdConfiguration config. classes (where it's done via Settable attributes). The GenericConfiguration class provides generic access to name/value items of config. sections. The specialised classes (like e.g. UpsConfiguration) shall inherit the mechanism from GenericConfiguration and are supposed to provide specialised (and typed) access to the config. attributes. Now, the obvious choice is to write getters/setters for them; however, this way, the access will be different than access to section-less config. files a...
2012 Dec 11
0
libnutconf: Basic UTs for libnutconf pushed
...e81aa Note that the tests are not exhaustive; however, they test the most prominent (sample) configuration settings (de)serialisation. The code should also give you an idea about how to write a simple configuration manipulation program using the library. E.g. something like this should work: nut::UpsConfiguration config; config.parseFrom(nut::NutFile( "/usr/local/ups/etc/ups.conf", nut::NutFile::READ_ONLY)); std::cout << "my-ups description: " << config.getDescription("my-ups") << std::endl; // ... config.setDriver("my-ups", "snmp-ups...