State of the Art in Power Line Communications: From the Applications to the Medium