示例#1
0
        private void getSystemTimer_Elapsed(object sender, ElapsedEventArgs e)
        {
            String msg = MatrixSystemDeviceMessageCreator.createSystemReport(this.HAC_Sys_DeviceInfo.ToString(),
                                                                             this.HAC_Sys_Status.ToString(),
                                                                             this.HAC_Sys_Batch_Info.ToString());

            SendMsg(msg);
        }
示例#2
0
        private void getMotorTimer_Elapsed(object sender, ElapsedEventArgs e)
        {
            Random ra = new Random();

            this.HAC_Motor_text_speed = ra.Next(7000, 10000);
            this.HAC_Motor_elecspeed  = ra.Next(30000, 50000);
            this.HAC_Motor_Power      = ra.Next(800, 1000);

            String msg = MatrixSystemDeviceMessageCreator.createMotorReport(this.HAC_Motor_Status.ToString(),
                                                                            this.HAC_Motor_text_speed.ToString(),
                                                                            this.HAC_Motor_elecspeed.ToString(),
                                                                            this.HAC_Motor_Power.ToString());

            SendMsg(msg);
        }
示例#3
0
        private void getTHTimer_Elapsed(object sender, ElapsedEventArgs e)
        {
            Random ra = new Random();

            this.HAC_TH_temperature1 = ra.Next(300, 600);
            this.HAC_TH_temperature2 = ra.Next(300, 600);
            this.HAC_TH_temperature3 = ra.Next(300, 600);
            this.HAC_TH_humidity1    = ra.Next(50, 100);
            this.HAC_TH_humidity2    = ra.Next(50, 100);

            String msg = MatrixSystemDeviceMessageCreator.createTHReport(this.HAC_TH_temperature1.ToString(),
                                                                         this.HAC_TH_temperature2.ToString(),
                                                                         this.HAC_TH_temperature3.ToString(),
                                                                         this.HAC_TH_humidity1.ToString(),
                                                                         this.HAC_TH_humidity2.ToString());

            SendMsg(msg);
        }
示例#4
0
        private void getODTimer_Elapsed(object sender, ElapsedEventArgs e)
        {
            String s  = "";
            char   od = '\0';
            Random ra = new Random();

            lock (KeyObject)
            {
                for (int i = 0; i < 8; i++)
                {
                    for (int j = 0; j < 12; j++)
                    {
                        this.HAC_OD_rowl[i][j] = ra.Next(0, 31);
                        od = Convert.ToChar(HAC_OD_rowl[i][j]);
                        s += od;
                    }
                }
            }

            String msg = MatrixSystemDeviceMessageCreator.createODReport(s);

            SendMsg(msg);
        }
示例#5
0
        private void getCodeTimer_Elapsed(object sender, ElapsedEventArgs e)
        {
            String msg = MatrixSystemDeviceMessageCreator.createCodeReport(this.HAC_InBarCode, this.HAC_OutBarCode);

            SendMsg(msg);
        }