Tcl interpreter
Tcl procedure streams move messages through the translation and routing process. They are code fragments, or pieces of code that fit into another binary, written in Tcl (Tool Command Language).
Tcl is a non-proprietary, full-featured language that controls and extends applications. Tcl uses generic programming facilities, such as variables, loops, and procedures, that are useful for a variety of applications. Because Tcl is interpreted, code can be written on one platform and then moved to another without modification.
Custom Tcl extensions are provided for customization of messages within the engine through UPoCs (User Points of Control). Use these UPoCs to modify message content and message routing.
There is no limitation that Tcl variables cannot contain embedded nulls. The msgset, msgget, datget, and datset Tcl extensions can handle binary data. They cannot stop processing when a null character is seen in the data stream.
Upgrading from versions earlier than Tcl 8.0 could cause the Tcl and TclX commands to change some of their behaviors:
- -lrange
- -file dirname
- -keylget
- -translit
Scripts that are created in versions of Tcl earlier than Tcl 8.0 might not run properly in Tcl 8.4 and should be reworked.
Tcl interpreter
For translate or generate route details, each procedure in the sequence acts independently. Each procedure is invoked with the same keyed list interface and expected keyed list output. In all TPS, the same Tcl interpreter is used to invoke all procedures. They can use the same Tcl global variables or external database state.
If any procedure in the list returns more than a single message, then all procedures after it are called repeatedly, once for each message. Procedures returning multiple messages do not track more than a single message. They can use, though, Tcl global variables or database states to keep track of message source mid values.
Any messages that are generated by previous procedures in a raw detail or by previous route details are still delivered according to their configuration.
The pre- and post-processor calling sequence is different than all other Tcl interfaces in the system: more context is created before the processor is run, so that it can use a Tcl code fragment for the processor. Tcl code fragments can also contain global variables that are available in both inbound and outbound threads of the same process.
In-progress translations that are found during translation thread start-up are restarted from the beginning. The same Tcl interpreter is used for all Tcl callouts during a single message. It is also used for all translations that are performed by a single translation thread.
When the system supports more than one translation thread, it is almost impossible to pass Tcl state information between the translations of different messages. There is one Tcl interpreter per translation thread, so that there are different Tcl states for translation threads.
In such an environment there is no guarantee that a single Tcl interpreter is used to translate all source messages from a given source connection. This is because parallel translations translate messages concurrently from the same connection.
hcigdbmconvert promotes a GDBM file from a version earlier than 3.8.1P rev1. This utility converts null-terminated databases to non-terminated, and resides in integrator/bin.