Beispiel #1
0
        public void Sum(TcpAppInputCommand sender)
        {
            TcpAppParameter param  = sender.Command.Parameter("Values");
            double          result = param.Values.Select(x => Convert.ToDouble(x)).Sum();

            sender.OutputMessage = result.ToString();
            sender.Status        = TcpAppCommandStatus.OK;
        }
        private void SplitString(TcpAppInputCommand sender)
        {
            string inputString   = sender.Command.Parameter("Input").Value;
            string searchString  = sender.Command.Parameter("Search").Value;
            string replaceString = sender.Command.Parameter("Replace").Value;

            sender.OutputMessage = inputString.Replace(searchString, replaceString);
            sender.Status        = TcpAppCommandStatus.OK;
        }
Beispiel #3
0
 private void customFunctionCallback(TcpAppInputCommand sender)
 {
     sender.Status        = TcpAppCommandStatus.OK;
     sender.OutputMessage = "Custom Function Executed!";
 }
Beispiel #4
0
 private void customFunction2Callback(TcpAppInputCommand sender)
 {
     sender.Status        = TcpAppCommandStatus.OK;
     sender.OutputMessage = "P1 Value = " + sender.Command.Parameter("P1").Value + " P2 Value = " + sender.Command.Parameter("P2").Value;
 }
Beispiel #5
0
 private void SlowCommand(TcpAppInputCommand sender)
 {
     System.Threading.Thread.Sleep(4500);
     sender.OutputMessage = "Snail command completed";
     sender.Status        = TcpAppCommandStatus.OK;
 }
 public void ShowHelp(TcpAppInputCommand sender)
 {
     throw new NotImplementedException();
 }
Beispiel #7
0
 private void Custom1Callback(TcpAppInputCommand sender)
 {
     sender.OutputMessage = "Result_1";
     sender.Status        = TcpAppCommandStatus.OK;
 }
Beispiel #8
0
 public void ShowHelp(TcpAppInputCommand sender)
 {
     TcpAppPlugin.ShowHelp(sender);
 }
Beispiel #9
0
 private void TimeoutSim(TcpAppInputCommand sender)
 {
     System.Threading.Thread.Sleep(5000);
 }