Implementation of System Level Control and Communications in a Hardware-in-the-Loop Microgrid Testbed