dnsCmd

dnsCmd — issues queries and low-level commands to the dnscan module.

Synopsis

(dnsCmd)
(dnsCmd card_id)
(dnsCmd card_id cmd)
  

Parameters

card_id
The target card ID (0..3).
cmd
The command to execute, one of
CMD_DN_ONLINE
CMD_DN_OFFLINE
CMD_ADD_DEVICE
CMD_GET_DEVICE
CMD_DELETE_DEVICE
CMD_START_SCAN
CMD_STOP_SCAN
CMD_IO_ACTIVE
CMD_IO_IDLE

Returns

If successful, the response will depend on the form of the command (see below) and the dnscan command, if issued. Otherwise, one of the following error messages:

(error "dnsCmd DR_ERR_CARD_INVALID (time) invalid card: card_id")
(error "dnsCmd DR_ERR_NO_CARD (time) card not available")
(error "dnsCmd DVN_ERR_CMD_UNDEFINED (time) Cmd not defined: cmd")
(error "dnsCmd DVN_ERR_CMD_TIMEOUT (time) Cmd failed (timeout)")

Description

This command provides access to the main initialization interface to the dnscan firmware module running on the 5136-DN/DNP or SST-DN3 series card. It can be used to query the module for available commands and command status. It can also be used to issue commands, but only without parameters, for debugging purposes. Generally, from within the DVN Driver the dnscan commands should be issued directly, using one of these: dnsOnline, dnsOffline, dnsDeviceAdd, dnsDeviceGet, dnsDeviceDelete, dnsScanStart, dnsScanStop, dnsIoActive, dnsIoIdle.

The dnsCmd command supports the three following syntax variations:

  1. (dnsCmd) queries the list of available dnscan commands. This serves as a helpful reminder in interactive debug scenarios.
    Returns the following:
    (dnsCmd CMD_DN_ONLINE CMD_DN_OFFLINE
             CMD_ADD_DEVICE CMD_GET_DEVICE CMD_DELETE_DEVICE
             CMD_START_SCAN CMD_STOP_SCAN CMD_IO_ACTIVE CMD_IO_IDLE)
  2. (dnsCmd card_id) queries the status of the last dnscan command issued to the card.
    Returns 
    (dnsCmd card_id last_cmd)
    if the command executed successfully, or
    (dnsCmd card_id last_cmd last_error)
    if the dnscan command caused an error.
    Example 
    > (dnsCmd 0 CMD_STOP_SCAN)
    (error "dnsCmd 7267 (030213@13:58:18) DEV: Cmd:  Scanner not running")
    > (dnsCmd 0)
    (dnsCmd 0 CMD_STOP_SCAN "DEV: Cmd:  Scanner not running")
    > (dnsCmd 0 CMD_START_SCAN)
    (dnsCmd 0 CMD_START_SCAN)
    > (dnsCmd 0)
    (dnsCmd 0 CMD_START_SCAN)
  3. (dnsCmd card_id cmdissues the specified dnscan command, without setting any parameters. This is a low-level driver command intended primarily for debugging and should not be normally used.