Second version

Output is a function.
Functions is in header.
No global variables/constants - only enum.
Doxygen comments.