Ejemplo n.º 1
0
        public void GomEpsConfigSet_no_error_Test()
        {
            GomEPS gom = new GomEPS();

            gom.GomEpsInitialize(add, 1);
            EPS.eps_config_t conf = new EPS.eps_config_t();
            //conf.output = new EPS.eps_config_t();
            EPS eps = gom.eps_table[0];

            conf.ppt_mode                 = (byte)eps.CurrentConfig.PptMode;
            conf.battheater_mode          = (byte)eps.CurrentConfig.BattheaterMode;
            conf.battheater_low           = eps.CurrentConfig.BattheaterLow;
            conf.battheater_high          = eps.CurrentConfig.BattheaterHigh;
            conf.output_initial_off_delay = new ushort[8];
            conf.output_initial_on_delay  = new ushort[8];
            conf.output_normal_value      = new byte[8];
            conf.output_safe_value        = new byte[8];
            for (int i = 0; i < 8; i++)
            {
                conf.output_initial_off_delay[i] = eps.CurrentConfig.OutputInitialOffDelay[i];
                conf.output_initial_on_delay[i]  = eps.CurrentConfig.OutputInitialOnDelay[i];
                conf.output_normal_value[i]      = eps.CurrentConfig.OutputNormalValue[i];
                conf.output_safe_value[i]        = eps.CurrentConfig.OutputSafeValue[i];
            }
            conf.vboost = new ushort[3];
            for (int i = 0; i < 3; i++)
            {
                conf.vboost[i] = eps.CurrentConfig.Vboost[i];
            }
            Assert.AreEqual(Constants.E_NO_SS_ERR, gom.GomEpsConfigSet(0, conf));
        }
Ejemplo n.º 2
0
        public void GomEpsConfigSet_not_an_index_Test()
        {
            GomEPS gom = new GomEPS();

            gom.GomEpsInitialize(add, 1);
            EPS.eps_config_t conf = new EPS.eps_config_t();
            Assert.AreEqual(Constants.E_INDEX_ERROR, gom.GomEpsConfigSet(1, conf));
        }