comedi_test_route — validate and test device-global route
#include <comedilib.h>
int comedi_test_route( | comedi_t * device, |
unsigned int source, | |
unsigned int destination) ; |
This function validates a globally-named route as connectible and tests whether
the route is connected.
Note that since comedi_connect_route
and comedi_disconnect_route
effectively perform the same operations as comedi_set_routing
/
comedi_get_routing
and
comedi_dio_config
, this
operation will only report a route as connected _if_ both operations have been
performed directly or effectively via comedi_connect_route.
There are several routes that are not globally connectable via comedi_connect_route
,
such as (NI_PFI(i)
-->
NI_AO_SampleClock
) as they must be connected via a trigger
argument, such as comedi_cmd->start_arg
for
NI_AO_StartTrigger
. This function can still be used for
such routes to test whether they are valid.
The source
parameter specifies the
source of the signal route, whereas the destination
parameter specifies the destination.
Possible values for source and destination are driver dependent but are
generally required to be values that are recognizable globally for a particular
device, independent of sub-device.