public int StartLogResult(string strErrorMessage) { strErrorMessage = string.Empty; int nStatus = 0; StringBuilder strMotorolaModel = new StringBuilder(16); StringBuilder strMotorolaName = new StringBuilder(16); StringBuilder strTecnology = new StringBuilder(16); StringBuilder strFamily = new StringBuilder(16); CItemListEquip.GetMotName(strMotorolaName); CItemListEquip.GetMotorolaModel(strMotorolaModel); CItemListEquip.GetFamily(strFamily); CItemListEquip.GetTecnology(strTecnology); string strRecipe = strMotorolaName + "_BRD"; StartRecipeParameters parameters = new StartRecipeParameters(); parameters.equipmentId = ""; parameters.family = strFamily.ToString(); parameters.motorolaModel = strMotorolaModel.ToString(); parameters.recipeName = strRecipe; parameters.shopOrder = ""; parameters.softwareId = ""; parameters.technology = strTecnology.ToString(); parameters.XcvrNumber = "P1B"; nStatus = logProcess.StartRecipe(parameters, out strErrorMessage); return(nStatus); }
public static string GetPowerSupplyModel() { StringBuilder strPowerSupply = new StringBuilder(20); string strPowerSupplyModel; CItemListEquip.GetPowerSupplyModel(strPowerSupply); if (strPowerSupply.ToString().Contains("2306")) { strPowerSupplyModel = "KET2306"; } else if (strPowerSupply.ToString().Contains("66319")) { strPowerSupplyModel = "AG66319B"; } else if (strPowerSupply.ToString().Contains("2304")) { strPowerSupplyModel = "KET2304"; } else { //TODO: need correction //MessageBox.Show("Power Supply model not found", "GetPowerSupplyModel", MessageBoxButtons.OK, MessageBoxIcon.Hand); //Application.Exit(); strPowerSupplyModel = "NULL"; } return(strPowerSupplyModel); }
public static string GetComPortRight() { StringBuilder strData = new StringBuilder(256); CItemListEquip.GetComPortRight(strData); return(strData.ToString()); }
public static string GetFisrtIniFile() { StringBuilder strData = new StringBuilder(256); CItemListEquip.GetFisrtIniFilefromModelFile(strData); return(strData.ToString()); }
public static string GetPowerSupplyAddress() { StringBuilder strData = new StringBuilder(256); string strDataReturned; CItemListEquip.GetPS1GpibAddress(strData); strDataReturned = ("GPIB0::" + strData.ToString() + "::INSTR"); return(strDataReturned); }
// GetUnitInfo GPS Function Patricio public void POST() { if (CItemListEquip.IsChecStatusEnable() == 1) { int nStatus = -1; string errorMessage = string.Empty; string strStationCode; string strStnId; string strStnLine; StringBuilder strStationId = new StringBuilder(16); StringBuilder strStationLine = new StringBuilder(16); StringBuilder strStationType = new StringBuilder(16); StringBuilder strServerURL = new StringBuilder(256); CItemListEquip.GetStationLine(strStationLine); CItemListEquip.GetStationType(strStationType); CItemListEquip.GetStationID(strStationId); CItemListEquip.GetFlowControlQueryURL(strServerURL); strStnId = strStationId.ToString(); strStnLine = strStationLine.ToString(); strStationCode = strStnLine + "-" + strStnId; RequestParameters request = new RequestParameters(); request.URI = @strServerURL.ToString(); //request.URI = @"http://jagnt001.americas.ad.flextronics.com/FF_Http_AutoTester/default.aspx"; // FLEXFLOW request.orderNumber = ""; request.stationCode = strStationCode; request.stationType = strStationType.ToString(); request.testMachineId = ""; //request.unitTrackId = "N123456789"; //10 numeros request.unitTrackId = TrackId; string responseString = string.Empty; nStatus = TPWrapper.GpsAcquisition.Request(request, out responseString, out errorMessage); // MessageBox.Show(request.ToString()); // to debug if (nStatus != 0) { //MessageBox.Show(errorMessage); throw new Exception(errorMessage); //return; } else { ResponseParameters responseParameters = TPWrapper.GpsAcquisition.GetParametersValuesFromStringResponse(responseString); CJagLocalFucntions.SetCheckStatusResult("Init"); // Response string batteryPartNumber = responseParameters.batteryPartNumber; string boardKitNumber = responseParameters.boardKitNumber; string cfcSvn = responseParameters.cfcSvn; string endoPartNumber = responseParameters.endoPartNumber; string errorMsg = responseParameters.errorMessage; string facSvn = responseParameters.facSvn; string fvcNumber = responseParameters.fvcNumber; string orderNumber = responseParameters.orderNumber; string permission = responseParameters.permission; string salesModel = responseParameters.salesModel; string transceiverNumber = responseParameters.transceiverNumber; string unitTrackId = responseParameters.unitTrackId; if (permission.Equals("0")) // OK { nStatus = 0; CJagLocalFucntions.SetCheckStatusResult("PASS"); } else if (permission.Equals("1")) { nStatus = -1; //MessageBox.Show(errorMsg); throw new Exception(errorMsg); //return; } else { nStatus = -1; //MessageBox.Show("Application does not know if the phone is OK to test"); throw new Exception("Application does not know if the phone is OK to test"); //return; } } if (nStatus != 0) { CJagLocalFucntions.SetCheckStatusResult("FAIL"); return; } } else //Check status disable OK { CJagLocalFucntions.SetCheckStatusResult("PASS"); } }
public int LoadLogResult(string strErrorMessage) //Padrão MQS de log { strErrorMessage = string.Empty; int nStatus = 0; string strStationCode; string strStnId; string strStnLine; StringBuilder strStationId = new StringBuilder(56); StringBuilder strStationLine = new StringBuilder(56); StringBuilder strStationType = new StringBuilder(56); StringBuilder strMQSDataFeedLogPath = new StringBuilder(56); StringBuilder strMQSDataTempLogPath = new StringBuilder(56); StringBuilder strLogFormat = new StringBuilder(256); StringBuilder strServerURL = new StringBuilder(256); CItemListEquip.GetStationLine(strStationLine); CItemListEquip.GetStationType(strStationType); CItemListEquip.GetStationID(strStationId); CItemListEquip.GetMQSDataFeedLogPath(strMQSDataFeedLogPath); CItemListEquip.GetMQSDataTempLogPath(strMQSDataTempLogPath); CItemListEquip.GetAddTestLogFormat(strLogFormat); CItemListEquip.GetAddTestURL(strServerURL); strStnId = strStationId.ToString(); strStnLine = strStationLine.ToString(); strStationCode = strStnLine + "-" + strStnId; InitParameters parameters = new InitParameters(); parameters.computerMacAddress = GetMyMACAddress(); parameters.fixtureId = "*"; parameters.processCode = strStationType.ToString(); parameters.siteCode = "JAG"; parameters.softwareReleaseVersion = "V1.0"; parameters.stationCode = strStationCode; parameters.headerVersion = "TH4"; parameters.testHeaderVersion = "TR1"; parameters.logFormat = LogFileFormat.MQS; parameters.feedPath = strMQSDataFeedLogPath.ToString(); parameters.temporaryPath = strMQSDataTempLogPath.ToString(); if (CItemListEquip.IsLogData() == 0) // Para salvar o log LOcal { parameters.feedPath = @"C:SambaDtv\Prod\temp"; } if (strLogFormat.ToString().Equals("MQS")) // Tipos de lOG ...FF { parameters.logFormat = LogFileFormat.MQS; } else if (strLogFormat.ToString().Equals("MQS_AND_HTTP_POST")) { parameters.logFormat = LogFileFormat.MQS_AND_HTTP_POST; } else if (strLogFormat.ToString().Equals("HTTP_POST")) { parameters.logFormat = LogFileFormat.HTTP_POST; } else { // TODO: need correction //MessageBox.Show("FUNCTION LoadLogResult() Error:\n\rLog Format not valid-->" + strLogFormat.ToString()); //Application.Exit(); } if (strLogFormat.ToString().Contains("HTTP")) { if (strServerURL.Length == 0) { // TODO: need correction //MessageBox.Show("FUNCTION LoadLogResult() Error:\n\rHTTP POST URL Not Valid-->" + strServerURL.ToString()); //Application.Exit(); } parameters.serverUri = @strServerURL.ToString(); //HTTP JAG //parameters.serverUri = @"http://jagnt001.americas.ad.flextronics.com/FF_Http_AutoTester/default.aspx"; } nStatus = logProcess.Init(parameters, out strErrorMessage); return(nStatus); }