Joint discrete power-level and delay optimization for network coded wireless communications