FIREWIREMONITOR |
Purpose: | Monitor FireWire device connection and disconnection |
Format: | FIREWIREMONITOR [/C [name]] |
FIREWIREMONITOR name CONNECTED | DISCONNECTED n command
name | Device name |
n | Number of repetitions (or FOREVER) |
command | Command to execute when condition is triggered |
Usage:
The FireWire device name can include wildcards. You can use either the device ID or the "friendly" name for the device.
The command line will be parsed and expanded before FIREWIREMONITOR is executed, so if you want to pass redirection characters or variables to command you will need to protect them (by enclosing in single back quotes, doubling the %'s, or using command grouping).
If the last argument on the line is a single (, it is interpreted as the beginning of a command group. FIREWIREMONITOR will append the following lines (in a batch file) or prompt you for more input (at the command line) until it gets a closing ).
If you don't enter any arguments, FIREWIREMONITOR will display the FireWire devices it is currently monitoring.
The monitoring runs asynchronously in a separate thread. When the condition is triggered, the command will be executed immediately. This may cause problems if you try to write to the display or access files while the main TCC-RT thread is also performing I/O. You may need to use START or DETACH in command to avoid conflicts.
FIREWIREMONITOR creates three environment variables when a device is connected or disconnected that can be queried by command. The variables are deleted after command is executed.
_firewiredeviceid | The device ID (this may have special characters like & in the name, so you may need to use double quotes around the variable name to prevent TCC-RT from parsing the special characters) |
_firewirename | The "friendly" name of the device |
_firewirecount | The number of times the condition has been triggered |
Options: