Signal Generation, Acquisition, and Processing in Brain Machine Interfaces: A Unified Review