UPOC testing

  • Creator
  • #51410
    Krishna Kumar

    I have a translate completely written in TCL outside engine and a UPOC using this translate.Then a process is set up in the engine so that just to send translated messages to destination

    How can I test this translate using testing tool included with IDE

Viewing 11 reply threads
  • Author
    • #70165
      David Barr

      If it’s callable as a UPOC, you should be able to use the TPS testing tool.

    • #70166
      David Barr

      Krishna has asked for me to elaborate on my answer.

      It sounds like you’re saying that you have a TPS proc (which you refer to as a UPOC) that is calling another TCL procedure or script.  You want to test your procs using the testing tool.  The way that you do that is by opening the testing tool, go to the TPS tab, select the TPS proc that you want to test and a data file to test with, fill in all of the other required fields on the testing tool and click the “run command” button.

      Does this help? Am I understanding what you’re trying to do?

    • #70167
      Mark Perschbacher

      The thing I didn’t realize at first was that to see the output of the proc, you had to select Send to Proc, and choose hciroutetestshowby dest.

    • #70168
      David Barr

      Mark, you use hciroutetestshowbydest for testing routes.  For TPS procs, you can use hcitpstestshowbydisp.

    • #70169
      Krishna Kumar

      I tried the way you folks replied but I am not getting any display in Result pane.

    • #70170
      David Barr

      Maybe you should post a screen shot.

    • #70171
      David Barr

      Actually, if you just copy the text out of the “preview command to issue” field and post that, it might help us determine the problem.

    • #70172
      Krishna Kumar

      proc tps_upoc_chg_from_ctrc_ {args} {

      global HciSite HciConnName

      keylget args MODE mode

      set dispList {}

      switch -exact — $mode {

      time {

      set mIns {}

      set directory [file join F:/Interfaces $HciSite $HciConnName queue]

      set files     [glob -directory $directory -nocomplain — *.txt]

      foreach file $files {

      set timestamp [clock seconds]

      puts “Polled $file on [clock format $timestamp -format %m/%d/%Y] at [clock format $timestamp -format %H:%M:%S]:”

      if {[::ctrc_::poll_chg_from_ctrc_ $file]} {

      catch {

      set mIn {}

      dict set mIn FILE  $file

      dict set mIn LINES {}

      set handle [open $file r]

      while {[gets $handle line] >= 0} {

      dict lappend mIn LINES $line


      close $handle

      file delete -force $file

      lappend mIns $mIn

      puts ”    Processed:”

      puts ”        [tcl_::label_ [llength [dict get $mIn LINES]] line lines]”

      } message

      if {$message != {}} {

      puts ”    Error:”

      puts ”        $message”


      } else {

      puts ”    Queued…”



      set mOuts [::ctrc_::translate_chg_from_ctrc_ $mIns]

      if {$mOuts != {}} {

      puts “Processed [tcl_::label_ [llength $mIns] file files]:”

      puts ”    [tcl_::label_ [llength $mOuts] message messages]”

      foreach mOut $mOuts {

      set out   [dict get $mOut SEGMENTS]

      set outMH [msgcreate -class engine -type data -recover — [join $out r]r]

      lappend dispList “CONTINUE $outMH”





      return $dispList


    • #70173
      David Barr

      So, this proc works on “time” mode instead of “run” mode.  You need to make sure that you have that selected in the tester.  You also need to make sure that you have data files in the directory referred to by the proc (f:/interfaces/ … /queue or something).  Also, it looks like the proc is looking at the $HciConnName variable which will be set when the proc is called from the Cloverleaf thread, but will probably be set to something unusual when run from the testing tool, so you might need to temporarily change the “set directory” line to hardcode the full directory name of your file.

    • #70174
      Krishna Kumar

      I set up in Time Mode but still did not displaying any thing.

      My set up:

      Procs: tps_upoc_chg_from_ctrc_

      Selected Leak Detection Time Mode selected Initial startup Interval 1  Selected Send to Proc  as hcitpstestsowbydisp.

      I hardcoded the directory where file is residing

      This is what I am seeing as output

      Command Issued: hcitpstest -r time -L -i 1 -S -c sms_ib_data -e “hcitpstestshowbydisp ” “tps_upoc_chg_from_ctrc_”

      Command output:

      count must be > 0

      Usage: D:quovadxqdx5.4.1integratorbinhcitpstest.exe [-a] [-c caller] [-e “proc args”] [-f format]

            [-i interval] [-L] [-m count] [-r runmode] [-S] [-s savebase]

            [file] [“proc1 args1” … “procN argsN”]

         -a               = process all records in file

         -c caller        = caller context name

         -e “proc args”   = end processing config

         -f format        = file format specifier

         -i interval      = delay interval (time mode)

         -m count         = max msg count (time mode)

         -L               = do Tcl handle leak detection

         -r runmode       = run mode

         -S               = run message-less Startup

         -s savebase      = save file base name

         file             = data file (run mode)

         “procN argsN”    = TPS module proc and args

      caller values:


























      format values:

         len10     = 10-byte length encoded

         nl        = newline-terminated (default)

         eof       = eof-terminated

      runmode values:

         run       = ‘normal’ run mode

         start     = start-up mode

         time      = time-based mode

         shutdown  = shut down mode

    • #70175
      David Barr

      It looks like this is the error: “count must be > 0”.  I haven’t seen that one before, but I’d guess that you need to fill in the “max messages” field in the testing tool and try again.

    • #70176
      Krishna Kumar

      Thank you all! It worked. I really appreciate all the help

Viewing 11 reply threads
  • The forum ‘Cloverleaf’ is closed to new topics and replies.

Forum Statistics

Registered Users
Topic Tags