Testing TPS
This simulates most TPS UPoCs. TPS is a series of Tcl procedures composed of procedure argument elements, where:
- lists the name of the procedure.
- Arguments lists any special arguments to pass in through the ARGS key.
Tcl Procedure Stream (TPS) modules permit the alteration of message processing by setting each message’s disposition before exiting the module. In addition, these entry points let you modify a message’s data, metadata, or flow.
Use Script Editor to build any TPS.
If specifying a file location for test output, then use the "/" as the file delimiter (all platforms) or begin the file path with a "\\" (Windows).
Use hcitpstest to verify modules in a TPS. Test each module in the stream with hcitpstest before placing the next module into the stream.
This process might require the use of an end-processing module to verify that the messages are leaving the module. It can also verify that a module stream has the correct disposition.
It is important to verify each TPS module before configuring it into your system. Although TPS provides substantial capability to modify data, an erroneous application of TPS functions can result in messages being delivered incorrectly, or not being delivered at all.
Additionally, you should verify each module in the TPS. The return value of each procedure affects the arguments of the subsequent procedure, and, depending on the procedure’s return value, a subsequent procedure might not be invoked.
TPS can run in run, startup, time, or shutdown mode, although certain protocol thread Tcl procedures are only run in Startup mode during thread start-up.
The system sets the Tcl system encoding as UTF-8, so the default file encoding for input/output is in UTF-8.
The default encoding of StdIn
, StdOut
, and
StdErr
is ANSI. Use the fconfigure command to change the encoding of StdIn
,
StdOut
, and StdErr
. For example, to change the
encoding to UTF-8 when you use the TPS Test Tool in the IDE.
Message data that is obtained or changed by Tcl is always UTF-8. A warning is given to remind you that string lengths are in bytes and are not the same as character (code point) lengths.
$$
(double dollar) has a
confict with the shell special variable, which has meaning as the current PID on
Linux/AIX platforms. To use a global variable in the Testing Tool on Linux/AIX
plaforms, escape the $$
using one of these forms.
For example:- hcitpstest -a '$$variablename'
- hcitpstest -a \$\$variablename
On Windows, use hcitpstest -a $$variablename.