1 /******************************************************************************
2 * Copyright (c) 2000-2015 Ericsson Telecom AB
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
7 ******************************************************************************/
9 // File: PIPEasp_Types.ttcn
10 // Description: PIPE (ASP) definitions
11 // Reference: Based on SCS PIPE testport
13 // Prodnr: CNL 113 334
14 // Updated: 2008-06-03
15 // Contact: http://ttcn.ericsson.se
19 {//start of the module
21 // *************************************************************************
22 // * Type Definitions Part *
23 // *************************************************************************
25 // This ASP can be used to execute the given command with given standard input.
26 // The PResult ASP is sent as an answer, unless there is already a process
27 // executing which results in the ASP PError being sent.
29 // This ASP can only be sent from the test suite: $DIRECTION OUT
30 type record ASP_PExecute {
35 // This ASP is sent as an answer to the PExecute ASP. It provides
36 // information about the standard output and error of the executed command,
37 // as well as the exit code of the command.
39 // This ASP can only be received by the test suite: $DIRECTION IN
40 type record ASP_PResult {
46 // This ASP is similar to the PExecute ASP, except that binary data is
47 // sent instead of a string as the contents of standard input. This means that
48 // the data can be, for instance, the encode form of a PDU.
50 // This ASP can only be sent from the test suite: $DIRECTION OUT
51 type record ASP_PExecuteBinary {
56 // This ASP is similar to the PResult ASP, except that the outputs are
57 // given as binary data.
59 // This ASP can only be received by the test suite: $DIRECTION IN
60 type record ASP_PResultBinary {
66 // This ASP can be used to start a background process with the command
67 // given in the parameters. The PStdin, PStdinBinary, PStdout, PStdoutBinary,
68 // PStderr, and PStderrBinary ASPs can then be used to send and receive input
69 // and output to and from the process.
71 // This ASP can only be sent by the test suite: $DIRECTION OUT
72 type record ASP_PExecuteBackground {
76 // This ASP sends input to the process started with PExecuteBackground.
77 // After the usage of the PStdin ASP, all outputs are sent back to the
78 // test suite by the PStdout and PStderr ASPs.
80 // This ASP can only be sent by the test suite: $DIRECTION OUT
81 type record ASP_PStdin {
85 // This ASP is sent to the test suite when the background process started
86 // by PExecuteBackground outputs something to its standard output.
88 // This ASP can only be received by the test suite: $DIRECTION IN
89 type record ASP_PStdout {
93 // This ASP is sent to the test suite when the background process started
94 // by PExecuteBackground outputs something to its standard error.
96 // This ASP can only be received by the test suite: $DIRECTION IN
97 type record ASP_PStderr {
101 // This ASP is similar to the PStdin ASP, except that the inputs are in
102 // binary format. After sending this ASP, all the outputs produced by the
103 // background process are sent back to the test suite in the PStdoutBinary
104 // and PStderrBinary ASPs.
106 // This ASP can only be sent by the test suite: $DIRECTION OUT
107 type record ASP_PStdinBinary {
111 // This ASP is similar to PStdout, except that it carries binary data.
113 // This ASP can only be received by the test suite: $DIRECTION IN
114 type record ASP_PStdoutBinary {
118 // This ASP is similar to PStderr, except that it carries binary data.
120 // This ASP can only be received by the test suite: $DIRECTION IN
121 type record ASP_PStderrBinary {
125 // This ASP can be used to send a signal to the process started by
126 // PExecuteBackground. The parameter value is the signal number.
128 // This ASP can only be sent by the test suite: $DIRECTION OUT
129 type record ASP_PKill {
133 // This ASP informs the test suite about the death of the process started
134 // by PExecuteBackground. The parameter value is the exit code of the process.
136 // This ASP can only be received by the test suite: $DIRECTION IN
137 type record ASP_PExit {
141 // This ASP determines the meaning of the strings representing the standard
142 // input, output, and error in the ASPs PExecute, PResult, PStdin, PStdout,
143 // and PStderr. In the first two ASPs, it determines if a newline is added to
144 // the end of the inputs and a newline is taken away from the end of the outputs.
145 // TRUE determines that these changes take place, and FALSE that they do not.
147 // In the three other ASPs, TRUE means that a newline is added to the end of
148 // each input string, and that the outputs are sent in separate ASPs each
149 // containing only one line of text (without the newline).
151 // By default, the PIPE test port functions as if the PLineMode ASP would have
152 // been sent with the parameter values TRUE.
154 // This ASP can only be sent by the test suite: $DIRECTION OUT
155 type record ASP_PLineMode {
159 // This ASP is sent to the test suite when the PIPE test port is used
160 // in a wrong manner.
162 // This ASP can only be received by the test suite: $DIRECTION IN
163 type record ASP_PError {
164 charstring errorMessage
167 // This ASP can be used to notify the test port that the end of input
168 // is reached. Makes sense for processes started by PExecuteBackground.
169 // After this ASP is sent to the background process no more input can be sent
170 // to its stdin using PStdin(Binary)
171 // Note, that for processes started by PExecute(Binary) the input is
172 // closed automatically.
174 // This ASP can only be sent by the test suite: $DIRECTION OUT
175 type record ASP_PEndOfInput {