A flexible approach for smart management of transmissions in power line communications