ddci-tetra: add mode parsing, and store modes in state