[Nut-upsdev] libnutconf: An overview

VaclavKrpec at Eaton.com VaclavKrpec at Eaton.com
Mon Dec 10 11:45:24 UTC 2012


Hello fellow developers,

as you may have noticed from a few e-mails in the past,
there is a new NUT library in development these days.
It should be part of the NUT platform API in the future
and I'd like to present the status of work, hereby.

1/ The library shall be responsible of NUT configuration
management.  It shall encapsulate access and manipulation
with all the configuration parameters of all the config. files
(or possibly other config. resources).
The vision is that using a set of such high-level libraries,
NUT will become an open framework (or platform, if you
prefer) for further development of more complex power
control solutions.  (I hope I've formulated that, well.)

Now, the (C++) libnutconf library design and development was
started by Emilien K. some months ago; during the last
month or so, I continued on the implementation, culminating
these days by announcing that the core is basically coded.

The library now contains an I/O layer, allowing synchronous access
to configuration data (stream) in memory, file and on socket:
nutstream module.
There is a number of configuration classes associated with the following
configuration files: nut.conf, upsmon.conf, upsd.conf, ups.conf and upsd.users
(hope I didn't forget any).  Support for these we need, right now; upssched.conf
support will be added, later.
The config. containers are defined in the nutconf module; their serialisers are
in the nutwriter module, the de-serialisers are currently in nutconf, too,
but shall be moved to a separate nutparser module, soon.

This is currently coded; however, not all is unit-tested (Emilien has UT for
the parser if I'm not much mistaken and I've written a basic UT for the nutstream
module, but that's it for now).
UTs for libnutconf are next on my list, they should be available later this week.

There are 2 more functionalities in the specifications for the library:
signalisation support and also support for drivers restart on configuration changes.
These will be addressed right after the core UTs (although note that there shall
be some more consideration/discussion on this topic I guess, in the very near future).

By the beginning of the next year, the library shall be used as basis for creation
of (at least) 2 configuration tools: the nutconf cmd-line tool allowing for non-interactive
(batch) config. manipulation and the nutcli tool, which shall use text-only interactive
approach (and shall be used mainly as a helper for creation of NUT config. from scratch).

So, this is I hope about it for the libnutconf overview; except of where you can find the
current code:

https://github.com/balooloo/nut/tree/libconf

(Emilien's GitHub NUT repository, libconf branch).

Hope that the post contained all the major points of libnutconf existence etc.
If there are any questions, don't hesitate to ask.  Any issues, considerations,
recommendations, and---of course---any help offers welcome, as always... ;-)

Emilien, Arnaud, did I forget anything?

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