User guide

Orange Tree Technologies
Page 34 of 57
ZestSC1SetCardID
ZESTSC1_STATUS ZestSC1SetCardID( ZESTSC1_HANDLE Handle,
unsigned long CardID);
Parameters
Handle Handle of open ZestSC1 card. See ZestSC1OpenCard.
CardID Value of new card ID.
Return Value
ZESTSC1_SUCCESS Function succeeded
ZESTSC1_ILLEGAL_HANDLE Attempt to use illegal card handle
ZESTSC1_INTERNAL_ERROR An unspecified internal error occurred while
communicating with the driver
ZESTSC1_TIMEOUT Operation timed out
Description
ZestSC1SetCardID can be used to set the user-programmable ID of a card in the
system. This ID is then used to identify the card in future calls to ZestSC1OpenCard.
The card ID is a useful way to allow software to be written in a platform independent
way. For example, suppose a system has 3 cards with different peripherals attached to
the front panel connector. The card ID can be set on each card to allow the software to
identify the cards based on the attached peripherals. A second copy of the system can
be constructed with the same set if card IDs so the software can be written so that it runs
on either copy of the system.
For example:
ZESTSC1_HANDLE Handle;
/* Open a card with ID of 1 */
ZestSC1OpenCard(1, &Handle);
/* Set card ID to 23 */
ZestSC1SetCardID(Handle, 23);
/* Close the card */
ZestSC1CloseCard(Handle);
/* Re-open the card but with ID of 23 */
ZestSC1OpenCard(23, &Handle);