public StatusUpdateModel GetStatus() { var request = CreateRequestFromAction("STATUS"); var response = ExecuteRequestAndGetResponse(request); if (response.Contains("limit")) { return(StatusUpdateModel.MakeUnAvailableModel()); } try { var parser = new StatusParser(response); var model = parser.GetModel(); return(model); } catch (Exception e) { return(StatusUpdateModel.MakeUnAvailableModel()); } }
public StatusUpdateModel Scan(double x, double y) { var request = CreateRequestFromAction($"SCAN {x} {y}"); var response = ExecuteRequestAndGetResponse(request); if (response.Contains("ERROR")) { return(StatusUpdateModel.MakeUnAvailableModel()); } else { try { var parser = new StatusParser(response); var model = parser.GetModel(); return(model); } catch (Exception ex) { return(StatusUpdateModel.MakeUnAvailableModel()); } } }