Beispiel #1
0
        public static bool AppendAttributeValues_FAZIT(string CURRENT_SERIAL_NUMBER, string SERIAL_NUMBER_POS, string FAZIT_NUMBER_VALUE, out string[] resultSting)
        {
            Logger.Log.Info((object)"AppendAttributeValues_FAZIT(): method called .");
            ItacFunctions.AttributeValue AttributeValue = new ItacFunctions.AttributeValue()
            {
                keys = new string[3]
                {
                    "ATTRIBUTE_CODE",
                    "ATTRIBUTE_VALUE",
                    "ERROR_CODE"
                },
                values = new string[6]
                {
                    "FAZIT_NUMBER",
                    FAZIT_NUMBER_VALUE,
                    "0",
                    "FAZIT_SENT",
                    GenericFunctions.GetTimeStamp(),
                    "0"
                }
            };
            bool flag = ItacFunctions.appendAttributeValues(CURRENT_SERIAL_NUMBER, SERIAL_NUMBER_POS, AttributeValue, out resultSting);

            Logger.Log.Info((object)string.Format("AppendAttributeValues_FAZIT(): return with {0}", (object)flag));
            return(flag);
        }
Beispiel #2
0
        public static bool AppendAttributeValue(string CURRENT_SERIAL_NUMBER, string SERIAL_NUMBER_POS, string ATTRIBUTE_NAME, string ATTRIBUTE_VALUE, out string[] resultSting)
        {
            Logger.Log.Info((object)string.Format("AppendAttributeValue(): method called. ATTRIBUTE_NAME: {0}, ATTRIBUTE_VALUE: {1} .", (object)ATTRIBUTE_NAME, (object)ATTRIBUTE_VALUE));
            ItacFunctions.AttributeValue AttributeValue = new ItacFunctions.AttributeValue()
            {
                keys = new string[3]
                {
                    "ATTRIBUTE_CODE",
                    "ATTRIBUTE_VALUE",
                    "ERROR_CODE"
                },
                values = new string[3]
                {
                    ATTRIBUTE_NAME,
                    ATTRIBUTE_VALUE,
                    "0"
                }
            };
            bool flag = ItacFunctions.appendAttributeValues(CURRENT_SERIAL_NUMBER, SERIAL_NUMBER_POS, AttributeValue, out resultSting);

            Logger.Log.Info(string.Format("AppendAttributeValue(): return with {0}", flag));
            return(flag);
        }
Beispiel #3
0
        public static bool AppendAttributeValues_MAC(string CURRENT_SERIAL_NUMBER, string SERIAL_NUMBER_POS, string[] MAC_ADDRESSES, int NumberOfMacAddressToUpdate, out string[] ResultString)
        {
            Logger.Log.Info((object)"AppendAttributeValues_MAC(): method called .");
            string str = string.Join(",", MAC_ADDRESSES, 0, NumberOfMacAddressToUpdate);

            Logger.Log.Info((object)string.Format("AppendAttributeValues_MAC( CURRENT_SERIAL_NUMBER = {0}, MAC_ADDRESSES = {1}", (object)CURRENT_SERIAL_NUMBER, (object)str));
            ItacFunctions.AttributeValue AttributeValue = new ItacFunctions.AttributeValue()
            {
                keys = new string[3]
                {
                    "ATTRIBUTE_CODE",
                    "ATTRIBUTE_VALUE",
                    "ERROR_CODE"
                },
                values = new string[3] {
                    "MAC", str, "0"
                }
            };
            bool flag = ItacFunctions.appendAttributeValues(CURRENT_SERIAL_NUMBER, SERIAL_NUMBER_POS, AttributeValue, out ResultString);

            Logger.Log.Info((object)string.Format("AppendAttributeValues_MAC(): return with {0}", (object)flag));
            return(flag);
        }
Beispiel #4
0
        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);
        }