1COMEDI_COMMAND_TEST(3) COMEDI_COMMAND_TEST(3)
2
3
4
6 comedi_command_test - test streaming input/output configuration
7
9 #include <comedilib.h>
10
11 int comedi_command_test (comedi_t * device, comedi_cmd * command);
12
14 The function comedi_command_test() tests the command structure pointed
15 to by the parameter command and returns an integer describing the test‐
16 ing stages that were sucessfully passed. In addition, if elements of
17 the command structure are invalid, they may be modified. Source ele‐
18 ments are modified to remove invalid source triggers. Argument ele‐
19 ments are adjusted or rounded to the nearest valid value.
20
21 The meanings of the return value are as follows.
22
23 0 indicates a valid command.
24
25 1 indicates that one of the *_src members of the command contained an
26 unsupported trigger. The bits corresponding to the unsupported trig‐
27 gers are zeroed.
28
29 2 indicates that the particular combination of *_src settings is not
30 supported by the driver, or that one of the *_src members has the bit
31 corresponding to multiple trigger sources set at the same time.
32
33 3 indicates that one of the *_arg members of the command is set outside
34 the range of allowable values. For instance, an argument for a
35 TRIG_TIMER source which exceeds the board's maximum speed. The invalid
36 *_arg members will be adjusted to valid values.
37
38 4 indicates that one of the *_arg members required adjustment. For
39 instance, the argument of a TRIG_TIMER source may have been rounded to
40 the nearest timing period supported by the board.
41
42 5 indicates that some aspect of the command's chanlist is unsupported
43 by the board. For example, some board's require that all channels in
44 the chanlist use the same range.
45
46 28 October 2007 COMEDI_COMMAND_TEST(3)