예제 #1
0
        internal static GammaClientTransaction GetClearEnvTX(IGammaMachineInfo machine, GammaTXClearEnv op_code)
        {
            var trx = new GammaClientTransaction()
            {
                Machine        = machine.MachineName,
                TX_TYPE        = GammaTransactionType.CLEARENV,
                TX_SUB_TYPE    = (int)op_code,
                TX_CONTENT     = string.Empty,
                TX_RESULT      = string.Empty,
                TX_RESULT_CODE = GammaTransactionRC.RUNNING,
            };

            GammaClientTXLogger.GetInstance().RegisterTransaction(trx);
            return(trx);
        }
예제 #2
0
        internal static GammaClientTransaction GetCmdExecTX(IGammaMachineInfo machine, string command)
        {
            var trx = new GammaClientTransaction()
            {
                Machine        = machine.MachineName,
                TX_TYPE        = GammaTransactionType.COMMAND,
                TX_CONTENT     = command,
                TX_RESULT      = string.Empty,
                TX_RESULT_CODE = GammaTransactionRC.RUNNING,
            };

            //init event handler
            GammaClientTXLogger.GetInstance().RegisterTransaction(trx);
            return(trx);
        }
예제 #3
0
        internal static GammaClientTransaction GetQAToolsTX(IGammaMachineInfo machine, GammaTXQATools op_code)
        {
            var trx = new GammaClientTransaction()
            {
                Machine        = machine.MachineName,
                TX_TYPE        = GammaTransactionType.QATOOLS,
                TX_SUB_TYPE    = (int)op_code,
                TX_CONTENT     = string.Empty,
                TX_RESULT      = string.Empty,
                TX_RESULT_CODE = GammaTransactionRC.RUNNING,
            };

            //init event handler
            GammaClientTXLogger.GetInstance().RegisterTransaction(trx);
            return(trx);
        }
예제 #4
0
        internal static GammaClientTransaction GetCmdExecTX(IGammaMachineInfo machine, string[] command)
        {
            var sb = new StringBuilder();

            foreach (var cmd in command)
            {
                sb.AppendFormat("{0};", cmd);
            }
            var trx = new GammaClientTransaction()
            {
                Machine        = machine.MachineName,
                TX_TYPE        = GammaTransactionType.COMMAND,
                TX_CONTENT     = sb.ToString(),
                TX_RESULT      = string.Empty,
                TX_RESULT_CODE = GammaTransactionRC.RUNNING,
            };

            //init event handler
            GammaClientTXLogger.GetInstance().RegisterTransaction(trx);
            return(trx);
        }