[Nut-upsdev] libnutconf: (De)serialisation methods added
VaclavKrpec at Eaton.com
VaclavKrpec at Eaton.com
Fri Dec 7 13:21:54 UTC 2012
Hello everybody,
(de)serialisation methods of all the currently existing config. classes
were pushed to balooloo/nut, libconf branch:
https://github.com/balooloo/nut/commit/df8b584c7fef71741b33bff11a482a103360250e
Please note that the deserialisation methods should work, however
they are quite inefficient since they simply read the whole stream to memory
and then call parseFromString. I guess it's enough for now, but in the future,
the parser should be modified to use NutStream, directly.
Nevertheless, this means that the code responsible for reading/writing
nut.conf, upsmon.conf, upsd.conf, ups.conf and upsd.users and assembly
of the associated configuration objects is there.
Note however, that most of the code wasn't U-tested, yet. I wanted to write
UTs, today, but I'm feeling a bit sick, I've a headache and I guess I'll have to
leave that for the next week.
As usual, reviews, comments, suggestions etc welcome.
Kind regards,
vasek
--
Václav Krpec
Network UPS Tools project
Eaton Opensource Team
-----------------------------
Eaton Elektrotechnika s.r.o. ~ S�dlo spolecnosti, jak je zaps�no v rejstr�ku: Kom�rovsk� 2406, Praha 9 - Horn� Pocernice, 193 00, Cesk� Republika ~ Jm�no, m�sto, kde byla spolecnost zaregistrov�na: Praha ~ Identifikacn� c�slo (ICO): 498 11 894
-----------------------------
More information about the Nut-upsdev
mailing list