File: init_stanza.rst

package info (click to toggle)
sip-tester 1%3A3.7.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,932 kB
  • sloc: cpp: 29,383; xml: 13,436; ansic: 2,381; python: 2,218; sh: 505; makefile: 13
file content (28 lines) | stat: -rw-r--r-- 968 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Initialization Stanza
=====================

Some complex scenarios require setting appropriate global variables at
SIPp startup. The initialization stanza allows you do do just that. To
create an initialization stanza, simply surround a series of <nop> and
<label> commands with <init> and </init>. These <nop>s are executed
once at SIPp startup. The variables within the init stanza, except for
globals, are not shared with calls. For example, this init stanza sets
$THINKTIME to 1 if it is not already set (e.g., by the -set command
line parameter).

::

    <init>
      <!-- By Default THINKTIME is true. -->
      <nop>
        <action>
          <strcmp assign_to="empty" variable="THINKTIME" value="" />
          <test assign_to="empty" compare="equal" variable="empty" value="0" />
        </action>
      </nop>
      <nop condexec="empty">
        <action>
          <assignstr assign_to="THINKTIME" value="1" />
        </action>
      </nop>
    </init>