Testing your custom device
Testing your custom device scripts is relatively straight forward. Once you have the device type .ini
file and the device script .txt
file set up, you can test the new device with CatTools by setting up activities using the new device type. Start testing with is the Device.ConnectivityTest.Login activity to ensure you can access the device. Nearly all of the activities that run on a device require logging in to the device, therefore if the Device.ConnectivityTest.Login activity fails, it is likely the other activities will also fail.
Info Log messages
Within the Info Log pane you see messages appear while an activity is running. The level of messages that appear can be filtered by the drop-down list near the bottom of the Info Log window. By selecting level "4) Show Debug events and above" you get to see all the cl.log messages being displayed during the running of an activity.
You should be aware that all the Info Log messages are logged to a file called InfoLog.txt in the root CatTools folder. This file can get very large very quickly, so can be purged by selecting the File | Delete | Delete lnfolog.txt file menu item from the CatTools File menu.
The client script function cl.Log 4,"message" is found throughout device scripts to display level 4 messages which help assist in troubleshooting device specific issues.
Debug log
Under the File menu of CatTools there is an entry Enable Capture Mode. This turns on the logging of the conversation between CatTools and the end device and creates a disk file in the \Debug sub folder of the communications. This can be extremely useful when the script does not appear to be communicating correctly with the device after entering a command. The scripting mechanism waits for known prompts when issuing a command to the device, but eventually times out if an expected prompt does not appear. The debug log capture mode file shows what the device actually sent to CatTools, and you can adjust your code accordingly.