Please, take a look at the simple example 'usrm'.