예제 #1
0
        public static byte[] getBytes(EPS.eps_hk_out_t str)
        {
            byte[] ans   = new byte[66]; //TODO: determine size
            int    index = 0;

            copyToByteArr(ans, str.commandReply, ref index);
            copyToByteArr(ans, str.curout, ref index);
            copyToByteArr(ans, str.output, ref index);
            copyToByteArr(ans, str.output_on_delta, ref index);
            copyToByteArr(ans, str.output_off_delta, ref index);
            copyToByteArr(ans, str.latchup, ref index);

            return(ans);
        }
예제 #2
0
        public void GET_HK_2_OUTTest()
        {
            EPS eps = new EPS();

            EPS.eps_hk_out_t ans = eps.GET_HK_2_OUT(2);
            for (int i = 0; i < 8; i++)
            {
                Assert.AreEqual(ans.output[i], eps.Outputs[i].Status);
                Assert.AreEqual(ans.output_off_delta[i], eps.CurrentConfig.OutputInitialOffDelay[i]);
                Assert.AreEqual(ans.output_on_delta[i], eps.CurrentConfig.OutputInitialOnDelay[i]);
            }
            for (int i = 0; i < 6; i++)
            {
                Assert.AreEqual(ans.latchup[i], ((Channel)eps.Outputs[i]).LatchupNum);
                Assert.AreEqual(ans.curout[i], ((Channel)eps.Outputs[i]).CurrentOut);
            }
        }