Protocol Startup upoc

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Protocol Startup upoc

  • Creator
    Topic
  • #49630
    Bob Schmid
    Participant

    trying to execute the protocol startup proc once…..

    is there a special swithc to throw so it does not execute at run time ?

    there used to be a commacn engineStartupSwitchThrow….anybody know what Im talkin about  ðŸ˜•

Viewing 5 reply threads
  • Author
    Replies
    • #62789
      John Hamilton
      Participant

      Can you not just process your code in the start mode of your script ?

      I know what your are talking about with the engineStartupSwitchThrow. I only used it once years ago. Know I have been able to acomplish what I need using the mode’s.

      Maybe if we had more detail on your process we could help more.

    • #62790
      Bob Schmid
      Participant

      engine toggle switch

      A point of control that a Tcl procedure has over the engine. Examples include

      the pre-translation dequeue switch, which controls whether messages in the

      pre-translation message queue are given to the routing and translation

      system, and the protocol start-up switch, which controls how messages read

      from a connection are handled.but

      but what is the switch??????

    • #62791
      John Hamilton
      Participant

      proc telvox_upoc { args } {  

         keylget args MODE mode    

         global A18_fileID ADT_file

                                   

         set dispList {}          

                                   

         switch -exact — $mode {  

                                   

             start {  

                     # Do stuff that runs at startup only here.

                      # I do some ODBC conect stuff here.

                      # also some file operations that I only do when the thread first starts up.

                    }

             run {

                     }

         shutdown {

                        }

         default {

                    }            

      Did this help ?

    • #62792
      Bob Schmid
      Participant

      Thanks for your reply.

      in START context:

      My starupt checks for the existence of a file and stops the thread if exists….thats all i want it do to…but

      but it also comes thru here in RUN mode (I dont want a message to come thru this upoc..which I think is what the switchthrwo was all about

      the first message is passed thru the

      i return the message and than the next message that comes thru into the thread hangs the thread.

    • #62793
      Michael Hertel
      Participant

      Protocol Start-Up Switch

      The protocol start-up switch is used to control how protocol messages received from the protocol driver are routed. At thread start-up, a Tcl procedure (if defined) is given control of message flow. It is called once to allow it to set up its initial state. It is then called each time a new protocol message arrives from the connection. The procedure is given the message and it has the option to do whatever it wants with it.

      Each time the procedure is called-including the initial call-the return value from the procedure is a list of binary object handles wrapped inside two keyed lists. The first list indicates binary objects that should be written to the connection. The second list indicates binary objects that should be moved to the inbound pre-SMS queue. The reason for the second list is to give the Tcl procedure the opportunity to “pass along” protocol messages that it receives that are uninteresting to it.

      While the procedure is running, it has access to the inbound pre-SMS stack. It may remove messages from the queue using Tcl built-in functions. This functionality is provided so it may remove messages that have not yet entered inbound SMS processing.

      Once the procedure is done controlling the start-up flow, it toggles the protocol switch from within Tcl. Once the procedure returns arter it has thrown the switch, the procedure will not be called again until the thread is restarted.

      Note: The protocol start-up switch is thrown using the engine-only Tcl command engpswthrow. This is required for normal processing. Otherwise, the thread stays in Startup mode.

    • #62794
      Bob Schmid
      Participant

      Yep..that did it.

      in the START-UP upoc:

      in the Start context of the tclproc: we put the engpswthrow command

      I had it in the run context. – wrong

      the command use to be engineStartupSwitchThrow …..i was trying that too….

      Bob

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

Forum Statistics

Registered Users
5,125
Forums
28
Topics
9,294
Replies
34,439
Topic Tags
287
Empty Topic Tags
10