Wireless Ad Hoc and Sensor Networks: CDMA Code Channel Assignment