Esempio n. 1
0
        public void SetVariables(object vList)
        {
            //vList를 실제의 내용으로 변환 할 것.
            string[]           kkk          = new string[] { "21000", "username", "softrev" };
            List <EcsVariable> ecsVariables = new List <EcsVariable>();
            List <object>      ecsValues    = new List <object>();

            for (int i = 0; i < kkk.Length; i++)
            {
                EcsVariable v = variableService.VariableStore.GetVariable(kkk[i]);
                if (v == null)
                {
                    //just skip
                    Console.WriteLine("Variable " + kkk[i] + " does not exist.");
                }
                else
                {
                    ecsVariables.Add(v);
                    ecsValues.Add("SSSSSSSS");
                }
            }

            if (ecsVariables.Count > 0)
            {
                variableService.VariablesChanged(ecsVariables.ToArray(), ecsValues.ToArray());
            }
        }
Esempio n. 2
0
        public void SendEvent(string sCEID, object dvList)
        {
            //TODO : 인수 중 object 부분을 DV 들의 리스트로 대체할 것.
            EcsEvent evt = eventsService.EventStore.GetEvent(sCEID);

            //TODO : 실제 인수로 할 것...
            string[] kkk = new string[] { "21000", "username", "softrev" };

            bool isAllOK = true;
            List <EcsVariable> ecsVariables = new List <EcsVariable>();

            for (int i = 0; i < kkk.Length; i++)
            {
                EcsVariable v = variableService.VariableStore.GetVariable(kkk[i]);
                if (v == null)
                {
                    Console.WriteLine("Variable " + kkk[i] + " does not exist.");
                    isAllOK = false;
                }
                else
                {
                    ecsVariables.Add(v);
                }
            }

            if (isAllOK)
            {
                object[] ecsValues = new object[] { };
                eventsService.TriggerEvent(evt, ecsVariables.ToArray(), ecsVariables.Count == 0 ? new object[] { } : ecsValues);
            }
        }
Esempio n. 3
0
        public void VerifyVariableValue(EcsVariable variable, object newValue)
        {
            //TODO
            //S2F15 New Equipment Constant Send 1
            // Heller EC Option : verifyValue : True, sourceOption : SuppliedByECS
            // c.f. Heller SV Option : verifyValue : False, sourceOption : SuppliedByECS
            // c.f. Heller DV Option : verifyValue : False, sourceOption : SuppliedByECS
            // S2F15에 대해 List 구성에 불구하고, 개별 VID 별로 발생한다.

            //Hashtable tmpTable = new Hashtable();
            //for (long i = 0; i < nCount; i++)
            //{
            //    tmpTable.Add(pnEcids[i], psVals[i]);
            //}
            //// 설비측 EC 변경 시도 : try to change EC
            //OnChangeControl?.Invoke(this, new ControlArg("ChangeRequestECFromHost", tmpTable, new object[] { nMsgId }));

            //RangeError
            SubError err = (SubError) new IllegalValueSubError("Ecs Error");

            //NoError
            //SubError err = (SubError)new NoErrorParameterSubError("", new ObjParameterData[] { new ObjParameterData("result", newValue) });
            //현재 변경 불가시
            //SubError err = (SubError)new CannotPerformNowSubError("Ecs Error");
            if (err != null)
            {
                throw ErrorFactory.CreateException(err.ErrorCode, err.Message, true);
            }
        }
Esempio n. 4
0
 public void SetVariable(EcsVariable variable, object variableValue)
 {
     //Heller Not Use
     //source option is SourcedByECS
     //Heller Not Use: S2F15 New Equipment Constant Send 2 (If value OK and source option is SourcedByECS)
     throw new NotImplementedException();
 }
Esempio n. 5
0
 public void SetEquipConst(object vList)
 {
     string[] kkk = new string[] { "21000", "username", "softrev" };
     for (int i = 0; i < kkk.Length; i++)
     {
         EcsVariable v = variableService.VariableStore.GetVariable(kkk[i]);
         if (v == null)
         {
             //just skip
             Console.WriteLine("Variable " + kkk[i] + " does not exist.");
         }
         else
         {
             variableService.VariableChanged(v, "SSSSS");
             variableService.OperatorEquipmentConstantChanged(v, false);
         }
     }
 }
Esempio n. 6
0
 public object GetVariable(EcsVariable variable)
 {
     //Heller Not Use
     //source option is SourcedByECS
     throw new NotImplementedException();
 }