2 # Copyright (c) 1999 Joseph E. Smith <jes@presto.med.upenn.edu>
4 # See the 'COPYRIGHT' section below for complete copyright information.
10 use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $AUTOLOAD);
16 @ISA = qw(Exporter DynaLoader);
45 SubdeviceTypes => [ qw(
59 SubdeviceFlags => [ qw(
87 TriggerFlags => [ qw (
110 # Items to export into callers namespace by default. Note: do not export
111 # names by default without a very good reason. Use EXPORT_OK instead.
112 # Do not simply export all your public functions/methods/constants.
116 @{$EXPORT_TAGS{'Functions'}},
117 @{$EXPORT_TAGS{'Constants'}},
118 @{$EXPORT_TAGS{'Ioctls'}},
119 @{$EXPORT_TAGS{'SubdeviceTypes'}},
120 @{$EXPORT_TAGS{'SubdeviceFlags'}},
121 @{$EXPORT_TAGS{'TriggerFlags'}},
122 @{$EXPORT_TAGS{'Units'}},
128 # This AUTOLOAD is used to 'autoload' constants from the constant()
129 # XS function. If a constant is not found then control is passed
130 # to the AUTOLOAD in AutoLoader.
133 ($constname = $AUTOLOAD) =~ s/.*:://;
134 my $val = constant($constname, @_ ? $_[0] : 0);
136 if ($! =~ /Invalid/) {
137 $AutoLoader::AUTOLOAD = $AUTOLOAD;
138 goto &AutoLoader::AUTOLOAD;
141 croak "Your vendor has not defined Comedi macro $constname";
144 eval "sub $AUTOLOAD { $val }";
148 bootstrap Comedi $VERSION;
150 # Preloaded methods go here.
153 my ($chan, $rng, $aref) = @_;
155 return ( ((($aref)&0x3)<<24) | ((($rng)&0xff)<<16) | (($chan)&0xffff) );
159 # Autoload methods go after =cut, and are processed by the autosplit program.
166 Comedi - Perl extension for data acquisition using comedi
170 use Comedi qw( :Functions :Constants :Ioctls :SubdeviceTypes :SubdeviceFlags :TriggerFlags :Units );
174 The B<Comedi> module provides constants and data types for using the comedi data acquisition module.
176 By itself, this module will allow you to access the B<comedi> module using standard I/O functions and ioctls.
177 For more robust access to B<comedi>, see the B<Comedi::Lib> module.
179 =head1 Exported constants
181 The large number of constants defined in C<comedi.h> are divided into
182 several functional categories for export. No constants are exported
274 Version 0.01 09-Nov-1999
278 Joe Smith <F<jes@presto.med.upenn.edu>>.
282 Copyright (c) 1999 Joseph E. Smith. All rights reserved. This
283 program is free software. You may redistribute it and/or modify it
284 under the same terms as Perl itself.
288 Comedi::Trigger(1), Comedi::Lib(1).