コード例 #1
0
ファイル: MESTransfer.cs プロジェクト: trantan490/web
        public void recv_RAS_Resource_Event(string sRequest, ref string sReply)
        {
            byte[]                     outByt             = FwxCmnFunction.UnPackMessage(sRequest);
            StreamTransformer          former             = new StreamTransformerImpl(outByt);
            RAS_Resource_Event_In_Tag  Resource_Event_In  = new RAS_Resource_Event_In_Tag();
            RAS_Resource_Event_Out_Tag Resource_Event_Out = new RAS_Resource_Event_Out_Tag();

            MESType.transform_RAS_Resource_Event_In_Tag(former, ref Resource_Event_In);
            RAS_Resource_Event(Resource_Event_In, ref Resource_Event_Out); /* Call User Procedure */

            former = new StreamTransformerImpl();
            MESType.serialize_RAS_Resource_Event_Out_Tag(former, Resource_Event_Out);

            sReply = FwxCmnFunction.PackMessage(former.getBytes());
        }
コード例 #2
0
        public static bool RAS_Resource_Event(string FunctionName, RAS_Resource_Event_In_Tag Resource_Event_In, ref RAS_Resource_Event_Out_Tag Resource_Event_Out)
        {
            try
            {
                if (null == MESUrl || MESUrl.Trim().Equals(""))
                {
                    throw new Exception("INVALID_URL");
                }

                if (0 >= MESTimeOut)
                {
                    throw new Exception("INVALID_TIMEOUT");
                }

                string            sReplyMsg   = null;
                string            sSendMsg    = null;
                byte[]            aReplyData  = null;
                SmartWebService   oWebService = new SmartWebService();
                StreamTransformer former      = new StreamTransformerImpl();

                oWebService.SetUrl(MESUrl);
                oWebService.SetTimeOut(MESTimeOut);

                MESType.serialize_RAS_Resource_Event_In_Tag(former, Resource_Event_In);

                sSendMsg = FwxCmnFunction.PackMessage(former.getBytes());
                oWebService.RequestReply(FunctionName, sSendMsg, ref sReplyMsg);
                aReplyData = FwxCmnFunction.UnPackMessage(sReplyMsg);

                former = new StreamTransformerImpl(aReplyData);
                MESType.transform_RAS_Resource_Event_Out_Tag(former, ref Resource_Event_Out);

                return(true);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
コード例 #3
0
 public static void transform_RAS_Resource_Event_In_Tag(StreamTransformer former, ref RAS_Resource_Event_In_Tag source)
 {
     source.h_passport     = deleteNull(former.readMsgString());
     source.h_language     = former.readMsgChar();
     source.h_factory      = deleteNull(former.readMsgString());
     source.h_user_id      = deleteNull(former.readMsgString());
     source.h_password     = deleteNull(former.readMsgString());
     source.h_proc_step    = former.readMsgChar();
     source.back_time      = deleteNull(former.readMsgString());
     source.back_time_flag = former.readMsgChar();
     source.chart_flag     = former.readMsgChar();
     source.count          = former.readMsgInt();
     source.res_id         = deleteNull(former.readMsgString());
     source.event_id       = deleteNull(former.readMsgString());
     source.lot_event_flag = former.readMsgChar();
     source.batch_flag     = former.readMsgChar();
     source.chg_pri_sts    = deleteNull(former.readMsgString());
     source.chg_sts_1      = deleteNull(former.readMsgString());
     source.chg_sts_2      = deleteNull(former.readMsgString());
     source.chg_sts_3      = deleteNull(former.readMsgString());
     source.chg_sts_4      = deleteNull(former.readMsgString());
     source.chg_sts_5      = deleteNull(former.readMsgString());
     source.chg_sts_6      = deleteNull(former.readMsgString());
     source.chg_sts_7      = deleteNull(former.readMsgString());
     source.chg_sts_8      = deleteNull(former.readMsgString());
     source.chg_sts_9      = deleteNull(former.readMsgString());
     source.chg_sts_10     = deleteNull(former.readMsgString());
     source.tran_cmf_1     = deleteNull(former.readMsgString());
     source.tran_cmf_2     = deleteNull(former.readMsgString());
     source.tran_cmf_3     = deleteNull(former.readMsgString());
     source.tran_cmf_4     = deleteNull(former.readMsgString());
     source.tran_cmf_5     = deleteNull(former.readMsgString());
     source.tran_cmf_6     = deleteNull(former.readMsgString());
     source.tran_cmf_7     = deleteNull(former.readMsgString());
     source.tran_cmf_8     = deleteNull(former.readMsgString());
     source.tran_cmf_9     = deleteNull(former.readMsgString());
     source.tran_cmf_10    = deleteNull(former.readMsgString());
     source.tran_cmf_11    = deleteNull(former.readMsgString());
     source.tran_cmf_12    = deleteNull(former.readMsgString());
     source.tran_cmf_13    = deleteNull(former.readMsgString());
     source.tran_cmf_14    = deleteNull(former.readMsgString());
     source.tran_cmf_15    = deleteNull(former.readMsgString());
     source.tran_cmf_16    = deleteNull(former.readMsgString());
     source.tran_cmf_17    = deleteNull(former.readMsgString());
     source.tran_cmf_18    = deleteNull(former.readMsgString());
     source.tran_cmf_19    = deleteNull(former.readMsgString());
     source.tran_cmf_20    = deleteNull(former.readMsgString());
     source.tran_comment   = deleteNull(former.readMsgString());
     source.lot_count      = former.readMsgInt();
     source._size_lot_list = former.readMsgInt();
     source.lot_list       = new RAS_Resource_Event_In_Tag_lot_list[source._size_lot_list];
     for (int i = 0; i < source._size_lot_list; i++)
     {
         source.lot_list[i] = new RAS_Resource_Event_In_Tag_lot_list();
         transform_RAS_Resource_Event_In_Tag_lot_list(former, ref source.lot_list[i]);
     }
     source.edc_hist_seq      = former.readMsgInt();
     source.spec_out_flag     = former.readMsgChar();
     source.confirm_char_seq  = former.readMsgInt();
     source.confirm_unit_seq  = former.readMsgInt();
     source.confirm_value_seq = former.readMsgInt();
     source.hist_seq          = former.readMsgInt();
     source.tran_time         = deleteNull(former.readMsgString());
     source.recipe_id         = deleteNull(former.readMsgString());
     source.recipe_version    = former.readMsgInt();
     source.col_set_id        = deleteNull(former.readMsgString());
     source.col_set_version   = former.readMsgInt();
     source.char_count        = former.readMsgInt();
     source._size_char_list   = former.readMsgInt();
     source.char_list         = new RAS_Resource_Event_In_Tag_char_list[source._size_char_list];
     for (int i = 0; i < source._size_char_list; i++)
     {
         source.char_list[i] = new RAS_Resource_Event_In_Tag_char_list();
         transform_RAS_Resource_Event_In_Tag_char_list(former, ref source.char_list[i]);
     }
     source.h_sub_step       = former.readMsgChar();
     source.lot_res_flag     = former.readMsgChar();
     source.spc_count        = former.readMsgInt();
     source.edc_char_seq     = former.readMsgInt();
     source.edc_input_flag   = former.readMsgChar();
     source._size_chart_list = former.readMsgInt();
     source.chart_list       = new RAS_Resource_Event_In_Tag_chart_list[source._size_chart_list];
     for (int i = 0; i < source._size_chart_list; i++)
     {
         source.chart_list[i] = new RAS_Resource_Event_In_Tag_chart_list();
         transform_RAS_Resource_Event_In_Tag_chart_list(former, ref source.chart_list[i]);
     }
     source.proc_alarm_flag = former.readMsgChar();
     source.sheet_name      = deleteNull(former.readMsgString());
     source.sheet_key_1     = deleteNull(former.readMsgString());
     source.sheet_key_2     = deleteNull(former.readMsgString());
     source.sheet_key_3     = deleteNull(former.readMsgString());
     source.sheet_key_4     = deleteNull(former.readMsgString());
     source.sheet_key_5     = deleteNull(former.readMsgString());
     source.sheet_key_6     = deleteNull(former.readMsgString());
     source.sheet_key_7     = deleteNull(former.readMsgString());
     source.sheet_key_8     = deleteNull(former.readMsgString());
     source.sheet_key_9     = deleteNull(former.readMsgString());
     source.sheet_key_10    = deleteNull(former.readMsgString());
     source.data_type       = deleteNull(former.readMsgString());
     source.tran_time       = deleteNull(former.readMsgString());
     source.data_count      = former.readMsgInt();
     source._size_data_tbl  = former.readMsgInt();
     source.data_tbl        = new RAS_Resource_Event_In_Tag_data_tbl[source._size_data_tbl];
     for (int i = 0; i < source._size_data_tbl; i++)
     {
         source.data_tbl[i] = new RAS_Resource_Event_In_Tag_data_tbl();
         transform_RAS_Resource_Event_In_Tag_data_tbl(former, ref source.data_tbl[i]);
     }
 }
コード例 #4
0
 public static void serialize_RAS_Resource_Event_In_Tag(StreamTransformer former, RAS_Resource_Event_In_Tag target)
 {
     former.writeMsgString(withoutSpace(target.h_passport));
     former.writeMsgChar(target.h_language);
     former.writeMsgString(withoutSpace(target.h_factory));
     former.writeMsgString(withoutSpace(target.h_user_id));
     former.writeMsgString(withoutSpace(target.h_password));
     former.writeMsgChar(target.h_proc_step);
     former.writeMsgString(withoutSpace(target.back_time));
     former.writeMsgChar(target.back_time_flag);
     former.writeMsgChar(target.chart_flag);
     former.writeMsgInt(target.count);
     former.writeMsgString(withoutSpace(target.res_id));
     former.writeMsgString(withoutSpace(target.event_id));
     former.writeMsgChar(target.lot_event_flag);
     former.writeMsgChar(target.batch_flag);
     former.writeMsgString(withoutSpace(target.chg_pri_sts));
     former.writeMsgString(withoutSpace(target.chg_sts_1));
     former.writeMsgString(withoutSpace(target.chg_sts_2));
     former.writeMsgString(withoutSpace(target.chg_sts_3));
     former.writeMsgString(withoutSpace(target.chg_sts_4));
     former.writeMsgString(withoutSpace(target.chg_sts_5));
     former.writeMsgString(withoutSpace(target.chg_sts_6));
     former.writeMsgString(withoutSpace(target.chg_sts_7));
     former.writeMsgString(withoutSpace(target.chg_sts_8));
     former.writeMsgString(withoutSpace(target.chg_sts_9));
     former.writeMsgString(withoutSpace(target.chg_sts_10));
     former.writeMsgString(withoutSpace(target.tran_cmf_1));
     former.writeMsgString(withoutSpace(target.tran_cmf_2));
     former.writeMsgString(withoutSpace(target.tran_cmf_3));
     former.writeMsgString(withoutSpace(target.tran_cmf_4));
     former.writeMsgString(withoutSpace(target.tran_cmf_5));
     former.writeMsgString(withoutSpace(target.tran_cmf_6));
     former.writeMsgString(withoutSpace(target.tran_cmf_7));
     former.writeMsgString(withoutSpace(target.tran_cmf_8));
     former.writeMsgString(withoutSpace(target.tran_cmf_9));
     former.writeMsgString(withoutSpace(target.tran_cmf_10));
     former.writeMsgString(withoutSpace(target.tran_cmf_11));
     former.writeMsgString(withoutSpace(target.tran_cmf_12));
     former.writeMsgString(withoutSpace(target.tran_cmf_13));
     former.writeMsgString(withoutSpace(target.tran_cmf_14));
     former.writeMsgString(withoutSpace(target.tran_cmf_15));
     former.writeMsgString(withoutSpace(target.tran_cmf_16));
     former.writeMsgString(withoutSpace(target.tran_cmf_17));
     former.writeMsgString(withoutSpace(target.tran_cmf_18));
     former.writeMsgString(withoutSpace(target.tran_cmf_19));
     former.writeMsgString(withoutSpace(target.tran_cmf_20));
     former.writeMsgString(withoutSpace(target.tran_comment));
     former.writeMsgInt(target.lot_count);
     target._size_lot_list = (20 >= target._size_lot_list ? target._size_lot_list : 20);
     former.writeMsgInt(target._size_lot_list);
     for (int i = 0; i < target._size_lot_list; i++)
     {
         serialize_RAS_Resource_Event_In_Tag_lot_list(former, target.lot_list[i]);
     }
     former.writeMsgInt(target.edc_hist_seq);
     former.writeMsgChar(target.spec_out_flag);
     former.writeMsgInt(target.confirm_char_seq);
     former.writeMsgInt(target.confirm_unit_seq);
     former.writeMsgInt(target.confirm_value_seq);
     former.writeMsgInt(target.hist_seq);
     former.writeMsgString(withoutSpace(target.tran_time));
     former.writeMsgString(withoutSpace(target.recipe_id));
     former.writeMsgInt(target.recipe_version);
     former.writeMsgString(withoutSpace(target.col_set_id));
     former.writeMsgInt(target.col_set_version);
     former.writeMsgInt(target.char_count);
     target._size_char_list = (5000 >= target._size_char_list ? target._size_char_list : 5000);
     former.writeMsgInt(target._size_char_list);
     for (int i = 0; i < target._size_char_list; i++)
     {
         serialize_RAS_Resource_Event_In_Tag_char_list(former, target.char_list[i]);
     }
     former.writeMsgChar(target.h_sub_step);
     former.writeMsgChar(target.lot_res_flag);
     former.writeMsgInt(target.spc_count);
     former.writeMsgInt(target.edc_char_seq);
     former.writeMsgChar(target.edc_input_flag);
     target._size_chart_list = (100 >= target._size_chart_list ? target._size_chart_list : 100);
     former.writeMsgInt(target._size_chart_list);
     for (int i = 0; i < target._size_chart_list; i++)
     {
         serialize_RAS_Resource_Event_In_Tag_chart_list(former, target.chart_list[i]);
     }
     former.writeMsgChar(target.proc_alarm_flag);
     former.writeMsgString(withoutSpace(target.sheet_name));
     former.writeMsgString(withoutSpace(target.sheet_key_1));
     former.writeMsgString(withoutSpace(target.sheet_key_2));
     former.writeMsgString(withoutSpace(target.sheet_key_3));
     former.writeMsgString(withoutSpace(target.sheet_key_4));
     former.writeMsgString(withoutSpace(target.sheet_key_5));
     former.writeMsgString(withoutSpace(target.sheet_key_6));
     former.writeMsgString(withoutSpace(target.sheet_key_7));
     former.writeMsgString(withoutSpace(target.sheet_key_8));
     former.writeMsgString(withoutSpace(target.sheet_key_9));
     former.writeMsgString(withoutSpace(target.sheet_key_10));
     former.writeMsgString(withoutSpace(target.data_type));
     former.writeMsgString(withoutSpace(target.tran_time));
     former.writeMsgInt(target.data_count);
     target._size_data_tbl = (100 >= target._size_data_tbl ? target._size_data_tbl : 100);
     former.writeMsgInt(target._size_data_tbl);
     for (int i = 0; i < target._size_data_tbl; i++)
     {
         serialize_RAS_Resource_Event_In_Tag_data_tbl(former, target.data_tbl[i]);
     }
 }
コード例 #5
0
ファイル: MESTransfer.cs プロジェクト: trantan490/web
 public abstract void RAS_Resource_Event(RAS_Resource_Event_In_Tag Resource_Event_In, ref RAS_Resource_Event_Out_Tag Resource_Event_Out);
コード例 #6
0
 public static bool RAS_Resource_Event(RAS_Resource_Event_In_Tag Resource_Event_In, ref RAS_Resource_Event_Out_Tag Resource_Event_Out)
 {
     return(RAS_Resource_Event("RAS_Resource_Event", Resource_Event_In, ref Resource_Event_Out));
 }