ref #4242, #4196 - systemState reengineering
Merge pull request #4 from alv-ch/4242+4196-calculate-system-state

ref #4242, #4196 - systemState reengineering