Holistic framework for human-in-the-loop cyber-physical systems using body/brain-computer interfaces