RV's and some other trucks use something like this:
http://www.generatorjoe.net/page.asp?id=61

If you had a pulley driven gen you need to do the math for pully sizes which changes driven speed. A computer controled truck is should to idel at what it is programed to do with the engine sencer readings. For that reason it will not be consistant. You could try a throtel control to around 2000 rpm. I think you would find the RPM would not be concistant. Emmision system kicking on and off, A/C if on, air temp, and surges in puwer would cause problems. If you wanted to go all out you cou use an electronic RPM limiter like from MSD but just that woud set you back a few hundred.

Also figure if it's summertime the cooling system and auto trans will not handle runing the engine at 2000+ rpm in nutral for long periods. It is designed to have air flowing thru the radiator/trans cooler from the truck driving down the road. Then again you could add electric cooling fans and a trans cooler for a few hundred.

A lot of things are possable if you put the time and $$ into it. Reliability, financially, wear and tear on truck, and engenering time bolting on a gen to the truck engine is not a good choice.

Tom