public ActionResult <DiagnosticsResponse> GetDiagnostics() { var motors = _motorController.CollectDiagnostics(); var diagnosticsResponse = new DiagnosticsResponse() { Id = _motorController.GetType().FullName, Name = "Motor Controller", PeripheralState = _motorController.PeripheralState, Motors = motors, }; return(Ok(diagnosticsResponse)); }