cardEnable

cardEnable — sets or queries card enable status.

Synopsis

(cardEnable)
(cardEnable card_id)
(cardEnable card_id {[+|-][R][W][M]})
  

Parameters

card_id

The target card ID (0..3). If no card ID is specified, the query form of the command is repeated for all initialized cards. If only the card ID is specified (no additional parameters) then that card is queried for its enable status, and no changes are made.

+

Specifies that subsequent parameters will enable the interface. If no + or - is specified, then the listed interfaces will be enabled.

-

Specifies that subsequent parameters will disable the interface.

R

Modifies the input process data interface status, depending on the last preceding + or - .

W

Modifies the output process data interface status, depending on the last preceding + or - .

M

Modifies the messaging interface status, depending on the last preceding + or - .

Returns

In response to a query or successful setting of a card:

(cardEnable card_id +|- R +|- W +|- M)

Otherwise, one of the following error messages:

(error "cardEnable DR_ERR_CARD_INVALID (time) invalid card: card_id")

Description

This command sets or queries the enable status of a card. Each of the three interfaces to the card: process data input, process data output, and messages, can be individually turned on or off. With an interface disabled, the driver provides a normal interface to the user, but does not actually perform the exchange with card (note that if messaging is turned off, the response back to the user cannot really be the actual normal response). Normally all three interfaces are enabled. This command might be used to inhibit an interface for debug or simulation purposes, such as for example, to allow safe testing of a system by ensuring the outputs cannot be modified.

Example

In the following example, card 0 output will be disabled, and the other interfaces enabled.

(cardEnable 0 -W+RM)