Diagnostic function:

When you enable the interruption to detect short circuit on primary line, the interruption are catched in the routine. When an interruption is catched by the routine,
the card doesn't generate a signal anymore, in fact it is when the card detect a short circuit (even if the interruption is not enabled).

To re-able the generation of a signal, you have to call the rearm primary line short circuit. If a short circuit is detected, it will rethrown a interruption and stop
the generation, etc ...

Detecting something on secondary line of a channel:
The algorithm is the following:
- Enable the detection of open circuit or short circuit on secondary line
- Read the value of the channel you want to test
- Compare this value with a base value and then say if there is something or not



To detect something on secondary line, we have to know which transducer is used, so the user has to initialize it. To initialize it, we have the ioctl function:

/*
 * IOCTL command called to enable to do the initialization of a transducer / channel
 *
 * @param in: 	arg[0] => the index of the channel that we want to initialize
 * @param in: 	arg[1] => the value of the index of the transducer (can be found with set3701)
 *
 */
int do_CMD_apci3701_initialize_transducer(struct pci_dev * pdev, unsigned int cmd, unsigned long arg)

It takes in parameter the index of the transducer. This index is written in hard in the IO MAPPING. For example, for a solartron AX1, it is 5 (101)

Then to detect open or short circuit on secondary line, the user has two functions. For each, he must give the channel he wants to test, and the type of transducer.
The type of the transducer can be found in the ADDI - DATA database. For example, for Solartron AX1 it is 24

Definition of the function test open circuit secondary line:
/*
 * IOCTL command called to test if a channel suffer of open circuit or not on secondary line
 * @param in: 	arg[0] => the index of the channel that we want to test
 * @param in:	arg[1] => the index of the transducer. ex: 24 for Solartron AX1
 *
 * @param out: 	arg[0] => 0 if there is no open circuit on this channel, 1 if there is an open circuit on this channel
 *
 * @retval:
 * 1:	channel index not valid
 * 2:	transducer not initialized
 * 3:	error while getting transducer's values
 * 4:	error while enabling secondary open circuit test
 * 5:	error while disabling secondary open circuit test
 * 6:	error while reading analog input value
 */
int do_CMD_apci3701_test_channel_secondary_line_open_circuit(struct pci_dev * pdev, unsigned int cmd, unsigned long arg)