busTRACE This WEB page comes from the busTRACE 9.0 User's Manual. (Table of Contents)

Previous Topic Next Topic
 

As your script runs, you have access to system defined variables as well as user defined variables (if using the advanced link editor) . These variables are available to you when displaying a message to a user or when configuring node links.

All system defined variables start and end with the '#' character. All user defined variables start and end with the '$' character. This allows you to quickly determine what type of variable you are using.

The tables below detail the available system defined variables that you can use when creating your script.

Device Variables

#DeviceVendorID#

This variable contains the Vendor ID for the device that the script is currently running against.

#DeviceProductID#

This variable contains the Product ID for the device that the script is currently running against.

#DeviceRevision# This variable contains the Product Revision (from the Inquiry page) for the device that the script is currently running against.
#DeviceType#

This variable contains the peripheral device type for the device that the script is currently running against. For example, a value of 5 is returned for CD/DVD devices, 0 for hard drives, and 1 for sequential access devices (e.g. tape drives).

CDB Results Variables

#CDBSuccess#

This variable contains TRUE if the last CDB script node completed without error and without a check condition.

#CDBTargetStatus#

This variable contains the target status value for the last executed CDB script node (i.e. 2 for a check condition).

#CDBLastError#

If the last executed CDB script node failed its SCSI Pass Through Request, this variable contains the GetLastError() value. Please refer to Microsoft's specifications for additional details.

#CDBSenseKey#

If the last executed CDB script node failed with a check condition, this variable contains the Sense Key. Please refer to the appropriate device specifications (e.g. SPC, MMC, SBC, Mt. Fuji, etc.) for details.

#CDBSenseCode#

If the last executed CDB script node failed with a check condition, this variable contains the 16-bit Sense Code. Please refer to the appropriate device specifications (e.g. SPC, MMC, SBC, Mt. Fuji, etc.) for details.

#CDBSenseASC#

If the last executed CDB script node failed with a check condition, this variable contains the 8-bit Additional Sense Code. Please refer to the appropriate device specifications (e.g. SPC, MMC, SBC, Mt. Fuji, etc.) for details.

#CDBSenseASCQ#

If the last executed CDB script node failed with a check condition, this variable contains the 8-bit Additional Sense Code Qualifier. Please refer to the appropriate device specifications (e.g. SPC, MMC, SBC, Mt. Fuji, etc.) for details.

IOCTL Results Variables

#IOCTLSuccess#

This variable contains TRUE if the last IOCTL script node completed without error and without a check condition.

#IOCTLLastError#

If the last executed IOCTL script node failed, this variable contains the GetLastError() value. Please refer to Microsoft's specifications for additional details.

Message Box Variables

#MsgBoxResult#

This variables contains the return value for the last displayed Message Box script node. The return value is the same as the MessageBox() Windows API. Possible values are:

1 (OK)

OK button was selected

2 (CANCEL)

Cancel button was selected

3 (ABORT)

Abort button was selected

4 (RETRY)

Retry button was selected

5 (IGNORE)

Ignore button was selected

6 (YES)

Yes button was selected

7 (NO)

No button was selected

10 (TRYAGAIN)

Try Again button was selected

11 (CONTINUE)

Continue button was selected

System Variables

#OSName#

This variable contains the running operating system name.

#OSVersion#

This variable contains the running operating system version.

#OSMajorVer#

This variable contains the running operating major version number.

#OSMinorVer#

This variable contains the running operating minor version number.

#OSBuildNum#

This variable contains the running operating build number.

#OSServicePack#

This variable contains the running operating service pack.

#PhysicalMemory#

This variable contains the amount of physical memory on the system.

Miscellaneous Variables

#Branch#

This variable is used for unconditional links (i.e. branch always).

#GLOBALS#

This special system variable is used for debug purposes. It contains a string of all known variables and their values. You can use this variable in a message box script node, for example, to display during run-time the values of all current system variables and user defined variables.

 

See Also: