A sample of code taken from the NRT-8000 project.