|
Setting the Communication Mode
TL1 API provides two modes by which you can communicate with the TL1 device. Normal and Craft mode. In Normal mode, messages exchanged by applications are processed and queued before dispatch. But in the case of Craft mode, messages are given directly to the application without any intervention.
The advantages of using the Normal mode over the Craft mode are:
Applications can choose to communicate either in synchronous or asynchronous modes. In Craft mode, communication is only asynchronous.
Messages are parsed in the Normal mode. Also partial messages can be accumulated and given to the application as a single response.
Timeout and Retries option is supported in the Normal mode.
In Normal mode, applications can choose to rationalize/filter messages.
Communication mode has to be set at the time of session creation. TL1 uses Normal mode by default. Craft mode is often preferred for testing purposes as it accepts any data (Junk in and Junk out).
To use the Craft mode, set the mode variable to true.
|
TL1API api = new TL1API(); TL1Session session = new TL1Session(api, true); |
Here, api is the TL1API
instance with which the TL1Session
is associated. If the mode variable is set to false, the session is set to Normal
mode.
You can refer to the topics Sending Messages and Handling Messages for details on how to send and receive messages using both the modes.
|