public async Task <IEnumerable <string> > loginOperatorAsync(Operator oper, TestSet tset) { string sendMessage = string.Format("{0}:{1}:{2}:{3}:RE:OP:{4}:", tset.workstation, tset.name, tset.number, oper.Id, oper.password); var response = await sendReceiveAsync(sendMessage); return(parsePTSResponse(response)); }
public async Task <IEnumerable <string> > sendCurlResultAsync(Fiber fiber, TestSet tset) { string sendMessage = string.Format("{0}:{1}:{2}:{3}:UP:CR:{4}:CURL:OSE:{5}:{6}:{7}:0:ISE:{8}:{9}:{10}:1:MARK:{11}", tset.workstation, //0 tset.name, //1 tset.number, //2 tset.oper.Id, //3 fiber.fiberId, //4 fiber.results.curlResults.OSEvalue.ToString("0000.00"), //5 fiber.results.curlResults.OSEresult, //6 fiber.results.curlResults.OSEtestcode, //7 fiber.results.curlResults.ISEvalue.ToString("0000.00"), //8 fiber.results.curlResults.ISEresult, //9 fiber.results.curlResults.ISEtestcode, //10 fiber.testList.markNumber); //11 try { var response = await sendReceiveAsync(sendMessage); return(parsePTSResponse(response)); } catch (Exception ex) { List <string> errorMessage = new List <string> { "Exception in PTStransaction.sendCurlResultsAsync: " + ex.Message }; logger.Error(tset.sessionInfo, errorMessage.ToString()); return(errorMessage); } }
public CURL(Fiber fiber, TestSet testSet) { this.fiber = fiber; this.testSet = testSet; InitializeComponent(); setupTest(); }
/// <summary> /// Get the test limits for the testset and fiber so the application knows whether the fiber passes or fails. /// /// </summary> /// <param name="fiber"></param> /// <param name="tset"></param> /// <returns></returns> public async Task <IEnumerable <string> > getTestLimitsAsync(Fiber fiber, TestSet tset) { fiber.formatIdForPTS(); string sendMessage = string.Format("{0}:{1}:{2}:{3}:RE:LM:{4}", tset.workstation, tset.name, tset.number, tset.oper.Id, fiber.fiberId); var response = await sendReceiveAsync(sendMessage); return(parsePTSResponse(response)); }
public Settings(TestSet set) { this.set = set; workstationSelection.Text = set.workstation ?? ""; nameSelection.Text = set.name ?? ""; numberSelection.Text = set.number ?? ""; comSelection.Text = set.portNumber ?? ""; serverSelection.Text = System.Configuration.ConfigurationManager.AppSettings["Server"]; }
public TestSetLimits(TestSet set, List <string> list) { //Assign this new limits object to the set being passed into the constructor LimitsList = list; set.limits = this; //Assign the limits returned from PTS to meaningful properties based on the requested test set AssignLimitsForTestSet(set.name); }
public bool checkFiberNeedsRemeasure(TestSet set) { var test = testList.TestEntries.FirstOrDefault(o => o.Name == set.testName); if (test != null) { return(test.Required == "R" && test.Result == "RM"); } return(false); }
public Login(Operator oper, TestSet tset) { pts = new PTStransaction(); pts.PTSMessageSending += OnPTSMessageSending; this.oper = oper; passwordErrorProvider = new ErrorProvider(); usernameErrorProvider = new ErrorProvider(); testSet = tset; InitializeComponent(); ShowDialog(); }
public bool checkIfTestRequired(TestSet set) { var test = testList.TestEntries.FirstOrDefault(o => o.Name == set.testName); if (isReferenceFiber() || isNSTD()) { return(true); } else if (test != null) { return(test.boolRequired); } return(false); }
private void initializeTestSet() { string err; //get command line arguments testArgs.getArgs(out err); //if there was an error, display it if (!string.IsNullOrWhiteSpace(err)) { writeToLog(err); } //if no error create a new TestSet and assign the values from the command line arguments to the TestSet object else { testSet = new TestSet(testArgs.testSetName, testArgs.workstation, testArgs.testSetNumber); updateTextBar(); testSet.managePorts(); } }
/// <summary> /// Get the test list for the fiber so the operator and the application know what tests need to be run /// </summary> /// <param name="fiber"></param> /// <param name="tset"></param> /// <returns>Returns the parsed version of the PTS response</returns> public async Task <IEnumerable <string> > getTestListAsync(Fiber fiber, TestSet tset) { fiber.formatIdForPTS(); string sendMessage = string.Format("{0}:{1}:{2}:{3}:RE:FI:{4}:{5}", tset.workstation, tset.name, tset.number, tset.oper.Id, fiber.fiberId, fiber.serialId); try { var response = await sendReceiveAsync(sendMessage); return(parsePTSResponse(response)); } catch (Exception ex) { List <string> errMessage = new List <string> { "Exception in PTStransaction.getTestListAsync :" + ex.Message }; logger.Error(tset.sessionInfo, errMessage.ToString()); return(errMessage); } }
public CommTest(TestSet tSet, string newPort) { InitializeComponent(); this.tSet = tSet; tSet.portNumber = newPort; tSet.managePorts(); try { if (tSet.port.isOpen()) { writeToLog(string.Format("Port: {0} open\n", tSet.portNumber)); } else { writeToLog(string.Format("Failed to open port {0} ", tSet.portNumber)); } } catch (Exception ex) { writeToLog(string.Format("Port failed to open with ex: {0}" + System.Environment.NewLine, ex.Message)); } }
public Operator() { this.name = null; this.Id = null; this.tset = null; }
public Operator(string name, string Id, TestSet tset) { this.name = name; this.Id = Id; this.tset = tset; }
public Test(Fiber fiber, TestSet testSet) { this.fiber = fiber; this.testSet = testSet; }