First draft. Inherited work, stripped to core.

There is an experimental proof of concept which will serve as the starting
point for deviceutils.