private static bool appendAttributeValues(string CURRENT_SERIAL_NUMBER, string SERIAL_NUMBER_POS, ItacFunctions.AttributeValue AttributeValue, out string[] ResultString) { Logger.Log.Info((object)"appendAttributeValues(): method called ."); ResultString = (string[])null; bool flag; try { Logger.Log.Info((object)string.Format("Calling: _imsapi.attribAppendAttributeValues(\n _stationNumber: {0},\n 0,\n CURRENT_SERIAL_NUMBER: {1},\n ObjectDetail : {2},\n -1, \n 0, \n AttributeValue.keys: {3},\n AttributeValue.values: {3}", (object)ItacFunctions._stationNumber, (object)CURRENT_SERIAL_NUMBER, (object)SERIAL_NUMBER_POS, (object)string.Join(" ,", AttributeValue.keys), (object)string.Join(" ,", AttributeValue.values))); int resultValue = ItacFunctions._imsapi.attribAppendAttributeValues(ItacFunctions._sessionContext, ItacFunctions._stationNumber, 0, CURRENT_SERIAL_NUMBER, SERIAL_NUMBER_POS, -1L, 0, AttributeValue.keys, AttributeValue.values, out ResultString); if (resultValue != 0) { Logger.Log.Error((object)"appendAttributeValues(): _imsapi.attribAppendAttributeValues failed"); ItacFunctions.printErrorText(resultValue); flag = false; } else { flag = true; Logger.Log.Info((object)("appendAttributeValues() ResultString: \n ATTRIBUTE_CODE , \t ATTRIBUTE_VALUE \t , ERROR_CODE " + ItacFunctions.alignResultString4Log(ResultString, 3))); } } catch (Exception ex) { flag = false; string str = ex.Source + " " + ex.Message; Logger.Log.Fatal((object)str); } Logger.Log.Info((object)string.Format("appendAttributeValues(): return with {0}", (object)flag)); return(flag); }
public static bool UploadFailureAndResultData(string PROCESS_LAYER, string SERIAL_NUMBER, string SERIAL_NUMBER_POS, int serialNumberState, float cycleTime, string[] measureValues, string[] failureValues, string[] failureSlipValues) { Logger.Log.Info((object)string.Format("Method called: UploadFailureAndResultData( \n PROCESS_LAYER: {0}, SERIAL_NUMBER: {1}, SERIAL_NUMBER_POS: {2}, serialNumberState: {3}, cycleTime: {4})", (object)PROCESS_LAYER, (object)SERIAL_NUMBER, (object)SERIAL_NUMBER_POS, (object)serialNumberState, (object)cycleTime)); bool flag = false; Logger.Log.Warn((object)"Temporarily: failureValues = new string[0] ; \n failureSlipValues = new string[0] ;"); failureValues = new string[0]; failureSlipValues = new string[0]; try { if (measureValues == null) { measureValues = new string[0]; Logger.Log.Warn((object)"UploadFailureAndResultData() measureValues vector null. Cosidered as empty."); } if (failureValues == null) { failureValues = new string[0]; Logger.Log.Warn((object)"UploadFailureAndResultData() failureValues vector null. Cosidered as empty."); } if (failureSlipValues == null) { failureSlipValues = new string[0]; Logger.Log.Warn((object)"UploadFailureAndResultData() failureSlipValues vector null. Cosidered as empty."); } int num = int.Parse(PROCESS_LAYER); string[] stringArray1 = new string[4] { "ERROR_CODE", "MEASURE_FAIL_CODE", "MEASURE_NAME", "MEASURE_VALUE" }; string[] stringArray2 = new string[2] { "ERROR_CODE", "FAILURE_TYPE_CODE" }; string[] stringArray3 = new string[2] { "ERROR_CODE", "TEST_STEP_NAME" }; Logger.Log.Info((object)("UploadFailureAndResultData() measureKeys " + ItacFunctions.alignResultString4Log(stringArray1, 4) + ItacFunctions.alignResultString4Log(measureValues, 4))); Logger.Log.Info((object)("UploadFailureAndResultData() failureKeys" + ItacFunctions.alignResultString4Log(stringArray2, 2) + ItacFunctions.alignResultString4Log(failureValues, 2))); Logger.Log.Info((object)("UploadFailureAndResultData() failureSlipKeys" + ItacFunctions.alignResultString4Log(stringArray3, 2) + ItacFunctions.alignResultString4Log(failureSlipValues, 2))); string[] stringArray4 = (string[])null; string[] stringArray5 = (string[])null; string[] strArray = (string[])null; Logger.Log.Info((object)string.Format("Calling: _imsapi.trUploadFailureAndResultData( \n _stationNumber: {0}, \n processLayer: {1}, \n SERIAL_NUMBER: {2}, \n SERIAL_NUMBER_POS: {3}, \n serialNumberState: {4}, \n 0, \n cycleTime: {5}, \n -1", (object)ItacFunctions._stationNumber, (object)num, (object)SERIAL_NUMBER, (object)SERIAL_NUMBER_POS, (object)serialNumberState, (object)cycleTime)); int resultValue = ItacFunctions._imsapi.trUploadFailureAndResultData(ItacFunctions._sessionContext, ItacFunctions._stationNumber, num, SERIAL_NUMBER, SERIAL_NUMBER_POS, serialNumberState, 0, cycleTime, -1L, stringArray1, measureValues, out stringArray4, stringArray2, failureValues, out stringArray5, stringArray3, failureSlipValues, out strArray); if (resultValue != 0) { ItacFunctions.printErrorText(resultValue); } else { Logger.Log.Info((object)("UploadFailureAndResultData() measureResultValues " + ItacFunctions.alignResultString4Log(stringArray1, 4) + ItacFunctions.alignResultString4Log(stringArray4, 4))); Logger.Log.Info((object)("UploadFailureAndResultData() failureResultValues " + ItacFunctions.alignResultString4Log(stringArray2, 2) + ItacFunctions.alignResultString4Log(stringArray5, 2))); Logger.Log.Info((object)("UploadFailureAndResultData() failureSlipValues " + ItacFunctions.alignResultString4Log(stringArray3, 2) + ItacFunctions.alignResultString4Log(failureSlipValues, 2))); flag = true; } } catch (Exception ex) { flag = false; string str = ex.Source + " " + ex.Message; Logger.Log.Fatal((object)str); } Logger.Log.Info((object)string.Format("UploadFailureAndResultData(): return with {0}", (object)flag)); return(flag); }